I have successfully built wxPython-4.0.4 on the Raspberry Pi and Mint 19.1 32 bit but I am running into an error when I build on Mint 19.1 64 bit.
I am building using python 3.7.2 built form source
Building waf:
waf 2.0.8 (abi 20, python 30702f0 on linux)
using /home/eric/Dev/wxPython-4.0.4/bin/waf-2.0.8 --verbose --wx_config=/home/eric/Dev/wxPython-4.0.4/build/wxbld/gtk3/wx-config --verbose --jobs=4 --gtk3 --python=/home/eric/p37/bin/python3 --out=bui\
ld/waf/3.7/gtk3 configure build
I get the following error shown in config.log
[’/usr/bin/g++’, ‘-fPIC’, ‘-g’, ‘-fwrapv’, ‘-O3’, ‘-I/usr/local/include/python3.7m’, ‘-DPYTHONDIR="/usr/local/lib/python3.7/site-packages"’, ‘-DPYTHONARCHDIR="/usr/local/lib/python3.7/site-packages"’, ’
-DHAVE_PYEMBED=1’, ‘-DNDEBUG’, ‘…/test.cpp’, ‘-c’, ‘-o/home/eric/Dev/wxPython-4.0.4/build/waf/3.7/gtk3/.conf_check_5ed09227d81e809ee432aa9f28d30494/testbuild/test.cpp.1.o’]
[2/2] Linking build/waf/3.7/gtk3/.conf_check_5ed09227d81e809ee432aa9f28d30494/testbuild/testprog.cpython-37m-x86_64-linux-gnu.so
[’/usr/bin/g++’, ‘-shared’, ‘-Xlinker’, ‘-export-dynamic’, ‘test.cpp.1.o’, ‘-o/home/eric/Dev/wxPython-4.0.4/build/waf/3.7/gtk3/.conf_check_5ed09227d81e809ee432aa9f28d30494/testbuild/testprog.cpython-37m
-x86_64-linux-gnu.so’, ‘-Wl,-Bstatic’, ‘-Wl,-Bdynamic’, ‘-L/usr/local/lib/python3.7/config-3.7m-x86_64-linux-gnu’, ‘-L/usr/local/lib’, ‘-lpython3.7m’, ‘-lpthread’, ‘-ldl’, ‘-lutil’, ‘-lm’, '-lpython3.7m
‘, ‘-lpthread’, ‘-ldl’, ‘-lutil’, ‘-lm’]
err: /usr/bin/ld: /usr/local/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a(pylifecycle.o): relocation R_X86_64_PC32 against symbol `_PyRuntime’ can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
If I try to build using the python 3.6 as supplied in the distribution I get the following error building waf:
Waf: Entering directory `/home/eric/Dev/wxPython-4.0.4/build/waf/3.6/gtk3’
Traceback (most recent call last):
File “/home/eric/Dev/wxPython-4.0.4/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Scripting.py”, line 118, in waf_entry_point
run_commands()
File “/home/eric/Dev/wxPython-4.0.4/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Scripting.py”, line 178, in run_commands
ctx=run_command(cmd_name)
File “/home/eric/Dev/wxPython-4.0.4/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Scripting.py”, line 169, in run_command
ctx.execute()
File “/home/eric/Dev/wxPython-4.0.4/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Scripting.py”, line 366, in execute
return execute_method(self)
File “/home/eric/Dev/wxPython-4.0.4/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Build.py”, line 93, in execute
self.execute_build()
File “/home/eric/Dev/wxPython-4.0.4/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Build.py”, line 96, in execute_build
self.recurse([self.run_dir])
File “/home/eric/Dev/wxPython-4.0.4/bin/.waf3-2.0.8-206f2b7a89029e71942a2beb9e1bbbbd/waflib/Context.py”, line 126, in recurse
user_function(self)
File “/home/eric/Dev/wxPython-4.0.4/wscript”, line 570, in build
makeETGRule(bld, ‘etg/_core.py’, ‘_core’, ‘WX’)
File “/home/eric/Dev/wxPython-4.0.4/wscript”, line 664, in makeETGRule
source=getEtgSipCppFiles(etg) + rc,
File “/home/eric/Dev/wxPython-4.0.4/buildtools/config.py”, line 645, in getEtgSipCppFiles
return _getSbfValue(etg, ‘sources’)
File “/home/eric/Dev/wxPython-4.0.4/buildtools/config.py”, line 638, in _getSbfValue
for line in open(sbf):
FileNotFoundError: [Errno 2] No such file or directory: ‘sip/cpp/_core.sbf’
Will build using: “/home/eric/p36/bin/python3”
3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]
Python’s architecture is 64bit
cfg.VERSION: 4.0.4
I have verified my package list Mint 19.1 64 bit is the the save as Mint 19.1 32 bit. I also verified I have the same python packages installed on both versions. Everything in requirements.txt loads successfully
Have I overlooked something simple? Should I install the libraries and build a 32 bit version instead?
Thank you,
Eric Nystrom