Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689148 - sys-libs/glibc-2.29-r2 emake failed error: ‘REG_RBP’ undeclared
Summary: sys-libs/glibc-2.29-r2 emake failed error: ‘REG_RBP’ undeclared
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-02 11:34 UTC by Banana
Modified: 2019-07-04 18:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
glibc-2.29-r2 build log (glibc-2.29-r2-build.txt,101.07 KB, text/plain)
2019-07-02 12:27 UTC, Banana
Details
glibc-2.29-r2 build enviroment (glibc-2.29-r2-enviroment.txt,169.06 KB, text/plain)
2019-07-02 12:28 UTC, Banana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Banana 2019-07-02 11:34:07 UTC
Hello everyone.

I asked in the gentoo forums already and there was the suggestion to file a bug. It is all based on this forum thread: https://forums.gentoo.org/viewtopic-t-1098222-highlight-.html
*_-=Banana=-_* = me


Problematic package: sys-libs/glibc-2.29-r2

The forum narrowed it down to this command and suggest the -m23 is wrong:

python3 -B ../scripts/gen-as-const.py --cc="x86_64-pc-linux-gnu-gcc -m32 -march=skylake -pipe -O2 -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed -std=gnu11 -fgnu89-inline  -march=skylake -pipe -O2 -fno-strict-aliasing -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math -fstack-protector-all -Wstrict-prototypes -Wold-style-definition -fmath-errno     -ftls-model=initial-exec   -U_FORTIFY_SOURCE   -I../include -I/var/tmp/portage/sys-libs/glibc-2.29-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/csu  -I/var/tmp/portage/sys-libs/glibc-2.29-r2/work/build-x86-x86_64-pc-linux-gnu-nptl  -I../sysdeps/unix/sysv/linux/x86_64/64  -I../sysdeps/unix/sysv/linux/x86_64  -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/x86/nptl  -I../sysdeps/unix/sysv/linux/wordsize-64  -I../sysdeps/x86_64/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/x86_64  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/x86_64/64  -I../sysdeps/x86_64/fpu/multiarch  -I../sysdeps/x86_64/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu  -I../sysdeps/x86_64/multiarch  -I../sysdeps/x86_64  -I../sysdeps/x86  -I../sysdeps/ieee754/float128  -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64/wordsize-64  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/wordsize-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include-fixed -isystem /usr/include  -D_LIBC_REENTRANT -include /var/tmp/portage/sys-libs/glibc-2.29-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h       -DTOP_NAMESPACE=glibc -DGEN_AS_CONST_HEADERS \ 
         -MD -MP -MF /var/tmp/portage/sys-libs/glibc-2.29-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/rtld-offsets.h.dT \ 
         -MT '/var/tmp/portage/sys-libs/glibc-2.29-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/rtld-offsets.h.d /var/tmp/portage/sys-libs/glibc-2.29-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/rtld-offsets.h'" \ 
     ../sysdeps/x86_64/rtld-offsets.sym > /var/tmp/portage/sys-libs/glibc-2.29-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/rtld-offsets.hT 




Complete build log with error: https://www.bananas-playground.net/uploads/tmp/glibc-2.29-r2-build.txt
Build enviroment log: https://www.bananas-playground.net/uploads/tmp/glibc-2.29-r2-enviroment.txt

Emerge Info:

