Bootstrapped a new system on Linux x86/64. Emerging dev-lang/python-3.3.2-r2 fails during compile with the following error (from build.log): make: *** [sharedmods] Error 1 which I traced back to: Failed to build these modules: _decimal which I traced back to: relocation R_X86_64_PC32 against symbol `mprime_rdx' can not be used when making a shared object; recompile with -fPIC In my make.conf (both in $EPREFIX/etc/ and $EPREFIX/etc/portage/make.profile/) I added: CFLAGS="-fPIC -O2" but the problem still persists. Help!
I traced mprime_rdx back to: /home/msyang/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: build/temp.linux-x86_64-3.3/home/msyang/gentoo/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/_decimal/libmpdec/mpdecimal.o: warning: relocation against `mprime_rdx' in readonly section `.text'.
tried emerging dev-lang/python-3.2.5-r3 instead. build.log error: x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -L. -Wl,--no-as-needed -o libpython3.so -Wl,-hlibpython3.so libpython3.2.so make: *** No rule to make target `@EXPORTSYMS@', needed by `python'. Stop.
Note: python-2.7.5-r4 builds and installs ok
(In reply to Michael Yang from comment #2) > tried emerging dev-lang/python-3.2.5-r3 instead. build.log error: > > x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -L. -Wl,--no-as-needed -o > libpython3.so -Wl,-hlibpython3.so libpython3.2.so > make: *** No rule to make target `@EXPORTSYMS@', needed by `python'. Stop. Ohw, my AIX fix somehow breaks, investigating...
(In reply to Michael Yang from comment #2) > make: *** No rule to make target `@EXPORTSYMS@', needed by `python'. Stop. Hmm, the @EXPORTSYMS@ token in the Makefile should be replaced by <empty> except for AIX. There should be these lines in the build output for python-3.2.5-r3: > >>> Preparing source ... > ... > * Applying python-3.2-issue19521.patch ... [ ok ] > ... > * Done with patching > * Running autoconf ... [ ok ] > * Running autoheader ... [ ok ] > >>> Source prepared. > >>> Configuring source ... > ... > checking EXPORTSYMS... > ... Which of them do you see different?
(In reply to Michael Yang from comment #1) > relocation R_X86_64_PC32 against symbol `mprime_rdx' can not be used when > making a shared object; recompile with -fPIC (In reply to Michael Yang from comment #0) > build/temp.linux-x86_64-3.3/home/msyang/gentoo/var/tmp/portage/dev-lang/ > python-3.3.2-r2/work/Python-3.3.2/Modules/_decimal/libmpdec/mpdecimal.o: > warning: relocation against `mprime_rdx' in readonly section `.text'. Can confirm this one, feels like being related to inline-asm and 64bit, don't have this when building 32bit Prefix (usually I don't do 64bits). And -fPIC is active already. (In reply to Michael Yang from comment #2) > tried emerging dev-lang/python-3.2.5-r3 instead. build.log error: > > x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -L. -Wl,--no-as-needed -o > libpython3.so -Wl,-hlibpython3.so libpython3.2.so > make: *** No rule to make target `@EXPORTSYMS@', needed by `python'. Stop. But cannot reproduce this one.
(In reply to Michael Haubenwallner from comment #6) > (In reply to Michael Yang from comment #1) > > relocation R_X86_64_PC32 against symbol `mprime_rdx' can not be used when > > making a shared object; recompile with -fPIC > > (In reply to Michael Yang from comment #0) > > build/temp.linux-x86_64-3.3/home/msyang/gentoo/var/tmp/portage/dev-lang/ > > python-3.3.2-r2/work/Python-3.3.2/Modules/_decimal/libmpdec/mpdecimal.o: > > warning: relocation against `mprime_rdx' in readonly section `.text'. > > Can confirm this one, feels like being related to inline-asm and 64bit, > don't have this when building 32bit Prefix (usually I don't do 64bits). > And -fPIC is active already. Toolchain seems to be already ours. Not sure why -fPIC isn't default here. > (In reply to Michael Yang from comment #2) > > tried emerging dev-lang/python-3.2.5-r3 instead. build.log error: > > > > x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -L. -Wl,--no-as-needed -o > > libpython3.so -Wl,-hlibpython3.so libpython3.2.so > > make: *** No rule to make target `@EXPORTSYMS@', needed by `python'. Stop. > > But cannot reproduce this one. This was caused by "autoconf" not regenerating for some reason, I forced that in the ebuild now.
Sorry for possibly bumping into WIP but what does the last comment mean from the user's perspective? do we have to download an updated bootstrap script? Thank you very much
>>> Failed to emerge dev-lang/python-3.3.3, Log file: >>> '/mnt/spawn/gentoo-bs/var/tmp/portage/dev-lang/python-3.3.3/temp/build.log' * Messages for package dev-lang/python-3.3.3: * Failed Running autoconf ! * * Include in your bugreport the contents of: * * /mnt/spawn/gentoo-bs/var/tmp/portage/dev-lang/python-3.3.3/temp/autoconf.out * ERROR: dev-lang/python-3.3.3::gentoo_prefix failed (prepare phase): * Failed Running autoconf ! * * Call stack: * ebuild.sh, line 93: Called src_prepare * environment, line 4179: Called eautoconf * environment, line 1056: Called autotools_run_tool '--at-m4flags' 'autoconf' * environment, line 900: Called die * The specific snippet of code: * die "Failed Running $1 !"; * * If you need support, post the output of `emerge --info '=dev-lang/python-3.3.3::gentoo_prefix'`, * the complete build log and the output of `emerge -pqv '=dev-lang/python-3.3.3::gentoo_prefix'`. * The complete build log is located at '/mnt/spawn/gentoo-bs/var/tmp/portage/dev-lang/python-3.3.3/temp/build.log'. * The ebuild environment file is located at '/mnt/spawn/gentoo-bs/var/tmp/portage/dev-lang/python-3.3.3/temp/environment'. * Working directory: '/mnt/spawn/gentoo-bs/var/tmp/portage/dev-lang/python-3.3.3/work/Python-3.3.3' * S: '/mnt/spawn/gentoo-bs/var/tmp/portage/dev-lang/python-3.3.3/work/Python-3.3.3'
I am getting the above now. build.log: http://bpaste.net/show/162191/
This problem is caused by gcc 4.2.4, and independent of prefix: #498640
Er, that should be bug 498640 .
(In reply to Fabian Groffen from comment #7) > This was caused by "autoconf" not regenerating for some reason, I forced > that in the ebuild now. Fixed the same issue in the 3.2.5-r3 ebuild.
The R_X86_64_PC32 problem is caused by a gcc 4.2 bug, which will not be fixed in python. Masking python-3-3 during the bootstrap until the --sync works around the problem, though it's not really a stable long-term solution. Paulo, your problem seems unrelated; if it still exists, please open a new bug for it.