all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Petr Hracek <phracek@redhat.com>
To: 20614@debbugs.gnu.org
Subject: bug#20614: Segmentation fault when building on Power8 Little Endian
Date: Wed, 16 Sep 2015 13:28:53 +0200	[thread overview]
Message-ID: <55F95275.4040209@redhat.com> (raw)
In-Reply-To: <55A4BFB7.3010208@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 7564 bytes --]

On 07/14/2015 09:52 AM, Petr Hracek wrote:
> On 07/13/2015 03:16 PM, Andreas Schwab wrote:
>> Petr Hracek <phracek@redhat.com> writes:
>>
>>> Does emacs-24.3 support ppc64le?
>> https://build.opensuse.org/package/binaries/openSUSE:13.2/emacs?repository=ports 
>>
>> http://download.opensuse.org/ports/ppc/distribution/13.2/repo/oss/suse/ppc64le/emacs-x11-24.3-17.2.2.ppc64le.rpm 
>>
>>
>> Andreas.
>>
> I have find out that the error message
> Loading /home/phracek/rpmbuild/BUILD/emacs-24.3/lisp/tooltip.el 
> (source)...
> Finding pointers to doc strings...
> Finding pointers to doc strings...done
> Dumping under the name emacs
> emacs: Program segment above .bss in 
> /home/phracek/rpmbuild/BUILD/emacs-24.3/build-gtk/src/temacs
> make[2]: *** [bootstrap-emacs] Error 1
>
> comes from file src/unexelf.c line 860 (emacs-24.3)
> What this function does?
> I saw in openSUSE SRPM that option --with-wide-int is used.
> In Fedora or RHEL we are not using it.
>
> Options which are used for compiling are:
> ./configure --build=powerpc64le-redhat-linux-gnu 
> --host=powerpc64le-redhat-linux-gnu --program-prefix= 
> --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr 
> --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc 
> --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 
> --libexecdir=/usr/libexec --localstatedir=/var 
> --sharedstatedir=/var/lib --mandir=/usr/share/man 
> --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg 
> --with-png --with-rsvg --with-tiff --with-xft --with-xpm 
> --with-x-toolkit=gtk3 --with-gpm=no 
> build_alias=powerpc64le-redhat-linux-gnu 
> host_alias=powerpc64le-redhat-linux-gnu CFLAGS=-DMAIL_USE_LOCKF -O2 -g 
> -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector-strong --param=ssp-buffer-size=4 
> -grecord-gcc-switches   -m64 -mcpu=power7 -mtune=power8 
> LDFLAGS=-Wl,-z,relro  --no-create --no-recursion
>
Building emacs package on Fedora or even on OpenSuse works fine.
But under RHEL-7 still fails.
Emacs is build up with full RELRO, though.
Version of packages which are used for compilation are:
gcc-4.8.3
automake-1.13.4
autoconf-2.69
Compilation flags are:

./configure --build=ppc64le-redhat-linux-gnu --host=ppc64le-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-link-time-optimization --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no


+ LDFLAGS=-Wl,-z,relro
+ export LDFLAGS
+ CFLAGS='-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power7 -mtune=power8'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power7 -mtune=power8'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power7 -mtune=power8 -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power7 -mtune=power8 -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS=-Wl,-z,relro
+ export LDFLAGS

emacs is SPEC file is compiled so that
in %prep section is:
- setup
- patching some files
- ./autogen.sh

%build section for emacs-gtk:
- ./configure is called.
- make bootstrap
- make

%build section for emacs-nox is:
- ./configure is called.
- make

Is this correct?

Compilator has settings like:

CC='gcc -std=gnu99' CFLAGS='-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power7 -mtune=power8 -flto=32' CPPFLAGS='' \
   LDFLAGS='-Wl,-z,relro -Wl,-znocombreloc ' MAKE='make'

gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/builddir/build/BUILD/emacs-24.3/lib -I../src -I/builddir/build/BUILD/emacs-24.3/src      -DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power7 -mtune=power8 -flto=32 -c /builddir/build/BUILD/emacs-24.3/lib/allocator.c

linker has a settings like:

gcc -std=gnu99     -I. -I../src -I../lib -I/builddir/build/BUILD/emacs-24.3/lib-src -I/builddir/build/BUILD/emacs-24.3/lib-src/../src -I/builddir/build/BUILD/emacs-24.3/lib-src/../lib  -Wl,-z,relro -Wl,-znocombreloc   -DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power7 -mtune=power8 -flto=32 -DEMACS_NAME="\"GNU Emacs\"" \
   -DVERSION="\"24.3\"" /builddir/build/BUILD/emacs-24.3/lib-src/etags.c \
   regex.o ../lib/libgnu.a  -o etags

Before segmentation fault build log is:
if test "no" = "yes"; then \
   rm -f bootstrap-emacs; \
   ln temacs bootstrap-emacs; \
else \
   `/bin/pwd`/temacs --batch --load loadup bootstrap || exit 1; \
   test "X" = X ||  -zex emacs; \
   mv -f emacs bootstrap-emacs; \
