[LLVMbugs] [Bug 24349] New: [Backend: AMDGPU] recipe for target 'bindings/ocaml/backends/llvm_AMDGPU.cma' failed when crosscompiling

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 3 22:14:47 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24349

            Bug ID: 24349
           Summary: [Backend: AMDGPU] recipe for target
                    'bindings/ocaml/backends/llvm_AMDGPU.cma' failed when
                    crosscompiling
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: alexandre.f.demers at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This is what I get when building on a x86_64 cpu to generate the x86 32bit
libraries: 
bindings/ocaml/backends/CMakeFiles/ocaml_llvm_AMDGPU.dir/build.make:71: recipe
for target 'bindings/ocaml/backends/llvm_AMDGPU.cma' failed

Here is the full output about this failure:
(...)
[ 85%] Linking CXX shared library ../../libLLVMSystemZCodeGen.so
[ 85%] Built target LLVMSystemZCodeGen
Copying OCaml library component llvm_AArch64.cma to intermediate area
Copying OCaml library component libllvm_AArch64.a to intermediate area
Copying OCaml library component llvm_AArch64.cmxa to intermediate area
Copying OCaml library component llvm_AArch64.a to intermediate area
Copying OCaml library component llvm_AArch64.cmi to intermediate area
Copying OCaml library component llvm_AArch64.cmx to intermediate area
Copying OCaml library component dllllvm_AArch64.so to intermediate area
[ 86%] Built target ocaml_llvm_AArch64
[ 86%] Building OCaml library llvm_AMDGPU
findlib: [WARNING] Interface llvm_AArch64.cmi occurs in several directories:
/usr/lib/ocaml, .
findlib: [WARNING] Interface llvm_CppBackend.cmi occurs in several directories:
/usr/lib/ocaml, .
findlib: [WARNING] Interface llvm_MSP430.cmi occurs in several directories:
/usr/lib/ocaml, .
findlib: [WARNING] Interface llvm_ARM.cmi occurs in several directories:
/usr/lib/ocaml, .
findlib: [WARNING] Interface llvm_Hexagon.cmi occurs in several directories:
/usr/lib/ocaml, .
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMAMDGPUCodeGen.so
when searching for -lLLVMAMDGPUCodeGen
/usr/bin/ld: cannot find -lLLVMAMDGPUCodeGen
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMipo.so when
searching for -lLLVMipo
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMVectorize.so
when searching for -lLLVMVectorize
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMSelectionDAG.so
when searching for -lLLVMSelectionDAG
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMAsmPrinter.so
when searching for -lLLVMAsmPrinter
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMCodeGen.so
when searching for -lLLVMCodeGen
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMTarget.so
when searching for -lLLVMTarget
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMScalarOpts.so
when searching for -lLLVMScalarOpts
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMProfileData.so
when searching for -lLLVMProfileData
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMObject.so
when searching for -lLLVMObject
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMBitReader.so
when searching for -lLLVMBitReader
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMInstCombine.so
when searching for -lLLVMInstCombine
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMInstrumentation.so
when searching for -lLLVMInstrumentation
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMTransformUtils.so
when searching for -lLLVMTransformUtils
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMipa.so when
searching for -lLLVMipa
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMAnalysis.so
when searching for -lLLVMAnalysis
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMCore.so when
searching for -lLLVMCore
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMAMDGPUAsmParser.so
when searching for -lLLVMAMDGPUAsmParser
/usr/bin/ld: cannot find -lLLVMAMDGPUAsmParser
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMMCParser.so
when searching for -lLLVMMCParser
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMAMDGPUUtils.so
when searching for -lLLVMAMDGPUUtils
/usr/bin/ld: cannot find -lLLVMAMDGPUUtils
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMAMDGPUDesc.so
when searching for -lLLVMAMDGPUDesc
/usr/bin/ld: cannot find -lLLVMAMDGPUDesc
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMAMDGPUInfo.so
when searching for -lLLVMAMDGPUInfo
/usr/bin/ld: cannot find -lLLVMAMDGPUInfo
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMAMDGPUAsmPrinter.so
when searching for -lLLVMAMDGPUAsmPrinter
/usr/bin/ld: cannot find -lLLVMAMDGPUAsmPrinter
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMMC.so when
searching for -lLLVMMC
/usr/bin/ld: skipping incompatible
/home/ademers/projects/Arch/lib32-llvm-svn/src/build/./lib/libLLVMSupport.so
when searching for -lLLVMSupport
collect2: error: ld returned 1 exit status
bindings/ocaml/backends/CMakeFiles/ocaml_llvm_AMDGPU.dir/build.make:71: recipe
for target 'bindings/ocaml/backends/llvm_AMDGPU.cma' failed
make[2]: *** [bindings/ocaml/backends/llvm_AMDGPU.cma] Error 2
CMakeFiles/Makefile2:12334: recipe for target
'bindings/ocaml/backends/CMakeFiles/ocaml_llvm_AMDGPU.dir/all' failed
make[1]: *** [bindings/ocaml/backends/CMakeFiles/ocaml_llvm_AMDGPU.dir/all]
Error 2
make[1]: *** Waiting for unfinished jobs....
[ 86%] Building CXX object
lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonTargetMachine.cpp.o
[ 86%] Building CXX object
lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonTargetObjectFile.cpp.o
[ 86%] Building CXX object
lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonVLIWPacketizer.cpp.o
[ 86%] Building CXX object
lib/Target/XCore/CMakeFiles/LLVMXCoreCodeGen.dir/XCoreLowerThreadLocal.cpp.o
[ 86%] Linking CXX shared library ../../libLLVMSparcCodeGen.so
[ 86%] Built target LLVMSparcCodeGen
[ 86%] Building CXX object
lib/Target/XCore/CMakeFiles/LLVMXCoreCodeGen.dir/XCoreMachineFunctionInfo.cpp.o
(...)

