Followup: I just solved my own problem, so I can share my story in case it 
helps...

My system (a big shared cluster) has a modular system for loading/unloading 
standard packages, including Python. The standard python2 provided by the 
system is somewhat older (2.7.3, as you can see from the paths in my 
traceback), so gcc was finding the wrong libraries.

When I unloaded the system Python, gcc couldn't make the same mistake and 
my build succeeded. So you may similarly need to figure out how your build 
is finding outdated local Python libraries and suppress them; it would be 
hard for me to say more without more information, such as your build log.

Best,
Kiran

On Monday, October 5, 2015 at 5:09:07 PM UTC-7, [email protected] wrote:
>
> The same thing just happened to me! Here's the traceback I got:
>
> gcc -pthread -L/gpfs_home/kedlaya/sage-6.8/local/lib  -Xlinker 
> -export-dynamic -o python \
> Modules/python.o \
> -L. -lpython2.7 -lpthread -ldl  -lutil   -lm  
> LD_LIBRARY_PATH=/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src:/gpfs_home/kedlaya/sage-6.8/local/lib:/gpfs/runtime/opt/python/2.7.3/lib:/gpfs/runtime/opt/java/7u5/jre/lib/amd64:/gpfs/runtime/opt/intel/2013.1.106/lib/intel64:/gpfs/runtime/opt/intel/2013.1.106/mkl/lib/intel64:/gpfs/runtime/opt/centos-libs/6.5/lib64:/gpfs/runtime/opt/centos-libs/6.5/lib:/gpfs/runtime/opt/centos-libs/6.5/lib64/mysql:/gpfs/runtime/opt/centos-libs/6.5/lib64/samba
>  
> ./python -E -S -m sysconfig --generate-posix-vars ;\
> if test $? -ne 0 ; then \
> echo "generate-posix-vars failed" ; \
> rm -f ./pybuilddir.txt ; \
> exit 1 ; \
> fi
> Traceback (most recent call last):
>   File 
> "/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src/Lib/site.py",
>  
> line 548, in <module>
>     main()
>   File 
> "/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src/Lib/site.py",
>  
> line 530, in main
>     known_paths = addusersitepackages(known_paths)
>   File 
> "/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src/Lib/site.py",
>  
> line 266, in addusersitepackages
>     user_site = getusersitepackages()
>   File 
> "/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src/Lib/site.py",
>  
> line 241, in getusersitepackages
>     user_base = getuserbase() # this will also set USER_BASE
>   File 
> "/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src/Lib/site.py",
>  
> line 231, in getuserbase
>     USER_BASE = get_config_var('userbase')
>   File 
> "/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src/Lib/sysconfig.py",
>  
> line 520, in get_config_var
>     return get_config_vars().get(name)
>   File 
> "/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src/Lib/sysconfig.py",
>  
> line 472, in get_config_vars
>     _init_posix(_CONFIG_VARS)
>   File 
> "/gpfs_home/kedlaya/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src/Lib/sysconfig.py",
>  
> line 356, in _init_posix
>     from _sysconfigdata import build_time_vars
> ImportError: No module named _sysconfigdata
>
> Kiran
>
> On Tuesday, August 25, 2015 at 7:07:30 AM UTC-7, Volker Braun wrote:
>>
>> Can you post the entire log?
>>
>>
>> On Tuesday, August 25, 2015 at 6:30:43 AM UTC-4, David wrote:
>>>
>>> when I install source code of sage-6.8 in linux, I fail to build python. 
>>> Is that anyone know how to solve it. 
>>>
>>>
>>>
>>>
>>>
>>> ImportError: No module named _sysconfigdata
>>> make[3]: *** [sharedmods] Error 1
>>> make[3]: Leaving directory 
>>> `/picb/molsysbio/usr/caidh/packages/sage-6.8/local/var/tmp/sage/build/python2-2.7.9/src'
>>> Error building Python.
>>>
>>> real    2m30.729s
>>> user    1m35.418s
>>> sys     0m33.839s
>>> ************************************************************************
>>> Error installing package python2-2.7.9
>>> ************************************************************************
>>> Please email sage-devel (http://groups.google.com/group/sage-devel)
>>> explaining the problem and including the relevant part of the log file
>>>   /picb/molsysbio/usr/caidh/packages/sage-6.8/logs/pkgs/python2-2.7.9.log
>>> Describe your computer, operating system, etc.
>>> If you want to try to fix the problem yourself, *don't* just cd to
>>> /picb/molsysbio/usr/caidh/packages/sage-6.8/local/var/tmp/sage/build/python2-2.7.9
>>>  
>>> and type 'make' or whatever is appropriate.
>>> Instead, the following commands setup all environment variables
>>> correctly and load a subshell for you to debug the error:
>>>   (cd 
>>> '/picb/molsysbio/usr/caidh/packages/sage-6.8/local/var/tmp/sage/build/python2-2.7.9'
>>>  
>>> && '/picb/molsysbio/usr/caidh/packages/sage-6.8/sage' --sh)
>>> When you are done debugging, you can type "exit" to leave the subshell.
>>> ************************************************************************
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to