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

Fails to build from source on ppc64el #2824

Open
ximion opened this issue Aug 20, 2018 · 7 comments

Comments

@ximion
Copy link
Contributor

commented Aug 20, 2018

Hi!
The latest 1.11 release fails to build on the ppc64el architecture:

/usr/bin/c++ -fPIC -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -DDMDV2 -DHAVE_SC_ARG_MAX  -Wl,--exclude-libs=ALL -Wl,-z,relro -shared -Wl,-soname,libldc-jit.so.81 -o ../lib/libldc-jit.so.2.0.81 CMakeFiles/ldc-jit-rt-so.dir/jit-rt/cpp-so/callback_ostream.cpp.o CMakeFiles/ldc-jit-rt-so.dir/jit-rt/cpp-so/compile.cpp.o CMakeFiles/ldc-jit-rt-so.dir/jit-rt/cpp-so/disassembler.cpp.o CMakeFiles/ldc-jit-rt-so.dir/jit-rt/cpp-so/jit_context.cpp.o CMakeFiles/ldc-jit-rt-so.dir/jit-rt/cpp-so/optimizer.cpp.o CMakeFiles/ldc-jit-rt-so.dir/jit-rt/cpp-so/utils.cpp.o CMakeFiles/ldc-jit-rt-so.dir/jit-rt/cpp-so/valueparser.cpp.o /usr/lib/llvm-6.0/lib/libLLVMCore.a /usr/lib/llvm-6.0/lib/libLLVMSupport.a /usr/lib/llvm-6.0/lib/libLLVMIRReader.a /usr/lib/llvm-6.0/lib/libLLVMExecutionEngine.a /usr/lib/llvm-6.0/lib/libLLVMPasses.a /usr/lib/llvm-6.0/lib/libLLVMPowerPCCodeGen.a /usr/lib/llvm-6.0/lib/libLLVMPowerPCDesc.a /usr/lib/llvm-6.0/lib/libLLVMPowerPCInfo.a /usr/lib/llvm-6.0/lib/libLLVMOrcJIT.a /usr/lib/llvm-6.0/lib/libLLVMTarget.a /usr/lib/llvm-6.0/lib/libLLVMPowerPCDisassembler.a /usr/lib/llvm-6.0/lib/libLLVMPowerPCAsmPrinter.a /usr/lib/llvm-6.0/lib/libLLVMipo.a /usr/lib/llvm-6.0/lib/libLLVMIRReader.a /usr/lib/llvm-6.0/lib/libLLVMAsmParser.a /usr/lib/llvm-6.0/lib/libLLVMInstrumentation.a /usr/lib/llvm-6.0/lib/libLLVMVectorize.a /usr/lib/llvm-6.0/lib/libLLVMLinker.a /usr/lib/llvm-6.0/lib/libLLVMAsmPrinter.a /usr/lib/llvm-6.0/lib/libLLVMDebugInfoCodeView.a /usr/lib/llvm-6.0/lib/libLLVMDebugInfoMSF.a /usr/lib/llvm-6.0/lib/libLLVMSelectionDAG.a /usr/lib/llvm-6.0/lib/libLLVMCodeGen.a /usr/lib/llvm-6.0/lib/libLLVMScalarOpts.a /usr/lib/llvm-6.0/lib/libLLVMInstCombine.a /usr/lib/llvm-6.0/lib/libLLVMBitWriter.a /usr/lib/llvm-6.0/lib/libLLVMExecutionEngine.a /usr/lib/llvm-6.0/lib/libLLVMTarget.a /usr/lib/llvm-6.0/lib/libLLVMRuntimeDyld.a /usr/lib/llvm-6.0/lib/libLLVMTransformUtils.a /usr/lib/llvm-6.0/lib/libLLVMAnalysis.a /usr/lib/llvm-6.0/lib/libLLVMObject.a /usr/lib/llvm-6.0/lib/libLLVMBitReader.a /usr/lib/llvm-6.0/lib/libLLVMMCParser.a /usr/lib/llvm-6.0/lib/libLLVMProfileData.a /usr/lib/llvm-6.0/lib/libLLVMCore.a /usr/lib/llvm-6.0/lib/libLLVMBinaryFormat.a /usr/lib/llvm-6.0/lib/libLLVMPowerPCInfo.a /usr/lib/llvm-6.0/lib/libLLVMMCDisassembler.a /usr/lib/llvm-6.0/lib/libLLVMMC.a /usr/lib/llvm-6.0/lib/libLLVMSupport.a -lz -lrt -ldl -ltinfo -lpthread -lm /usr/lib/llvm-6.0/lib/libLLVMDemangle.a 
[ 15%] Building CXX object CMakeFiles/LDCShared.dir/gen/abi-x86.cpp.o
/usr/bin/c++  -DLDC_DYNAMIC_COMPILE -DLDC_DYNAMIC_COMPILE_API_VERSION=1 -DLDC_ENABLE_PLUGINS -DLDC_LLVM_SUPPORTED_TARGET_AArch64=1 -DLDC_LLVM_SUPPORTED_TARGET_AMDGPU=1 -DLDC_LLVM_SUPPORTED_TARGET_ARM=1 -DLDC_LLVM_SUPPORTED_TARGET_AVR=1 -DLDC_LLVM_SUPPORTED_TARGET_BPF=1 -DLDC_LLVM_SUPPORTED_TARGET_Hexagon=1 -DLDC_LLVM_SUPPORTED_TARGET_Lanai=1 -DLDC_LLVM_SUPPORTED_TARGET_MSP430=1 -DLDC_LLVM_SUPPORTED_TARGET_Mips=1 -DLDC_LLVM_SUPPORTED_TARGET_NVPTX=1 -DLDC_LLVM_SUPPORTED_TARGET_PowerPC=1 -DLDC_LLVM_SUPPORTED_TARGET_Sparc=1 -DLDC_LLVM_SUPPORTED_TARGET_SystemZ=1 -DLDC_LLVM_SUPPORTED_TARGET_WebAssembly=1 -DLDC_LLVM_SUPPORTED_TARGET_X86=1 -DLDC_LLVM_SUPPORTED_TARGET_XCore=1 -I/<<PKGBUILDDIR>>/. -I/<<PKGBUILDDIR>>/dmd -I/<<PKGBUILDDIR>>/dmd/root -I/<<PKGBUILDDIR>>/build-static/dmd -I/<<PKGBUILDDIR>> -isystem /usr/lib/llvm-6.0/include  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -DDMDV2 -DHAVE_SC_ARG_MAX   -I/usr/lib/llvm-6.0/include -std=c++0x -fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -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 -ffunction-sections -fdata-sections -O2 -DNDEBUG  -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti  -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-non-virtual-dtor -Wno-pedantic -mlong-double-64 -DLDC_POSIX  -DIN_LLVM -DOPAQUE_VTBLS "-DLDC_INSTALL_PREFIX=/usr" -DLDC_LLVM_VER=600 "-DLDC_LIBDIR_SUFFIX=\"\"" -DLDC_HOST_LDMD=1 -DLDC_HOST_FE_VER=2068  -o CMakeFiles/LDCShared.dir/gen/abi-x86.cpp.o -c /<<PKGBUILDDIR>>/gen/abi-x86.cpp
[ 23%] Building CXX object CMakeFiles/LDCShared.dir/gen/abi.cpp.o
/usr/bin/c++  -DLDC_DYNAMIC_COMPILE -DLDC_DYNAMIC_COMPILE_API_VERSION=1 -DLDC_ENABLE_PLUGINS -DLDC_LLVM_SUPPORTED_TARGET_AArch64=1 -DLDC_LLVM_SUPPORTED_TARGET_AMDGPU=1 -DLDC_LLVM_SUPPORTED_TARGET_ARM=1 -DLDC_LLVM_SUPPORTED_TARGET_AVR=1 -DLDC_LLVM_SUPPORTED_TARGET_BPF=1 -DLDC_LLVM_SUPPORTED_TARGET_Hexagon=1 -DLDC_LLVM_SUPPORTED_TARGET_Lanai=1 -DLDC_LLVM_SUPPORTED_TARGET_MSP430=1 -DLDC_LLVM_SUPPORTED_TARGET_Mips=1 -DLDC_LLVM_SUPPORTED_TARGET_NVPTX=1 -DLDC_LLVM_SUPPORTED_TARGET_PowerPC=1 -DLDC_LLVM_SUPPORTED_TARGET_Sparc=1 -DLDC_LLVM_SUPPORTED_TARGET_SystemZ=1 -DLDC_LLVM_SUPPORTED_TARGET_WebAssembly=1 -DLDC_LLVM_SUPPORTED_TARGET_X86=1 -DLDC_LLVM_SUPPORTED_TARGET_XCore=1 -I/<<PKGBUILDDIR>>/. -I/<<PKGBUILDDIR>>/dmd -I/<<PKGBUILDDIR>>/dmd/root -I/<<PKGBUILDDIR>>/build-static/dmd -I/<<PKGBUILDDIR>> -isystem /usr/lib/llvm-6.0/include  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -DDMDV2 -DHAVE_SC_ARG_MAX   -I/usr/lib/llvm-6.0/include -std=c++0x -fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -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 -ffunction-sections -fdata-sections -O2 -DNDEBUG  -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti  -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-non-virtual-dtor -Wno-pedantic -mlong-double-64 -DLDC_POSIX  -DIN_LLVM -DOPAQUE_VTBLS "-DLDC_INSTALL_PREFIX=/usr" -DLDC_LLVM_VER=600 "-DLDC_LIBDIR_SUFFIX=\"\"" -DLDC_HOST_LDMD=1 -DLDC_HOST_FE_VER=2068  -o CMakeFiles/LDCShared.dir/gen/abi.cpp.o -c /<<PKGBUILDDIR>>/gen/abi.cpp
[ 23%] Building CXX object CMakeFiles/LDCShared.dir/gen/arrays.cpp.o
/usr/bin/c++  -DLDC_DYNAMIC_COMPILE -DLDC_DYNAMIC_COMPILE_API_VERSION=1 -DLDC_ENABLE_PLUGINS -DLDC_LLVM_SUPPORTED_TARGET_AArch64=1 -DLDC_LLVM_SUPPORTED_TARGET_AMDGPU=1 -DLDC_LLVM_SUPPORTED_TARGET_ARM=1 -DLDC_LLVM_SUPPORTED_TARGET_AVR=1 -DLDC_LLVM_SUPPORTED_TARGET_BPF=1 -DLDC_LLVM_SUPPORTED_TARGET_Hexagon=1 -DLDC_LLVM_SUPPORTED_TARGET_Lanai=1 -DLDC_LLVM_SUPPORTED_TARGET_MSP430=1 -DLDC_LLVM_SUPPORTED_TARGET_Mips=1 -DLDC_LLVM_SUPPORTED_TARGET_NVPTX=1 -DLDC_LLVM_SUPPORTED_TARGET_PowerPC=1 -DLDC_LLVM_SUPPORTED_TARGET_Sparc=1 -DLDC_LLVM_SUPPORTED_TARGET_SystemZ=1 -DLDC_LLVM_SUPPORTED_TARGET_WebAssembly=1 -DLDC_LLVM_SUPPORTED_TARGET_X86=1 -DLDC_LLVM_SUPPORTED_TARGET_XCore=1 -I/<<PKGBUILDDIR>>/. -I/<<PKGBUILDDIR>>/dmd -I/<<PKGBUILDDIR>>/dmd/root -I/<<PKGBUILDDIR>>/build-static/dmd -I/<<PKGBUILDDIR>> -isystem /usr/lib/llvm-6.0/include  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -DDMDV2 -DHAVE_SC_ARG_MAX   -I/usr/lib/llvm-6.0/include -std=c++0x -fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -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 -ffunction-sections -fdata-sections -O2 -DNDEBUG  -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti  -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-non-virtual-dtor -Wno-pedantic -mlong-double-64 -DLDC_POSIX  -DIN_LLVM -DOPAQUE_VTBLS "-DLDC_INSTALL_PREFIX=/usr" -DLDC_LLVM_VER=600 "-DLDC_LIBDIR_SUFFIX=\"\"" -DLDC_HOST_LDMD=1 -DLDC_HOST_FE_VER=2068  -o CMakeFiles/LDCShared.dir/gen/arrays.cpp.o -c /<<PKGBUILDDIR>>/gen/arrays.cpp
/usr/bin/ld: CMakeFiles/ldc-jit-rt-so.dir/jit-rt/cpp-so/disassembler.cpp.o uses 64-bit long double, /usr/lib/llvm-6.0/lib/libLLVMCore.a(LegacyPassManager.cpp.o) uses 128-bit long double
/usr/bin/ld: failed to merge target specific data of file /usr/lib/llvm-6.0/lib/libLLVMCore.a(LegacyPassManager.cpp.o)
collect2: error: ld returned 1 exit status
make[4]: *** [runtime/CMakeFiles/ldc-jit-rt-so.dir/build.make:219: lib/libldc-jit.so.2.0.81] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/build-static'
make[3]: *** [CMakeFiles/Makefile2:1119: runtime/CMakeFiles/ldc-jit-rt-so.dir/all] Error 2