Portage 2.3.66 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop, gcc-8.3.0, glibc-2.28-r6, 4.19.44-gentoo x86_64) 
================================================================= 
System uname: Linux-4.19.44-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1225_v5_@_3.30GHz-with-gentoo-2.6 
KiB Mem:    16277056 total,  11089176 free 
KiB Swap:    4095996 total,   4095996 free 
Timestamp of repository gentoo: Tue, 18 Jun 2019 00:45:01 +0000 
Head commit of repository gentoo: 832b3ba10b16b2d0a637c62718a957c85b7e9b36 
sh bash 4.4_p23-r1 
ld GNU ld (Gentoo 2.31.1 p7) 2.31.1 
app-shells/bash:          4.4_p23-r1::gentoo 
dev-java/java-config:     2.2.0-r4::gentoo 
dev-lang/perl:            5.28.2-r1::gentoo 
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo 
dev-util/cmake:           3.14.3::gentoo 
dev-util/pkgconfig:       0.29.2::gentoo 
sys-apps/baselayout:      2.6-r1::gentoo 
sys-apps/openrc:          0.41.2::gentoo 
sys-apps/sandbox:         2.13::gentoo 
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo 
sys-devel/automake:       1.16.1-r1::gentoo 
sys-devel/binutils:       2.31.1-r6::gentoo 
sys-devel/gcc:            8.3.0-r1::gentoo 
sys-devel/gcc-config:     2.0::gentoo 
sys-devel/libtool:        2.4.6-r3::gentoo 
sys-devel/make:           4.2.1-r4::gentoo 
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers) 
sys-libs/glibc:           2.28-r6::gentoo 
Repositories: 

gentoo 
    location: /usr/portage 
    sync-type: rsync 
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage 
    priority: -1000 
    sync-rsync-verify-jobs: 1 
    sync-rsync-verify-max-age: 24 
    sync-rsync-verify-metamanifest: yes 
    sync-rsync-extra-opts: 

