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

Robin Dunn <[email protected]>
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
I don't know anything about pyenv, but is there any reason to not use
Python 3.5's built-in virtual environment tool?  Make sure that Ubuntu's
Python 3.5 package and the corresponding -dev package are installed,
download a Phoenix source tar file, and then try something like this:

mkdir ~/tmp-phoenix-build
cd ~/tmp-phoenix-build
pyvenv-3.5 my-py35
source my-py35/bin/activate
pip install -U pip setuptools six wheel
pip wheel wxPython_Phoenix-3.0.3.dev2472+78ae39a.tar.gz

You should end up with a .whl file in ~/tmp-phoenix-build which you can
install in this or other compatible Python 3.5 environments (real or
virtual) on your machine.

Robin


Michael Freeman wrote:
> 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]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.