wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.21k stars 509 forks source link

Build wxpython on Debian, MX-21, Ubuntu 22.04 failed #2529

Closed DL7BJ closed 3 months ago

DL7BJ commented 3 months ago

Operating system: Debian 12, MX-21, Ubuntu 22.04

wxPython version & source:
git clone --recurse-submodules https://github.com/wxWidgets/Phoenix.git

Python version & source: Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux Repository of Ubuntu 22.04

Description of the problem: On every system the build process exits with same errors.

tom@devix:~/projects/Phoenix$ python3 build.py --gtk3 --use_syswx build_py /home/tom/projects/Phoenix/build.py:44: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.dep_util import newer, newer_group Will build using: "/usr/bin/python3" 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] Python's architecture is 64bit cfg.VERSION: 4.2.2a1

Running command: build_py Checking for /home/tom/projects/Phoenix/bin/waf-2.0.24... "/usr/bin/python3" /home/tom/projects/Phoenix/bin/waf-2.0.24 --wx_config=wx-config --gtk3 --python="/usr/bin/python3" --out=build/waf/3.10/gtk3 configure build Setting top to : /home/tom/projects/Phoenix Setting out to : /home/tom/projects/Phoenix/build/waf/3.10/gtk3 Checking for 'gcc' (C compiler) : /usr/bin/gcc Checking for 'g++' (C++ compiler) : /usr/bin/g++ Checking for program 'python' : /usr/bin/python3 Checking for python version >= 3.7.0 : 3.10.12 python-config : /usr/bin/python3-config Asking python-config for pyext '--cflags --libs --ldflags' flags : yes Testing pyext configuration : yes Finding libs for WX : yes Finding libs for WXADV : yes Finding libs for WXSTC : yes Finding libs for WXHTML : yes Finding libs for WXGL : yes Finding libs for WXWEBVIEW : yes Finding libs for WXXML : yes Finding libs for WXXRC : yes Finding libs for WXRICHTEXT : yes Finding libs for WXMEDIA : yes Finding libs for WXRIBBON : yes Finding libs for WXPROPGRID : yes Finding libs for WXAUI : yes 'configure' finished successfully (0.686s) Waf: Entering directory `/home/tom/projects/Phoenix/build/waf/3.10/gtk3' **** Compiler: gcc --version gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Traceback (most recent call last): File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Scripting.py", line 119, in waf_entry_point run_commands() File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Scripting.py", line 182, in run_commands ctx=run_command(cmd_name) File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Scripting.py", line 173, in run_command ctx.execute() File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Scripting.py", line 375, in execute return execute_method(self) File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Build.py", line 93, in execute self.execute_build() File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Build.py", line 96, in execute_build self.recurse([self.run_dir]) File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Context.py", line 133, in recurse user_function(self) File "/home/tom/projects/Phoenix/wscript", line 538, in build updateLicenseFiles(cfg) File "/home/tom/projects/Phoenix/buildtools/config.py", line 1062, in updateLicenseFiles copy_file(opj('sip', 'siplib', 'LICENSE'), opj('license', 'sip-license.txt'), File "/usr/lib/python3.10/distutils/file_util.py", line 104, in copy_file raise DistutilsFileError( distutils.errors.DistutilsFileError: can't copy 'sip/siplib/LICENSE': doesn't exist or not a regular file Command '"/usr/bin/python3" /home/tom/projects/Phoenix/bin/waf-2.0.24 --wx_config=wx-config --gtk3 --python="/usr/bin/python3" --out=build/waf/3.10/gtk3 configure build ' failed with exit code 2. Finished command: build_py (0.910s)

swt2c commented 3 months ago

Please read the documentation, specifically the instructions about building from a totally clean git workspace: https://github.com/wxWidgets/Phoenix/blob/master/README.rst#example-build-command-lines

DL7BJ commented 3 months ago

Same result as before on a fresh git clone --recurse-submodules with 'python build.py dox etg --nodoc sip build'!

'configure' finished successfully (0.557s)
Waf: Entering directory `/home/tom/projects/Phoenix/build/waf/3.9/gtk3'
**** Compiler: gcc --version
     gcc (Debian 10.2.1-6) 10.2.1 20210110
     Copyright (C) 2020 Free Software Foundation, Inc.
     This is free software; see the source for copying conditions.  There is NO
     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Traceback (most recent call last):
  File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Scripting.py", line 119, in waf_entry_point
    run_commands()
  File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Scripting.py", line 182, in run_commands
    ctx=run_command(cmd_name)
  File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Scripting.py", line 173, in run_command
    ctx.execute()
  File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Scripting.py", line 375, in execute
    return execute_method(self)
  File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Build.py", line 93, in execute
    self.execute_build()
  File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Build.py", line 96, in execute_build
    self.recurse([self.run_dir])
  File "/home/tom/projects/Phoenix/bin/.waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Context.py", line 133, in recurse
    user_function(self)
  File "/home/tom/projects/Phoenix/wscript", line 538, in build
    updateLicenseFiles(cfg)
  File "/home/tom/projects/Phoenix/buildtools/config.py", line 1062, in updateLicenseFiles
    copy_file(opj('sip', 'siplib', 'LICENSE'), opj('license', 'sip-license.txt'),
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/file_util.py", line 104, in copy_file
    raise DistutilsFileError(
distutils.errors.DistutilsFileError: can't copy 'sip/siplib/LICENSE': doesn't exist or not a regular file
Command '"/usr/bin/python3" /home/tom/projects/Phoenix/bin/waf-2.0.24 --wx_config=/home/tom/projects/Phoenix/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/bin/python3" --out=build/waf/3.9/gtk3 configure build ' failed with exit code 2.
Finished command: build_py (0.737s)
Finished command: build (0m1.21s)

Commenting out line 1062 in buildtools/config.py and made a 'touch license/sip-license.txt' resolves the problem. A LICENSE file in sip/siplib don't resolves it, because it is deleted with every new build.

After that, the build with 'python3 build.py --gtk3 --use_syswx build_py' is ok.

swt2c commented 3 months ago

What version of sip did you use? Currently we build with 6.8.3.

DL7BJ commented 3 months ago

What version of sip did you use? Currently we build with 6.8.3.

It's sip 6.8.3. The header of all files in sip/cpp shows 'Generated by SIP 6.8.3 and all tools like sip-distinfo, sip-build shows also 6.8.3 tom@amarok:~$ sip-build -V 6.8.3

Where comes the file LICENSE from? I can't find a file with this name in any Python relevant folder or the Phoenix folder (only for src/png and src/zlib in ext/wxWidgets) Do you have a suggestion for the original path?

swt2c commented 3 months ago

It's generated during the build during this step: https://github.com/wxWidgets/Phoenix/blob/master/build.py#L1402

DL7BJ commented 3 months ago

Okay, I pull again from github and log the build process. The log is attached. After build the tar archive in /tmp is deleted, so I try sip-module --sdist --abi-version 12.9 --target-dir /tmp/ wx.siplib on console. Here is the list of content:

tom@amarok:~/projects/Phoenix$ tar -tzvhf /tmp/wx_siplib-12.14.0.tar.gz
drwxr-xr-x tom/tom           0 2024-02-15 23:03 wx_siplib-12.14.0/
-rw-r--r-- tom/tom          52 2024-02-15 23:03 wx_siplib-12.14.0/MANIFEST.in
-rw-r--r-- tom/tom         467 2024-02-15 23:03 wx_siplib-12.14.0/PKG-INFO
-rw-r--r-- tom/tom         105 2024-02-15 23:03 wx_siplib-12.14.0/README
-rw-r--r-- tom/tom        7252 2024-02-15 23:03 wx_siplib-12.14.0/apiversions.c
-rw-r--r-- tom/tom         847 2024-02-15 23:03 wx_siplib-12.14.0/bool.cpp
-rw-r--r-- tom/tom       13534 2024-02-15 23:03 wx_siplib-12.14.0/descriptors.c
-rw-r--r-- tom/tom        8419 2024-02-15 23:03 wx_siplib-12.14.0/int_convertors.c
-rw-r--r-- tom/tom       13793 2024-02-15 23:03 wx_siplib-12.14.0/objmap.c
-rw-r--r-- tom/tom          57 2024-02-15 23:03 wx_siplib-12.14.0/pyproject.toml
-rw-r--r-- tom/tom       18562 2024-02-15 23:03 wx_siplib-12.14.0/qtlib.c
-rw-r--r-- tom/tom         293 2024-02-15 23:03 wx_siplib-12.14.0/setup.cfg
-rw-r--r-- tom/tom        1627 2024-02-15 23:03 wx_siplib-12.14.0/setup.py
-rw-r--r-- tom/tom       57197 2024-02-15 23:03 wx_siplib-12.14.0/sip.h
-rw-r--r-- tom/tom       21002 2024-02-15 23:03 wx_siplib-12.14.0/sip_array.c
-rw-r--r-- tom/tom        1285 2024-02-15 23:03 wx_siplib-12.14.0/sip_array.h
-rw-r--r-- tom/tom        6645 2024-02-15 23:03 wx_siplib-12.14.0/sipint.h
-rw-r--r-- tom/tom      353812 2024-02-15 23:03 wx_siplib-12.14.0/siplib.c
-rw-r--r-- tom/tom        4786 2024-02-15 23:03 wx_siplib-12.14.0/threads.c
-rw-r--r-- tom/tom       18981 2024-02-15 23:03 wx_siplib-12.14.0/voidptr.c
drwxr-xr-x tom/tom           0 2024-02-15 23:03 wx_siplib-12.14.0/wx_siplib.egg-info/
-rw-r--r-- tom/tom         467 2024-02-15 23:03 wx_siplib-12.14.0/wx_siplib.egg-info/PKG-INFO
-rw-r--r-- tom/tom         323 2024-02-15 23:03 wx_siplib-12.14.0/wx_siplib.egg-info/SOURCES.txt
-rw-r--r-- tom/tom           1 2024-02-15 23:03 wx_siplib-12.14.0/wx_siplib.egg-info/dependency_links.txt
-rw-r--r-- tom/tom           3 2024-02-15 23:03 wx_siplib-12.14.0/wx_siplib.egg-info/top_level.txt

It seems, there is no LICENSE file.

I'm not a Python programmer, I need a actually wxWidgets and wxPython to build KiCad-8.0.0-RC2. I am a developer for Hardware and Microcontrollers ;-)

build.log

swt2c commented 3 months ago

That is really strange.

$ python3 -m venv env
$ source env/bin/activate
(env) $ pip install sip
Collecting sip
  Using cached sip-6.8.3-py3-none-any.whl (573 kB)
Collecting packaging
  Using cached packaging-23.2-py3-none-any.whl (53 kB)
Collecting tomli
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Requirement already satisfied: setuptools in ./env/lib/python3.10/site-packages (from sip) (59.6.0)
Installing collected packages: tomli, packaging, sip
Successfully installed packaging-23.2 sip-6.8.3 tomli-2.0.1
(env) $ sip-module --sdist --abi-version 12.9 --target-dir /tmp/ wx.siplib
(env) $ tar -tvf /tmp/wx_siplib-12.14.0.tar.gz 
drwxrwxr-x stalbert/stalbert 0 2024-02-15 17:28 wx_siplib-12.14.0/
-rw-rw-r-- stalbert/stalbert 2766 2024-02-15 17:28 wx_siplib-12.14.0/LICENSE
-rw-rw-r-- stalbert/stalbert 18161 2024-02-15 17:28 wx_siplib-12.14.0/LICENSE-GPL2
-rw-rw-r-- stalbert/stalbert 35297 2024-02-15 17:28 wx_siplib-12.14.0/LICENSE-GPL3
-rw-rw-r-- stalbert/stalbert    52 2024-02-15 17:28 wx_siplib-12.14.0/MANIFEST.in
-rw-rw-r-- stalbert/stalbert   500 2024-02-15 17:28 wx_siplib-12.14.0/PKG-INFO
-rw-rw-r-- stalbert/stalbert   105 2024-02-15 17:28 wx_siplib-12.14.0/README
-rw-rw-r-- stalbert/stalbert  7252 2024-02-15 17:28 wx_siplib-12.14.0/apiversions.c
-rw-rw-r-- stalbert/stalbert   847 2024-02-15 17:28 wx_siplib-12.14.0/bool.cpp
-rw-rw-r-- stalbert/stalbert 13534 2024-02-15 17:28 wx_siplib-12.14.0/descriptors.c
-rw-rw-r-- stalbert/stalbert  8419 2024-02-15 17:28 wx_siplib-12.14.0/int_convertors.c
-rw-rw-r-- stalbert/stalbert 13793 2024-02-15 17:28 wx_siplib-12.14.0/objmap.c
-rw-rw-r-- stalbert/stalbert    57 2024-02-15 17:28 wx_siplib-12.14.0/pyproject.toml
-rw-rw-r-- stalbert/stalbert 18562 2024-02-15 17:28 wx_siplib-12.14.0/qtlib.c
-rw-rw-r-- stalbert/stalbert   293 2024-02-15 17:28 wx_siplib-12.14.0/setup.cfg
-rw-rw-r-- stalbert/stalbert  1627 2024-02-15 17:28 wx_siplib-12.14.0/setup.py
-rw-rw-r-- stalbert/stalbert 57197 2024-02-15 17:28 wx_siplib-12.14.0/sip.h
-rw-rw-r-- stalbert/stalbert 21002 2024-02-15 17:28 wx_siplib-12.14.0/sip_array.c
-rw-rw-r-- stalbert/stalbert  1285 2024-02-15 17:28 wx_siplib-12.14.0/sip_array.h
-rw-rw-r-- stalbert/stalbert  6645 2024-02-15 17:28 wx_siplib-12.14.0/sipint.h
-rw-rw-r-- stalbert/stalbert 353812 2024-02-15 17:28 wx_siplib-12.14.0/siplib.c
-rw-rw-r-- stalbert/stalbert   4786 2024-02-15 17:28 wx_siplib-12.14.0/threads.c
-rw-rw-r-- stalbert/stalbert  18981 2024-02-15 17:28 wx_siplib-12.14.0/voidptr.c
drwxrwxr-x stalbert/stalbert      0 2024-02-15 17:28 wx_siplib-12.14.0/wx_siplib.egg-info/
-rw-rw-r-- stalbert/stalbert    500 2024-02-15 17:28 wx_siplib-12.14.0/wx_siplib.egg-info/PKG-INFO
-rw-rw-r-- stalbert/stalbert    357 2024-02-15 17:28 wx_siplib-12.14.0/wx_siplib.egg-info/SOURCES.txt
-rw-rw-r-- stalbert/stalbert      1 2024-02-15 17:28 wx_siplib-12.14.0/wx_siplib.egg-info/dependency_links.txt
-rw-rw-r-- stalbert/stalbert      3 2024-02-15 17:28 wx_siplib-12.14.0/wx_siplib.egg-info/top_level.txt
swt2c commented 3 months ago

I am not sure what the difference could be. setuptools version perhaps? What version of setuptools are you using?

DL7BJ commented 3 months ago

I think it was setuptools. I read something about Python and build it in a virtual environment. This was okay and the LICENSE file exists. My installed setuptools are 52 (Debian 11 Repository), in the virtual env 69. Thanks for your help!

decodeais commented 2 months ago

I try to compile the latest version for Python 3.11.5 on Linux Mint 5.15.0-94-generic. Because of your hint I tried upgrade setuptools:

Requirement already satisfied: setuptools in /home/jps/miniconda3/lib/python3.11/site-packages (69.1.0)

It was already Version 69, but i still missing the License File:

raise DistutilsFileError(
     distutils.errors.DistutilsFileError: can't copy 'sip/siplib/LICENSE': doesn't exist or not a regular file

May be there is still a problem.

Newbytee commented 2 months ago

I still have this issue as well with setupotools 69.0.3. Using the Freedesktop SDK version 23.08.

decodeais commented 2 months ago

I got this error message too: distutils.errors.DistutilsFileError: can't copy 'sip/siplib/LICENSE': doesn't exist or not a regular file

I think my mistake was to start biuld without sip command: python build.py dox etg --nodoc sip build bdist_wheel May be this script helbs you, it worked on Linux Mint and Rasbian: https://github.com/wxWidgets/Phoenix/issues/2534#issuecomment-1967240640