See https://buildd.debian.org/status/fetch.php?pkg=ldc&arch=ppc64el&ver=1%3A1.11.0-1&stamp=1534787153&raw=0 for the full build log.

@kinke

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

Thx for the report. Use -DLDC_DYNAMIC_COMPILE=False in the CMake cmdline as workaround.

@kinke

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

Ah that probably isn't enough, you won't be able to link LDC itself either. The offending line is https://github.com/ldc-developers/ldc/blob/master/CMakeLists.txt#L225, but LDC needs to be changed to use the doubledouble as real on PPC too.

@kinke

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

IIRC, Kai switched to 128-bit real in ltsmaster, but master still uses double precision. Commenting out that line may get ltsmaster to build master successfully, but that master won't be of much use.

@ximion

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2018

@kinke What do you suggest we should do to work around / fix this issue in the Debian build?

@kinke

This comment has been minimized.

Copy link
Member

commented Aug 26, 2018

Excluding the platform if possible. Everything else requires touching 0.17 and master. My interest in Power is 0, plus the 2 different 128-bit long double ABIs don't improve things either. [Just supporting the new one, IEEE quad, as mid-term goal would be both easy (~full Phobos support already) and preferrable IMO.]

@ximion

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2018

@kinke So, don't make LDC available on both ppc64el and ppc64?

@kinke

This comment has been minimized.

Copy link
Member

commented Aug 26, 2018

Yes, assuming it's the same story for big-endian ppc64.

If building ltsmaster and bootstrapping master used to work earlier, specifically, linking against LLVM, there must have been a breaking C++ ABI change (64-bit long double => 128-bit one) since then; if that's the switch to IEEE quad, we'll probably be able to add support for that with minimal effort for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.