Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 490774 - dev-lang/python-3.3.2-r2 sharedmods error
Summary: dev-lang/python-3.3.2-r2 sharedmods error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Linux
: Normal blocker
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-08 19:45 UTC by Michael Yang
Modified: 2014-01-23 06:36 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Yang 2013-11-08 19:45:39 UTC
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!
Comment 1 Michael Yang 2013-11-08 19:48:49 UTC
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'.
Comment 2 Michael Yang 2013-11-08 20:07:02 UTC
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.
Comment 3 Michael Yang 2013-11-08 20:07:30 UTC
Note: python-2.7.5-r4 builds and installs ok
Comment 4 Michael Haubenwallner (RETIRED) gentoo-dev 2013-11-11 07:33:29 UTC
(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...
Comment 5 Michael Haubenwallner (RETIRED) gentoo-dev 2013-11-11 08:04:05 UTC
(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?
Comment 6 Michael Haubenwallner (RETIRED) gentoo-dev 2013-11-11 11:53:13 UTC
(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.
Comment 7 Fabian Groffen gentoo-dev 2013-12-16 18:45:46 UTC
(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.
Comment 8 Paulo Calvo 2013-12-24 03:37:47 UTC
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
Comment 9 Paulo Calvo 2013-12-27 17:08:42 UTC
>>> 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'
Comment 10 Paulo Calvo 2013-12-27 17:09:52 UTC
I am getting the above now.

build.log: http://bpaste.net/show/162191/
Comment 11 Ruud Koolen (RETIRED) archtester gentoo-dev Security 2014-01-20 00:53:16 UTC
This problem is caused by gcc 4.2.4, and independent of prefix: #498640
Comment 12 Ruud Koolen (RETIRED) archtester gentoo-dev Security 2014-01-20 00:54:38 UTC
Er, that should be bug 498640 .
Comment 13 Ruud Koolen (RETIRED) archtester gentoo-dev Security 2014-01-23 02:49:35 UTC
(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.
Comment 14 Ruud Koolen (RETIRED) archtester gentoo-dev Security 2014-01-23 06:36:42 UTC
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.