Re: wxPython Phoenix build fail ("Could not build python extensions"?) in pyenv 3.5.1 on Linux

Michael Freeman <[email protected]>
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
OK. I looked at this again. 

First I don't know how to confirm that my Linux (Ubuntu Xenial) Python waf 
build system (in a "pyenv") is actually fully functional. This should be 
done first as I've only ever installed pure Python modules that need no 
compiling. It could be A. a problem with my Python install. B. Problem with 
system gcc compiler ... and any number of other system problems. So is 
there a waf test file, or at least a known good compile on Linux of some 
other Python module ?

But meanwhile here's a little sleuthing. The "Checking for header 
Python.h: :-(" I thought might be a massive clue. Thought I'd missed the 
obvious ! But Python system "dev" package is installed. But ...

"python-config --includes
-I/home/michaelzfreeman/.pyenv/versions/3.5.1/include/python3.5m 
-I/home/michaelzfreeman/.pyenv/versions/3.5.1/include/python3.5m"

Correct path to "Python.h".

Then it gives the "Getting pyext flags from python-config: Could not build 
python extensions" ... but ...

"python-config --ldflags
-L/home/michaelzfreeman/.pyenv/versions/3.5.1/lib/python3.5/config-3.5m 
-L/home/michaelzfreeman/.pyenv/versions/3.5.1/lib -lpython3.5m -lpthread 
-ldl  -lutil -lm  -Xlinker -export-dynamic"

"pyext" is installed and I can see it.

But looking at "waf" config.log: http://files.djbarney.org/config.log

... (that I did not see before, don't why this it not reported to console) 
shows the real meat of the errors starting at line 418 ...

"['/usr/bin/g++', '-shared', '-pthread', 'test.cpp.1.o', '-o', 
'/tmp/pip-build-k2pgcq1x/wxPython-Phoenix/build/waf/3.5/.conf_check_9814a9ffc41959a7044afc7703702a3d/testbuild/testprog.cpython-35m-x86_64-linux-gnu.so', 
'-Wl,-Bstatic', '-Wl,-Bdynamic', 
'-L/home/michaelzfreeman/.pyenv/versions/3.5.1/lib', 
'-L/home/michaelzfreeman/.pyenv/versions/3.5.1/lib/python3.5/config-3.5m', 
'-lpython3.5m', '-lpthread', '-ldl', '-lutil', '-lm']
err: /usr/bin/ld: 
/home/michaelzfreeman/.pyenv/versions/3.5.1/lib/libpython3.5m.a(pylifecycle.o): 
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making 
a shared object; recompile with -fPIC
/home/michaelzfreeman/.pyenv/versions/3.5.1/lib/libpython3.5m.a: error 
adding symbols: Bad value
collect2: error: ld returned 1 exit status"

Could be some kind of 64 bit/32bit mismatch ? But I'm wildly guessing here.

So I need to find a way of testing my build environment first before 
proceeding (see top).

Michael Z Freeman

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.