Other backends build fine.


Here is the script (important part) I use to launch the build (it's part of a
PKGBUILD file I'm trying to port from autotools to cmake):
build() {
    _cpucount=$(grep -c processor /proc/cpuinfo 2>/dev/null)
    _jc=$((${_cpucount:-1}))

    cd "${srcdir}"
    mkdir -p build
    cd build

    export CC="gcc -m32"
    export CXX="g++ -m32"
    export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

    # Apply strip option to configure
    _optimized_switch="enable"
    [[ $(check_option strip) == n ]] && _optimized_switch="disable"

    # Include location of libffi headers in CPPFLAGS
    CPPFLAGS+=" $(pkg-config --cflags libffi)"

    cmake -G "Unix Makefiles" \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DLIBDIR=lib32 \
    -DCMAKE_BUILD_TYPE=Release \
    -DLLVM_OPTIMIZED_TABLEGEN=TRUE \
        -DLLVM_ENABLE_FFI=TRUE \
    -DLLVM_ENABLE_RTTI=TRUE \
        -DBUILD_SHARED_LIBS=TRUE \
    -DLLVM_BUILD_LLVM_DYLIB=TRUE \
        -DLLVM_TARGETS_TO_BUILD=all \
    -DLLVM_HOST_TRIPLE=i686-pc-linux-gnu \
        -DLLVM_TARGET_ARCH=i686-pc-linux-gnu \
    -DLLVM_BUILD_32_BITS=TRUE \
    -DLLVM_INCLUDE_TESTS=Off \
    -DLLVM_INCLUDE_EXAMPLES=Off \
    -DLLVM_ENABLE_BACKTRACES=Off \
     "${srcdir}/${_pkgname}"

    make -j $_jc

Am I missing something or is the AMDGPU backend not taking into account the
target architecture right now?

P.S.: it seems at least "Backend: AMDGPU" and "Backend: Hexagone" are missing
from the component list.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150804/cad4c99d/attachment.html>


More information about the llvm-bugs mailing list