You are not logged in.
Hello,
I got an error installing python-cx_freeze using pip on a virtualenv, so I tried to recompile the official [community] package.
The package won't build: the error is the same as when installing using pip:
gcc -pthread build/temp.linux-x86_64-3.6/source/bases/Console.o -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -L/usr/lib -lpython3.6m -lpython3.6m -o build/lib.linux-x86_64-3.6/cx_Freeze/bases/Console -Xlinker -export-dynamic -lpthread -ldl -lutil -lm -s
lto1: fatal error: bytecode stream in file ‘/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a’ generated with LTO version 5.2 instead of the expected 6.0
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Followed the wiki to download from ABS, and build it in a clean chroot
Any help is appreciated!
Offline
Similar problem in this bug report: https://github.com/numenta/nupic/issues/2102 The dev says, you need to use the older gcc version (in your case 5.2 instead of 6.0) till the problem is fixed upstream. Unfortunately, gcc 5.2 is not in the repos and not in the AUR but you might want to try to add gcc5 as makedepend (it has version 5.4).
Desktop: http://www.sysprofile.de/id15562, Arch Linux | Notebook: Thinkpad L13 Yoga Gen2, Manjaro
The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work. - Tuomas Lukka
Offline
Thanks for the info! tried that but the error persists.
I find it puzzling that I cannot rebuild a package which is distributed in the community repos in binary form, I thought that by definition all packages should be re-buildable in a clean chroot as they are downloaded from ABS.
Offline
Did you also exchange all gcc commands with gcc5 inside the PKGBUILD?
Desktop: http://www.sysprofile.de/id15562, Arch Linux | Notebook: Thinkpad L13 Yoga Gen2, Manjaro
The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work. - Tuomas Lukka
Offline
oops... forgot about that, thanks. But yes, still the error persists.
lto1: fatal error: bytecode stream generated with LTO version 5.2 instead of the expected 4.1 compilation terminated. lto-wrapper: fatal error: /usr/bin/gcc-5 returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status error: command '/usr/bin/gcc-5' failed with exit status 1 ==> ERROR: A failure occurred in package_python-cx_freeze(). Aborting...
@ fede, in case you were wondering what happened to your reply -- you must've clicked "report" rather than quote.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Thanks, forgot about that! The error persists...
lto1: fatal error: bytecode stream generated with LTO version 5.2 instead of the expected 4.1
compilation terminated.
lto-wrapper: fatal error: /usr/bin/gcc-5 returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
error: command '/usr/bin/gcc-5' failed with exit status 1
==> ERROR: A failure occurred in package_python-cx_freeze().
Aborting...
EDIT: corrected error
Last edited by fede (2017-07-02 13:25:59)
Offline
So, I've just noticed that the expected LTO version depends on which version of GCC I use, and since the error is generated by libpython3.6m.a, does this mean that my system python was built using LTO 5.2, ie another GCC version?
If so, re-building python using the current GCC should fix this?
I include the complete error messages, since I notice they may be relevant...
building 'cx_Freeze.util' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/source
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c source/util.c -o build/temp.linux-x86_64-3.6/source/util.o
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/cx_Freeze
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro -Wl,-O1,--sort-common,--as-needed,-z,relro -Wl,-O1,--sort-common,--as-needed,-z,relro -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/source/util.o -L/usr/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/cx_Freeze/util.cpython-36m-x86_64-linux-gnu.so
creating build/temp.linux-x86_64-3.6/source/bases
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c source/bases/Console.c -o build/temp.linux-x86_64-3.6/source/bases/Console.o
creating build/lib.linux-x86_64-3.6/cx_Freeze/bases
gcc -pthread build/temp.linux-x86_64-3.6/source/bases/Console.o -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -L/usr/lib -lpython3.6m -lpython3.6m -o build/lib.linux-x86_64-3.6/cx_Freeze/bases/Console -Xlinker -export-dynamic -lpthread -ldl -lutil -lm -s
lto1: fatal error: bytecode stream in file ‘/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a’ generated with LTO version 5.2 instead of the expected 6.0
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
==> ERROR: A failure occurred in package_python-cx_freeze().
Aborting...
Offline
Assuming that it actually needs gcc 6.0, maybe try gcc6 rather than gcc5? Just guessing.
Desktop: http://www.sysprofile.de/id15562, Arch Linux | Notebook: Thinkpad L13 Yoga Gen2, Manjaro
The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work. - Tuomas Lukka
Offline