Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 618084 - sys-devel/llvm-3.9.1-r1: build failure on x32: /usr/lib/libffi.so: error adding symbols: File in wrong format
Summary: sys-devel/llvm-3.9.1-r1: build failure on x32: /usr/lib/libffi.so: error addi...
Status: RESOLVED DUPLICATE of bug 426936
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL: https://forums.gentoo.org/viewtopic-t...
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2017-05-10 06:09 UTC by Dainius Masiliūnas
Modified: 2017-11-10 07:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,42.63 KB, application/gzip)
2017-05-10 06:09 UTC, Dainius Masiliūnas
Details
emerge --info (emerge-info.log,5.39 KB, text/plain)
2017-05-10 06:14 UTC, Dainius Masiliūnas
Details
work around patch (ffi.patch,491 bytes, patch)
2017-05-10 10:11 UTC, iGentoo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dainius Masiliūnas 2017-05-10 06:09:50 UTC
Created attachment 472250 [details]
build.log.gz

When attempting to compile llvm-3.9.1-r1 on x32, I encounter a build failure seemingly due to multilib issues:

[1113/1416] /usr/bin/x86_64-pc-linux-gnux32-g++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/ExecutionEngine/Interpreter -I/var/tmp/portage/sys-devel/llvm-3.9.1-r1/work/llvm-3.9.1.src/lib/ExecutionEngine/Interpreter -Iinclude -I/var/tmp/portage/sys-devel/llvm-3.9.1-r1/work/llvm-3.9.1.src/include -I/usr/libx32/libffi-3.2.1/include  -DNDEBUG -O2 -pipe -march=native -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -fPIC -MD -MT lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Interpreter.cpp.o -MF lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Interpreter.cpp.o.d -o lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Interpreter.cpp.o -c /var/tmp/portage/sys-devel/llvm-3.9.1-r1/work/llvm-3.9.1.src/lib/ExecutionEngine/Interpreter/Interpreter.cpp
[1114/1416] : && /usr/bin/x86_64-pc-linux-gnux32-g++ -fPIC -O2 -pipe -march=native -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections  -Wl,-O1 -Wl,--as-needed -Wl,-z,defs   -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libLLVMInterpreter.so.39 -o libx32/libLLVMInterpreter.so.39.1 lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Execution.cpp.o lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/ExternalFunctions.cpp.o lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Interpreter.cpp.o  -Wl,-rpath,"\$ORIGIN/../libx32" libx32/libLLVMCodeGen.so.39.1 libx32/libLLVMCore.so.39.1 libx32/libLLVMExecutionEngine.so.39.1 libx32/libLLVMSupport.so.39.1 /usr/lib/libffi.so && :
FAILED: libx32/libLLVMInterpreter.so.39.1 
: && /usr/bin/x86_64-pc-linux-gnux32-g++ -fPIC -O2 -pipe -march=native -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections  -Wl,-O1 -Wl,--as-needed -Wl,-z,defs   -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libLLVMInterpreter.so.39 -o libx32/libLLVMInterpreter.so.39.1 lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Execution.cpp.o lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/ExternalFunctions.cpp.o lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Interpreter.cpp.o  -Wl,-rpath,"\$ORIGIN/../libx32" libx32/libLLVMCodeGen.so.39.1 libx32/libLLVMCore.so.39.1 libx32/libLLVMExecutionEngine.so.39.1 libx32/libLLVMSupport.so.39.1 /usr/lib/libffi.so && :
/usr/lib/libffi.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status

It is attempting to link /usr/lib/libffi.so, but it should link /usr/libx32/libffi.so.

The same issue was mentioned on the forums for x86 multilib (see url field).
Comment 1 Dainius Masiliūnas 2017-05-10 06:14:55 UTC
Created attachment 472252 [details]
emerge --info
Comment 2 iGentoo 2017-05-10 10:11:37 UTC
Created attachment 472264 [details, diff]
work around patch
Comment 3 EoD 2017-11-10 00:52:16 UTC
I am pretty sure this is a duplicate of bug 426936
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-11-10 07:20:35 UTC

*** This bug has been marked as a duplicate of bug 426936 ***