[ARM m32 LINUX] linking errors

Moderators: Rachael, dpJudas

Locked
User avatar
ConSiGno
Documentation? What documentation?
Posts: 12
Joined: Sun Jan 08, 2017 6:05

[ARM m32 LINUX] linking errors

Post by ConSiGno » Sun Jan 08, 2017 6:09

Here ya go:

Code: Select all

[ 19%] Linking CXX executable drawergen
CMakeFiles/drawergen.dir/drawergen.cpp.o: In function `llvm::InitializeNativeTarget()':
/usr/lib/llvm-3.9/include/llvm/Support/TargetSelect.h:119: undefined reference to `LLVMInitializeARMTargetInfo'
/usr/lib/llvm-3.9/include/llvm/Support/TargetSelect.h:120: undefined reference to `LLVMInitializeARMTarget'
/usr/lib/llvm-3.9/include/llvm/Support/TargetSelect.h:121: undefined reference to `LLVMInitializeARMTargetMC'
CMakeFiles/drawergen.dir/drawergen.cpp.o: In function `llvm::InitializeNativeTargetAsmPrinter()':
/usr/lib/llvm-3.9/include/llvm/Support/TargetSelect.h:133: undefined reference to `LLVMInitializeARMAsmPrinter'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
tools/drawergen/CMakeFiles/drawergen.dir/build.make:905: recipe for target 'tools/drawergen/drawergen' failed
make[2]: *** [tools/drawergen/drawergen] Error 1
CMakeFiles/Makefile2:463: recipe for target 'tools/drawergen/CMakeFiles/drawergen.dir/all' failed
make[1]: *** [tools/drawergen/CMakeFiles/drawergen.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
So close, yet so far.

ARMv8 CortexA57 Raspberri Pi 3, Debian Jessie.

User avatar
Rachael
Developer
Developer
Posts: 3616
Joined: Sat May 13, 2006 10:30

Re: [ARM m32 LINUX] linking errors

Post by Rachael » Sun Jan 08, 2017 6:22

Interesting - it uses LLVM 3.9. Unfortunately, I am not familiar with this code enough, so I can offer very little assistance with it at this time. :(
Spoiler: Zen Sarcasm

User avatar
ConSiGno
Documentation? What documentation?
Posts: 12
Joined: Sun Jan 08, 2017 6:05

Re: [ARM m32 LINUX] linking errors

Post by ConSiGno » Sun Jan 08, 2017 6:23

Hey,everything compiles up to that point! :)

User avatar
Rachael
Developer
Developer
Posts: 3616
Joined: Sat May 13, 2006 10:30

Re: [ARM m32 LINUX] linking errors

Post by Rachael » Sun Jan 08, 2017 6:37

Actually, it's encouraging to know that Debian Jessie uses an updated LLVM. Still - the fact that it's broken in Ubuntu repositories is a huge problem and that is what has stalled development at this point.

If I have some extra time tomorrow, I'll see about installing Jessie on my SD card. Or I may just add its repositories to my sources list - but I will definitely need someone to test its implementation to make sure everything works okay.
Spoiler: Zen Sarcasm

User avatar
ConSiGno
Documentation? What documentation?
Posts: 12
Joined: Sun Jan 08, 2017 6:05

Re: [ARM m32 LINUX] linking errors

Post by ConSiGno » Sun Jan 08, 2017 7:46

I'll be here for sure. I'll be on ZDoom IRC so ping me there. :)

_mental_
Developer
Developer
Posts: 254
Joined: Sun Aug 07, 2011 13:36

Re: [ARM m32 LINUX] linking errors

Post by _mental_ » Sun Jan 08, 2017 8:44

I'm using LLVM 3.9 for macOS devbuilds with no problem at all. So x64 works fine, it's something specific to ARM taking into account names of missing symbols.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: [ARM m32 LINUX] linking errors

Post by dpJudas » Sun Jan 08, 2017 9:41

It is because it only lists the x86 libraries in the list of LLVM components to link with. We need some if statement in the CMakeLists.txt that makes it use the ARM components. They are named as follows: "armasmprinter arminfo armdesc armutils armcodegen".

I'm assuming it will complain about a couple of SSE intrinsics being used after this (when it runs the drawergen tool), but those can be fixed with some #ifdefs once the building part is up and running.

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: [ARM m32 LINUX] linking errors

Post by Graf Zahl » Sun Jan 08, 2017 11:45

I think that you should consider providing the precompiled LLVM output as part of the repo to avoid going through the hassle of having the users of your source compile it. In fact, I think it should be a completely separate project for those interested in this stuff, but the general user should not have to bother with this part, maybe only when they use a compiler toolchain that requires something different than what is provided.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: [ARM m32 LINUX] linking errors

Post by dpJudas » Sun Jan 08, 2017 12:10

Well, the user only has to deal with it on Linux because that's more or less an intentional feature of the entire platform. I could create a .deb or .rpm package for them, but unless that is all statically linked it will only work on one specific release for one specific distribution. At the time I wrote the LLVM thing didn't even consider the possibility that Linux would have totally destroyed their LLVM packages. That something this high profile can be so broken for so long on Linux is just.. well what can I say - someone elsewhere in the Linux community is doing a very poor job here.

The output of drawergen is currently an object file. A x86/x64 build of it would therefore not have worked on ARM - but you do have a point that adding the outputted .obj file for each supported architecture certainly is an option. I've added a define yesterday that allows the main codebase to compile without having this obj file linked in, although the catch is that this means no softpoly drawers and no truecolor drawers.

User avatar
ConSiGno
Documentation? What documentation?
Posts: 12
Joined: Sun Jan 08, 2017 6:05

Re: [ARM m32 LINUX] linking errors

Post by ConSiGno » Mon Jan 09, 2017 3:00

yeowch, you're right:

Code: Select all

Scanning dependencies of target drawergen_target
Target triple is armv7l-unknown-linux-gnueabihf
Compiling drawer code for pentium4..
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
'pentium4' is not a recognized processor for this target (ignoring processor)
LLVM fatal error: Do not know how to split the result of this operator!
src/CMakeFiles/drawergen_target.dir/build.make:57: recipe for target 'src/CMakeFiles/drawergen_target' failed
make[2]: *** [src/CMakeFiles/drawergen_target] Error 1
CMakeFiles/Makefile2:923: recipe for target 'src/CMakeFiles/drawergen_target.dir/all' failed
make[1]: *** [src/CMakeFiles/drawergen_target.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

User avatar
Rachael
Developer
Developer
Posts: 3616
Joined: Sat May 13, 2006 10:30

Re: [ARM m32 LINUX] linking errors

Post by Rachael » Mon Jan 09, 2017 3:30

That particular problem should be solved, but I still haven't done the SSE intrinsics yet.
Spoiler: Zen Sarcasm

Locked

Return to “Bugs (Archive)”