Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyInstaller 5.10.0 failed to install on older GCC #7592

Closed
arossert opened this issue Apr 25, 2023 · 4 comments · Fixed by #7597
Closed

PyInstaller 5.10.0 failed to install on older GCC #7592

arossert opened this issue Apr 25, 2023 · 4 comments · Fixed by #7597

Comments

@arossert
Copy link
Contributor

Bootloader is failing to build after upgrading to the latest 5.10.0 (and 5.10.1).
Installing using pip and compiling the bootloader does work on version 5.9.0

Trying to install it with pip I'm getting this error:

Building wheels for collected packages: pyinstaller
  Building wheel for pyinstaller (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pyinstaller (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      running bdist_wheel
      running build
      running build_bootloader
      Setting top to                           : /tmp/pip-install-61otzijh/pyinstaller_c0f56d7561ed45368b57debd7b86d3b8/bootloader
      Setting out to                           : /tmp/pip-install-61otzijh/pyinstaller_c0f56d7561ed45368b57debd7b86d3b8/bootloader/build
      Python Version                           : 3.8.10 (default, Apr 24 2023, 18:36:34) [GCC 4.4.3]
      Checking for 'gcc' (C compiler)          : /usr/bin/gcc
      Checking size of pointer                 : 8
      Platform                                 : Linux-64bit-intel detected based on compiler
      Checking for compiler flags -m64         : yes
      Checking for linker flags -m64           : yes
      Checking for library dl                  : not found
      The configuration failed
      (complete log in /tmp/pip-install-61otzijh/pyinstaller_c0f56d7561ed45368b57debd7b86d3b8/bootloader/build/config.log)
      No precompiled bootloader found or compile forced. Trying to compile the bootloader for you ...
      ERROR: Failed compiling the bootloader. Please compile manually and rerun setup.py
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyinstaller
Failed to build pyinstaller
ERROR: Could not build wheels for pyinstaller, which is required to install pyproject.toml-based projects

So I tried to download and compile the bootloader manually and this is the output:

# project PyInstallerBootloader (nodist) configured on Tue Apr 25 05:16:03 2023 by
# waf 2.0.20 (abi 20, python 3080af0 on linux)
# using ./waf configure
#
----------------------------------------
Setting top to
/pyinstaller-5.10.1/bootloader
----------------------------------------
Setting out to
/pyinstaller-5.10.1/bootloader/build
----------------------------------------
Python Version
3.8.10 (default, Apr 24 2023, 18:36:34) [GCC 4.4.3]
----------------------------------------
Checking for 'gcc' (C compiler)
find program=['gcc', 'cc'] paths=['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin'] var='CC' -> ['/usr/bin/gcc']
['/usr/bin/gcc', '-dM', '-E', '-']
out: #define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __FLT_EVAL_METHOD__ 0
#define __unix__ 1
#define __x86_64 1
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __GNUC_PATCHLEVEL__ 3
#define __DEC64_MAX_EXP__ 385
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __UINTMAX_TYPE__ long unsigned int
#define __linux 1
#define __DEC32_EPSILON__ 1E-6DF
#define __unix 1
#define __LDBL_MAX_EXP__ 16384
#define __linux__ 1
#define __SCHAR_MAX__ 127
#define __DBL_DIG__ 15
#define _FORTIFY_SOURCE 2
#define __SIZEOF_INT__ 4
#define __SIZEOF_POINTER__ 8
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __FLT_EPSILON__ 1.19209290e-7F
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define __DEC32_MAX__ 9.999999E96DF
#define __SIZEOF_LONG__ 8
#define __DECIMAL_DIG__ 21
#define __gnu_linux__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __GNUC__ 4
#define __MMX__ 1
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 16
#define __BIGGEST_ALIGNMENT__ 16
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_HAS_INFINITY__ 1
#define __DEC32_MIN_EXP__ (-94)
#define __LDBL_HAS_DENORM__ 1
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __DEC32_MIN__ 1E-95DF
#define __DBL_MAX_EXP__ 1024
#define __DEC128_EPSILON__ 1E-33DL
#define __SSE2_MATH__ 1
#define __amd64 1
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __SIZEOF_SIZE_T__ 8
#define __SIZEOF_WINT_T__ 4
#define __GCC_HAVE_DWARF2_CFI_ASM 1
#define __GXX_ABI_VERSION 1002
#define __FLT_MIN_EXP__ (-125)
#define __DBL_MIN__ 2.2250738585072014e-308
#define __LP64__ 1
#define __DECIMAL_BID_FORMAT__ 1
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __DBL_HAS_DENORM__ 1
#define __NO_INLINE__ 1
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "4.4.3"
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC128_MIN_EXP__ (-6142)
#define unix 1
#define __SIZE_TYPE__ long unsigned int
#define __ELF__ 1
#define __FLT_RADIX__ 2
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __SSE_MATH__ 1
#define __k8 1
#define __SIZEOF_PTRDIFF_T__ 8
#define __x86_64__ 1
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 9223372036854775807L
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __CHAR16_TYPE__ short unsigned int
#define __DEC64_MANT_DIG__ 16
#define __DEC32_MAX_EXP__ 97
#define linux 1
#define __SSE2__ 1
#define __LDBL_MANT_DIG__ 64
#define __DBL_HAS_QUIET_NAN__ 1
#define __k8__ 1
#define __WCHAR_TYPE__ int
#define __SIZEOF_FLOAT__ 4
#define __DEC64_MIN_EXP__ (-382)
#define __FLT_DIG__ 6
#define __INT_MAX__ 2147483647
#define __amd64__ 1
#define __FLT_MAX_EXP__ 128
#define __DBL_MANT_DIG__ 53
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ unsigned int
#define __SIZEOF_SHORT__ 2
#define __SSE__ 1
#define __LDBL_MIN_EXP__ (-16381)
#define __SSP__ 1
#define __LDBL_MAX_10_EXP__ 4932
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define _LP64 1
#define __SIZEOF_WCHAR_T__ 4
#define __DEC_EVAL_METHOD__ 2
#define __INTMAX_MAX__ 9223372036854775807L
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __CHAR32_TYPE__ unsigned int
#define __FLT_MAX__ 3.40282347e+38F
#define __SIZEOF_DOUBLE__ 8
#define __FLT_MIN_10_EXP__ (-37)
#define __INTMAX_TYPE__ long int
#define __DEC128_MAX_EXP__ 6145
#define __GNUC_MINOR__ 4
#define __DEC32_MANT_DIG__ 7
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
#define __STDC__ 1
#define __PTRDIFF_TYPE__ long int
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-4931)
#define __SIZEOF_LONG_LONG__ 8
#define __LDBL_DIG__ 18
#define __GNUC_GNU_INLINE__ 1

find program=['ar'] paths=['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin'] var='AR' -> ['/usr/bin/ar']
==>

int main(int argc, char **argv) {
	(void)argc; (void)argv;
	return 0;
}

<==
[1/2] Compiling build/.conf_check_8388e72406c4bcc2319bc3c645ca15d1/test.c

['/usr/bin/gcc', '-fPIC', '../test.c', '-c', '-o/pyinstaller-5.10.1/bootloader/build/.conf_check_8388e72406c4bcc2319bc3c645ca15d1/testbuild/test.c.1.o']
[2/2] Linking build/.conf_check_8388e72406c4bcc2319bc3c645ca15d1/testbuild/libtestprog.so

['/usr/bin/gcc', '-shared', 'test.c.1.o', '-o', '/pyinstaller-5.10.1/bootloader/build/.conf_check_8388e72406c4bcc2319bc3c645ca15d1/testbuild/libtestprog.so', '-Wl,-Bstatic', '-Wl,-Bdynamic']
/usr/bin/gcc
----------------------------------------
Checking size of pointer
==>

        int main() {
            static int test_array[1 - 2 * !(sizeof(void *) == 4)];
            test_array[0] = 0;
            return 0;
        }
<==
[1/2] Compiling build/.conf_check_872c286f38df153a24ac5bcfe41e9b63/test.c

['/usr/bin/gcc', '../test.c', '-c', '-o/pyinstaller-5.10.1/bootloader/build/.conf_check_872c286f38df153a24ac5bcfe41e9b63/testbuild/test.c.1.o']
err: ../test.c: In function 'main':
../test.c:3: error: size of array 'test_array' is negative

from /pyinstaller-5.10.1/bootloader: Test does not build: Traceback (most recent call last):
  File "/pyinstaller-5.10.1/bootloader/waflib/Configure.py", line 383, in run_build
    bld.compile()
  File "/pyinstaller-5.10.1/bootloader/waflib/Build.py", line 191, in compile
    raise Errors.BuildError(self.producer.error)
waflib.Errors.BuildError: Build failed
 -> task in 'testprog' failed with exit status 1 (run with -v to display more information)

from /pyinstaller-5.10.1/bootloader: The configuration failed
==>

        int main() {
            static int test_array[1 - 2 * !(sizeof(void *) == 8)];
            test_array[0] = 0;
            return 0;
        }
<==
[1/2] Compiling build/.conf_check_a8ad87771e9a4b2c98c8c0c285bcd21b/test.c

['/usr/bin/gcc', '../test.c', '-c', '-o/pyinstaller-5.10.1/bootloader/build/.conf_check_a8ad87771e9a4b2c98c8c0c285bcd21b/testbuild/test.c.1.o']
[2/2] Linking build/.conf_check_a8ad87771e9a4b2c98c8c0c285bcd21b/testbuild/testprog

['/usr/bin/gcc', 'test.c.1.o', '-o', '/pyinstaller-5.10.1/bootloader/build/.conf_check_a8ad87771e9a4b2c98c8c0c285bcd21b/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic']
8
----------------------------------------
Platform
Linux-64bit-intel detected based on compiler
----------------------------------------
Checking for compiler flags -m64
==>

int main(int argc, char **argv) {
	(void)argc; (void)argv;
	return 0;
}

<==
[1/1] Compiling build/.conf_check_a5af4fed87bfebd5a08c34f51a929f62/test.c

['/usr/bin/gcc', '-m64', '../test.c', '-c', '-o/pyinstaller-5.10.1/bootloader/build/.conf_check_a5af4fed87bfebd5a08c34f51a929f62/testbuild/test.c.1.o']
yes
----------------------------------------
Checking for linker flags -m64
==>

int main(int argc, char **argv) {
	(void)argc; (void)argv;
	return 0;
}

<==
[1/2] Compiling build/.conf_check_dba6f373d65fae0d664846477d067c82/test.c

['/usr/bin/gcc', '-m64', '../test.c', '-c', '-o/pyinstaller-5.10.1/bootloader/build/.conf_check_dba6f373d65fae0d664846477d067c82/testbuild/test.c.1.o']
[2/2] Linking build/.conf_check_dba6f373d65fae0d664846477d067c82/testbuild/testprog

['/usr/bin/gcc', '-m64', 'test.c.1.o', '-o', '/pyinstaller-5.10.1/bootloader/build/.conf_check_dba6f373d65fae0d664846477d067c82/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic']
yes
----------------------------------------
Checking for library dl
==>

int main(int argc, char **argv) {
	(void)argc; (void)argv;
	return 0;
}

<==
[1/2] Compiling build/.conf_check_7f4bda2539af68cac4bfceb0cd41b238/test.c

['/usr/bin/gcc', '-m64', '-O2', '-Wall', '-Werror', '-Wno-error=unused-variable', '-Wno-error=unused-but-set-variable', '-Wno-error=unused-function', '-U_FORTIFY_SOURCE', '-D_REENTRANT', '-D_BSD_SOURCE', '-D_DEFAULT_SOURCE', '-D_FORTIFY_SOURCE=2', '../test.c', '-c', '-o/pyinstaller-5.10.1/bootloader/build/.conf_check_7f4bda2539af68cac4bfceb0cd41b238/testbuild/test.c.1.o']
err: cc1: error: -Werror=unused-but-set-variable: No option -Wunused-but-set-variable

from /pyinstaller-5.10.1/bootloader: Test does not build: Traceback (most recent call last):
  File "/pyinstaller-5.10.1/bootloader/waflib/Configure.py", line 383, in run_build
    bld.compile()
  File "/pyinstaller-5.10.1/bootloader/waflib/Build.py", line 191, in compile
    raise Errors.BuildError(self.producer.error)
waflib.Errors.BuildError: Build failed
 -> task in 'testprog' failed with exit status 1 (run with -v to display more information)

not found
from /pyinstaller-5.10.1/bootloader: The configuration failed

PyInstaller version: 5.10.0 / 5.10.1
Python version: 3.8.10
OS: Linux

FYI, I'm using an old Linux version to support older systems
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
ldd (Ubuntu EGLIBC 2.11.1-0ubuntu7.21) 2.11.1

@arossert arossert added the triage Please triage and relabel this issue label Apr 25, 2023
@rokm
Copy link
Member

rokm commented Apr 25, 2023

That would be f5fd0a2 - we should put -Wno-error=unused-but-set-variable behind the check.

Can you check if https://github.com/rokm/pyinstaller/tree/bootloader-gcc-4.4.3 fixes the problem?

@rokm rokm removed the triage Please triage and relabel this issue label Apr 25, 2023
@arossert
Copy link
Contributor Author

@rokm Yes, this branch worked in my case

root@90e9c8f66a65:/pyinstaller-bootloader-gcc-4.4.3# pyinstaller --version
5.10.1

@arossert
Copy link
Contributor Author

arossert commented May 10, 2023

@rokm Any plans to release a new version with this fix?

@rokm
Copy link
Member

rokm commented May 10, 2023

I don't think we're planning a hotfix release for this, if that's what you're asking.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants