Building wxPython-4.0.4 on Mint 19.1 64 bit

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

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

Did you use the --enable-shared configure option when building Python?

What command line are you using to do the wxPython build?

Where is your wxPython source coming from? (The source tarball from PyPI? A checkout or archive created from GitHub?)

If I try to build using the python 3.6 as supplied in the distribution I get the following error building waf:

FileNotFoundError: [Errno 2] No such file or directory: ‘sip/cpp/_core.sbf’

This file is included in the PyPI source tarball, but since it is a generated file it is not checked in to git. If you’re using wxPython source code from GitHub then you’ll need to run extra steps to generate the missing files.

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?

As long as you’re using a 64-bit version of Linux and a 64-bit build of Python then the 64-bit build of wxPython would be the preferred configuration.

···

On Wednesday, March 20, 2019 at 9:14:34 AM UTC-7, gloimon@gmail.com wrote:

Robin

I rebuilt python with --enable-shared and the wxPython build is now past the point where it failed.

Thank you for the suggestion.

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

Did you use the --enable-shared configure option when building Python?

No, I assumed that was the default.

What command line are you using to do the wxPython build?

./configure --enable optimizations

Where is your wxPython source coming from? (The source tarball from PyPI? A checkout or archive created from GitHub?)

source from:

Python source from https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

If I try to build using the python 3.6 as supplied in the distribution I get the following error building waf:

FileNotFoundError: [Errno 2] No such file or directory: ‘sip/cpp/_core.sbf’

This file is included in the PyPI source tarball, but since it is a generated file it is not checked in to git. If you’re using wxPython source code from GitHub then you’ll need to run extra steps to generate the missing files.

This error came from using the version of python that came with the distribution. I guess this version will not work for building wxPython.

···

On Wednesday, March 20, 2019 at 1:24:50 PM UTC-4, Robin Dunn wrote:

On Wednesday, March 20, 2019 at 9:14:34 AM UTC-7, glo...@gmail.com wrote:

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?

As long as you’re using a 64-bit version of Linux and a 64-bit build of Python then the 64-bit build of wxPython would be the preferred configuration.

Robin

I rebuilt python with --enable-shared and the wxPython build is now past the point where it failed.

Thank you for the suggestion.

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

Did you use the --enable-shared configure option when building Python?

No, I assumed that was the default.

What command line are you using to do the wxPython build?

./configure --enable optimizations

I asked about your command-line for building wxPython, not Python.

Where is your wxPython source coming from? (The source tarball from PyPI? A checkout or archive created from GitHub?)

source from:

Python source from https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

Same here.

If I try to build using the python 3.6 as supplied in the distribution I get the following error building waf:

FileNotFoundError: [Errno 2] No such file or directory: ‘sip/cpp/_core.sbf’

This file is included in the PyPI source tarball, but since it is a generated file it is not checked in to git. If you’re using wxPython source code from GitHub then you’ll need to run extra steps to generate the missing files.

This error came from using the version of python that came with the distribution. I guess this version will not work for building wxPython.

It should. The error message indicates that either you’re using source from git that hasn’t yet had the generated files created, or that something has happened to your local source tree.

···

On Wednesday, March 20, 2019 at 12:27:46 PM UTC-7, gloimon@gmail.com wrote:

On Wednesday, March 20, 2019 at 1:24:50 PM UTC-4, Robin Dunn wrote:

On Wednesday, March 20, 2019 at 9:14:34 AM UTC-7, glo...@gmail.com wrote:

Robin

Thank you. The build finished and it works now.

I rebuilt python with --enable-shared and the wxPython build is now past the point where it failed.

Thank you for the suggestion.

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

Did you use the --enable-shared configure option when building Python?

No, I assumed that was the default.

What command line are you using to do the wxPython build?

./configure --enable optimizations

I asked about your command-line for building wxPython, not Python.

Sorry

python3 build.py build bdist_wheel --jobs=4

···

On Wednesday, March 20, 2019 at 4:41:43 PM UTC-4, Robin Dunn wrote:

On Wednesday, March 20, 2019 at 12:27:46 PM UTC-7, glo...@gmail.com wrote:

On Wednesday, March 20, 2019 at 1:24:50 PM UTC-4, Robin Dunn wrote:

On Wednesday, March 20, 2019 at 9:14:34 AM UTC-7, glo...@gmail.com wrote:

Where is your wxPython source coming from? (The source tarball from PyPI? A checkout or archive created from GitHub?)

source from:

Python source from https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

Same here.

If I try to build using the python 3.6 as supplied in the distribution I get the following error building waf:

FileNotFoundError: [Errno 2] No such file or directory: ‘sip/cpp/_core.sbf’

This file is included in the PyPI source tarball, but since it is a generated file it is not checked in to git. If you’re using wxPython source code from GitHub then you’ll need to run extra steps to generate the missing files.

This error came from using the version of python that came with the distribution. I guess this version will not work for building wxPython.

It should. The error message indicates that either you’re using source from git that hasn’t yet had the generated files created, or that something has happened to your local source tree.

Robin