gllvm: Error building Python v3.8 and Chromium
I try to integrate it into an automatic CI to generate bitcodes on Arch Linux, while most medium-size applications work, leaving a bunch of applications fails due to objcopy errors.
For example, when building Python v3.8, it throws out errors like this:
objcopy: Programs/python.o: file format not recognized
WARNING:attachBitcodePathToObject: objcopy [--add-section .llvm_bc=/tmp/gllvm867918248 Programs/python.o] failed because exit status 1
gclang -pthread -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -g -fdebug-prefix-map=/builds/prismers/archbc-ci/python/src=/usr/src/debug -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -g -fdebug-prefix-map=/builds/prismers/archbc-ci/python/src=/usr/src/debug -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -g -fdebug-prefix-map=/builds/prismers/archbc-ci/python/src=/usr/src/debug -fno-semantic-interposition -flto -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fprofile-instr-generate -I./Include/internal -I. -I./Include -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -fPIC -DPy_BUILD_CORE -o Python/_warnings.o Python/_warnings.c
The current objcopy version is 2.35 on Arch Linux. Any idea how to resolve it? Thanks.
The full build log: job.txt
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 35 (20 by maintainers)
Commits related to this issue
- Issue #39. — committed to SRI-CSL/gllvm by ianamason 4 years ago
- Issue #39 (take 2). — committed to SRI-CSL/gllvm by ianamason 4 years ago
Well we already pay attention to an environment variable called
LLVM_BITCODE_GENERATION_FLAGSwhen compiling, so I suppose the addition of aLTO_LINKING_FLAGSis not too much of an ask. I want to first figure out why it is not spotting the-fltoflag in the above cases.What should the UI experience be? Just a warning on the output?