ACCEPT_KEYWORDS="amd64" 
ACCEPT_LICENSE="* -@EULA" 
CBUILD="x86_64-pc-linux-gnu" 
CFLAGS="-march=skylake -O2 -pipe" 
CHOST="x86_64-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf" 
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" 
CXXFLAGS="-march=skylake -O2 -pipe" 
DISTDIR="/usr/portage/distfiles" 
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" 
FCFLAGS="-O2 -pipe" 
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" 
FFLAGS="-O2 -pipe" 
GENTOO_MIRRORS="http://distfiles.gentoo.org" 
LANG="en_US.utf8" 
LDFLAGS="-Wl,-O1 -Wl,--as-needed" 
LINGUAS="de pt_BR en en_US en_GB" 
MAKEOPTS="-j5" 
PKGDIR="/var/cache/binpkgs" 
PORTAGE_CONFIGROOT="/" 
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" 
PORTAGE_TMPDIR="/var/tmp" 
USE="X a52 aac acl acpi alsa amd64 berkdb bindist branding bzip2 cairo cdda cdr cli corefonts crypt cups cxx dbus dri dts dvd dvdr elogind emboss encode evdev exif fam flac fortran gdbm gif glamor gpm gtk gtk3 iconv ipv6 jpeg lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio readline sdl seccomp spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xattr xcb xinerama xml xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="de en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-07-02 11:37:12 UTC
Please attach all log files to this bug. External resources might be unavailable (even if they belong to / are administered by you).
Comment 2 Banana 2019-07-02 12:27:41 UTC
Created attachment 581752 [details]
glibc-2.29-r2 build log
Comment 3 Banana 2019-07-02 12:28:09 UTC
Created attachment 581754 [details]
glibc-2.29-r2 build enviroment
Comment 4 Banana 2019-07-02 12:28:28 UTC
added the linked log files as attachments
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-02 22:33:09 UTC
(In reply to Banana from comment #0)
> Hello everyone.
...
> Problematic package: sys-libs/glibc-2.29-r2
> 
> The forum narrowed it down to this command and suggest the -m23 is wrong:
> 
> python3 -B ../scripts/gen-as-const.py --cc="x86_64-pc-linux-gnu-gcc -m32
> -march=skylake -pipe -O2 -fno-strict-aliasing -Wl,-O1 -Wl,--as-needed
...

-m32 is expected here: USE=multilib in glibc enables building of 32-bit libs (always enabled on multilib profiles). It should always work.

I think the real problem here is mis-detection of the target. My system reports:

           ABI:   x86
        CBUILD:   x86_64-pc-linux-gnu
         CHOST:   x86_64-pc-linux-gnu
       CTARGET:   x86_64-pc-linux-gnu
    CBUILD_OPT:   i686-pc-linux-gnu
   CTARGET_OPT:   i686-pc-linux-gnu
            CC:   x86_64-pc-linux-gnu-gcc -m32
...
checking sysdep dirs... sysdeps/unix/sysv/linux/i386/i686 sysdeps/i386/i686/nptl sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/x86 sysdeps/x86/nptl sysdeps/i386/nptl sysdeps/unix/sysv/linux sysdeps/nptl sysdeps/pthread sysdeps/gnu sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu/multiarch sysdeps/i386/i686/fpu sysdeps/i386/i686/multiarch sysdeps/i386/i686 sysdeps/i386/fpu sysdeps/x86/fpu sysdeps/i386 sysdeps/x86 sysdeps/wordsize-32 sysdeps/ieee754/float128 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic

Your reports:

           ABI:   x86
        CBUILD:   x86_64-pc-linux-gnu
         CHOST:   x86_64-pc-linux-gnu
       CTARGET:   x86_64-pc-linux-gnu
    CBUILD_OPT:   x86_64-pc-linux-gnu
   CTARGET_OPT:   x86_64-pc-linux-gnu
            CC:   x86_64-pc-linux-gnu-gcc -m32

checking sysdep dirs... sysdeps/unix/sysv/linux/x86_64/64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86 sysdeps/x86/nptl sysdeps/unix/sysv/linux/wordsize-64 sysdeps/x86_64/nptl sysdeps/unix/sysv/linux sysdeps/nptl sysdeps/pthread sysdeps/gnu sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/x86_64 sysdeps/unix sysdeps/posix sysdeps/x86_64/64 sysdeps/x86_64/fpu/multiarch sysdeps/x86_64/fpu sysdeps/x86/fpu sysdeps/x86_64/multiarch sysdeps/x86_64 sysdeps/x86 sysdeps/ieee754/float128 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64/wordsize-64 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/wordsize-64 sysdeps/ieee754 sysdeps/generic

Note: your system did not detect a switch to 32-bit CTARGET and tricked glibc into pulling x86_64 glibc definitions instead of i386. We need to find out why. Probably due to -march=skylake.

We'll need to find why CBUILD_OPT setting did not work.

glibc-2.29-r2.ebuild should set it in :

        unset CBUILD_OPT CTARGET_OPT
        if use multilib ; then
                CTARGET_OPT=$(get_abi_CTARGET)
                [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
        fi
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-02 22:36:34 UTC
I see your environment defines
    declare -x CHOST_x86="x86_64-pc-linux-gnu"
Where does it come from? From make.conf?

It supposed to be
    declare -x CHOST_x86="i686-pc-linux-gnu"
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-03 07:00:51 UTC
(In reply to Sergei Trofimovich from comment #6)
> I see your environment defines
>     declare -x CHOST_x86="x86_64-pc-linux-gnu"
> Where does it come from? From make.conf?
> 
> It supposed to be
>     declare -x CHOST_x86="i686-pc-linux-gnu"

Do you have anything like that in you /etc/portage/make.conf or /etc/portage/profile?
Comment 8 Banana 2019-07-04 06:06:12 UTC
Woha thanks for the fast response, did not expect that! 

grep -r x86_64-pc-linux-gnu /etc/portage
/etc/portage/make.conf:CHOST="x86_64-pc-linux-gnu"

So, it looks like the CHOST value is wrong?

Don't ask my how. Weeks ago I've lost my make.conf (yeah, that case...) and had to rebuild it. Looks like I have messed that up then.

So, fixing in and following this: https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable should to the trick?
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-04 06:31:12 UTC
(In reply to Banana from comment #8)
> Woha thanks for the fast response, did not expect that! 
> 
> grep -r x86_64-pc-linux-gnu /etc/portage
> /etc/portage/make.conf:CHOST="x86_64-pc-linux-gnu"
> 
> So, it looks like the CHOST value is wrong?
> 
> Don't ask my how. Weeks ago I've lost my make.conf (yeah, that case...) and
> had to rebuild it. Looks like I have messed that up then.
> 
> So, fixing in and following this:
> https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable should to the trick?

This CHOST value is correct. No need to rebuild anything.

Gentoo's profiles define CHOST, CHOST_amd64 and CHOST_x86. Only CHOST_x86 is wrong on your system.

Can you post your:
- full make.conf
- output of 'ls -ld /etc/portage/make.profile'
- contents of '/etc/portage/profile'

Or you need to find where that CHOST_x86 value yourself.
Comment 10 Banana 2019-07-04 08:29:09 UTC
> 
> This CHOST value is correct. No need to rebuild anything.
> 
> Gentoo's profiles define CHOST, CHOST_amd64 and CHOST_x86. Only CHOST_x86 is
> wrong on your system.
> 
> Can you post your:
> - full make.conf

CHOST="x86_64-pc-linux-gnu"
CHOST_x86="${CHOST}"

CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"

CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

MAKEOPTS="-j5"

USE="pulseaudio gtk3 xvmc xinerama corefonts vim-syntax bindist \
truetype evdev elogind \
-introspection -multilib -abi_x86_32 \
-networkmanager -consolekit -systemd -qt5 -bluetooth \
-systemd -gnome-online-accounts -gnome -geolocation"

LINGUAS="de pt_BR en en_US en_GB"
L10N="de en en-GB"
VIDEO_CARDS="intel nvidia"
INPUT_DEVICES="evdev"

ACCEPT_LICENSE="* -@EULA"

> - output of 'ls -ld /etc/portage/make.profile'

lrwxrwxrwx 1 root root 59 Dec 11  2017 /etc/portage/make.profile -> ../../usr/portage/profiles/default/linux/amd64/17.0/desktop

> - contents of '/etc/portage/profile'
ls: cannot access '/etc/portage/profile': No such file or directory

> 
> Or you need to find where that CHOST_x86 value yourself.

grep -rl CHOST_x86 /etc
/etc/portage/make.conf
Comment 11 Banana 2019-07-04 11:42:50 UTC
Err well, I think I've found the "error"

a CHOST_x86="${CHOST}" should not be set in a make.conf....

Really don't know why I put this there... I will remove this and try to build glibc and report back..
Comment 12 Banana 2019-07-04 12:03:40 UTC
(In reply to Banana from comment #11)
> Err well, I think I've found the "error"
> 
> a CHOST_x86="${CHOST}" should not be set in a make.conf....
> 
> Really don't know why I put this there... I will remove this and try to
> build glibc and report back..

Well that was it. Sorry for taking your time and thx for providing it anyway. glibc builds not successfully and I can make my usual emerge -uUDNq @world again and then start to switch to the new profile.

I can think we can close the bug now.
Comment 13 Banana 2019-07-04 12:04:50 UTC
(In reply to Banana from comment #12)
> (In reply to Banana from comment #11)
> > Err well, I think I've found the "error"
> > 
> > a CHOST_x86="${CHOST}" should not be set in a make.conf....
> > 
> > Really don't know why I put this there... I will remove this and try to
> > build glibc and report back..
> 
> Well that was it. Sorry for taking your time and thx for providing it
> anyway. glibc builds not successfully and I can make my usual emerge -uUDNq
> @world again and then start to switch to the new profile.
> 
> I can think we can close the bug now.

It builds NOW successfully... damn typo...
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-04 18:31:16 UTC
(In reply to Banana from comment #11)
> Err well, I think I've found the "error"
> 
> a CHOST_x86="${CHOST}" should not be set in a make.conf....
> 
> Really don't know why I put this there... I will remove this and try to
> build glibc and report back..

You found it! Yeah, CHOST_x86 should never be set in make.conf. Closing as INVALID.