fi
Loading loadup.el (source)...
Using load-path (/builddir/build/BUILD/emacs-24.3/lisp /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp /builddir/build/BUILD/emacs-24.3/lisp/language /builddir/build/BUILD/emacs-24.3/lisp/international /builddir/build/BUILD/emacs-24.3/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
[ .. snip ...]dir/build/BUILD/emacs-24.3/lisp/vc/vc-hooks.el (source)...
Loading /builddir/build/BUILD/emacs-24.3/lisp/vc/ediff-hook.el (source)...
Loading /builddir/build/BUILD/emacs-24.3/lisp/tooltip.el (source)...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
emacs: Program segment above .bss in /builddir/build/BUILD/emacs-24.3/build-gtk/src/temacs
make[2]: *** [bootstrap-emacs] Error 1
make[2]: Leaving directory `/builddir/build/BUILD/emacs-24.3/build-gtk/src'
make[1]: *** [src] Error 2


Part of code which is relevant is from src/unexelf.c:   for (n = 
new_file_h->e_phnum; --n >= 0; )     {       /* Compute maximum of all 
requirements for alignment of section.  */       ElfW (Word) alignment = 
(NEW_PROGRAM_H (n)).p_align;       if ((OLD_SECTION_H 
(old_bss_index)).sh_addralign > alignment)     alignment = OLD_SECTION_H 
(old_bss_index).sh_addralign; #ifdef __sgi       /* According to 
r02kar@x4u2.desy.de (Karsten Kuenne)          and oliva@gnu.org 
(Alexandre Oliva), on IRIX 5.2, we          always get "Program segment 
above .bss" when dumping          when the executable doesn't have an 
sbss section.  */       if (old_sbss_index != -1) #endif /* __sgi */ 
       if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz       
 > (old_sbss_index == -1          ? old_bss_addr          : round_up 
(old_bss_addr, alignment))) *fatal ("Program segment above .bss in %s", 
old_name);*       if (NEW_PROGRAM_H (n).p_type == PT_LOAD If I 
understand there shouldn't be a problem on ppc64le. But I don't 
understand a code at all.

-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com

[-- Attachment #2: Type: text/html, Size: 12019 bytes --]

  parent reply	other threads:[~2015-09-16 11:28 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20  7:56 bug#20614: Segmentation fault when building on Power8 Little Endian Petr Hracek
2015-05-20 14:45 ` Eli Zaretskii
2015-05-20 16:12 ` Glenn Morris
2015-05-21 12:55   ` Petr Hracek
2015-07-13 11:27     ` Petr Hracek
2015-07-13 13:16       ` Andreas Schwab
2015-07-14  7:52         ` Petr Hracek
2015-07-14  8:14           ` Andreas Schwab
2015-09-16 11:28           ` Petr Hracek [this message]
2015-09-22 10:17             ` Petr Hracek
2015-09-23  8:06               ` Petr Hracek
2015-09-23  9:34                 ` Eli Zaretskii
2015-09-23 11:00                   ` Petr Hracek
2015-09-23 11:14                     ` Eli Zaretskii
2015-09-23 12:11                       ` Petr Hracek
2015-09-23 12:23                         ` Eli Zaretskii
2015-09-24 11:04                           ` Petr Hracek
2015-09-24 15:32                             ` Eli Zaretskii
2015-09-24 17:56                               ` Petr Hracek
2015-09-26  7:58                                 ` Eli Zaretskii
2015-09-30 10:39                                   ` Petr Hracek
2015-10-01  7:43                                     ` Eli Zaretskii
2015-10-01  8:46                                       ` Petr Hracek
2015-10-01 11:44                                       ` Petr Hracek
2015-10-01 11:53                                       ` Petr Hracek
2015-10-01 12:22                                         ` Eli Zaretskii
2015-10-01 14:05                                           ` Petr Hracek
2015-10-01 16:01                                             ` Eli Zaretskii
2015-10-02  8:36                                               ` Petr Hracek
2015-10-02  8:49                                                 ` Eli Zaretskii
2015-10-02 12:58                                                   ` Petr Hracek
2015-10-02 13:46                                                     ` Eli Zaretskii
2015-10-05  7:40                                                       ` Petr Hracek
2015-10-05  8:27                                                         ` Eli Zaretskii
2015-10-05  9:16                                                           ` Petr Hracek
2015-10-05  9:39                                                             ` Eli Zaretskii
2015-10-05 11:23                                                               ` Petr Hracek
2015-10-05 11:40                                                                 ` Eli Zaretskii
2015-10-05 14:07                                                                   ` Petr Hracek
2015-10-05 16:52                                                                     ` Eli Zaretskii
2015-10-06  8:41                                                                       ` Petr Hracek
2015-10-06 11:52                                                                         ` Petr Hracek
2015-10-06 14:55                                                                           ` Eli Zaretskii
2015-10-07  8:17                                                                             ` Petr Hracek
2015-10-07 10:56                                                                               ` YAMAMOTO Mitsuharu
2015-10-07 12:26                                                                                 ` Petr Hracek
2015-10-08  0:54                                                                                   ` YAMAMOTO Mitsuharu
2015-10-08 13:27                                                                                     ` Jaromir Capik
2015-10-10  1:40                                                                                       ` YAMAMOTO Mitsuharu
2015-10-10 15:44                                                                                         ` Andreas Schwab
2015-10-13  7:30                                                                                           ` Petr Hracek
2015-10-13  8:30                                                                                             ` Andreas Schwab
2015-10-16 15:24                                                                                               ` Jaromir Capik
2015-10-19  7:20                                                                                                 ` Andreas Schwab
2015-09-23 12:10                   ` Petr Hracek
2015-09-23 12:21                     ` Eli Zaretskii
2015-09-23 13:10                       ` Petr Hracek
2015-09-23 13:38                       ` Petr Hracek
2015-09-23 13:57                         ` Eli Zaretskii
2015-09-23 17:25                           ` Glenn Morris
2015-09-23 17:47               ` Glenn Morris
2015-09-29  8:15                 ` Florian Weimer
2015-07-13 12:17   ` bug#20614: Segmentation fault when building on Power8 Little Endian (ppc64le) Petr Hracek
2015-11-17  1:59 ` bug#20614: alignment problem with recent Emacs unexelf.c changes Paul Eggert
2015-11-17  9:03   ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F95275.4040209@redhat.com \
    --to=phracek@redhat.com \
    --cc=20614@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.