Forum Topic - LLVM Support for QNX: (4 Items)
   
LLVM Support for QNX  
Hi everyone,

I am currently working on porting Bogdan's changes from LLVM 3.2 found on ajamweb.pl over to LLVM 3.4 and I thought this
 might be a good place for me to post on my progress and have discussions about it.
If this is not a good place for this topic let me know and I will just personally message Bogdan instead of putting it 
here. 

I am currently having some issues during the make when it is trying to build Intrinsics.gen.tmp from Intrinsics.td. 

The command that is being run :
/home/llvm/Debug+Asserts/bin/llvm-tblgen -I  /home/llvm/lib/IR -I  /home/llvm/include -I  /home/llvm/include -I  /home/
llvm/lib/Target  /home/llvm/include/llvm/IR/Intrinsics.td -o  /home/llvm/lib/IR/Debug+Asserts/Intrinsics.gen.tmp -gen-
intrinsic

The output from the command :
ldd:FATAL: Unresolved symbol "_ZNSsaSEOSs" called from Executable

After demangling :
_ZNSsaSEOSs = std::string::operator=(std::string&&)

I have to believe that this is a problem with c++11 support but I am not sure where it is being introduced. I currently 
have changed the Makefile.rules so that it uses -std=gnu++11 instead of -std=c++11. This was done because there were 
some issues with c++11 claiming that isinf(float f) was undefined.  I have tried to recompile tableGen with std=c++11 
instead but I still get the same error. I also tried to recompile it without c++11 or gnu++11 but it failed completely.

Anyone have any suggestions?

Thanks & regards

Zane  
Re: LLVM Support for QNX  
FYI

I am using gcc 4.8.1 as found on ajamweb.pl and I am using your binutils 2.24.

I also have installed MPC, GMP and MPFR all from ajamweb.pl as well. 
Re: LLVM Support for QNX  
On 14-07-09 04:34 PM, zane mccaig wrote:
> FYI
>
> I am using gcc 4.8.1 as found on ajamweb.pl and I am using your binutils 2.24.
>
> I also have installed MPC, GMP and MPFR all from ajamweb.pl as well.

Which OS version?  And which c++ library is the executable trying to 
load (e.g. run ldd on it). Both the libstdc++ and libcpp in 6.6.0 have a 
weak _ZNSsaSEOSs in them. Maybe you're using building with Bogdan's 
libstdc++ but the one you're running on your target is an earlier 
version of libstdc++.

Regards,

Ryan Mansfield

Re: LLVM Support for QNX  
OS version:
   QNX localhost 6.5.0 2010/07/09-14:44:03EDT x86pc x86

c++ version being loaded:  

ldd /home/llvm/Debug+Asserts/bin/llvm-tblgen
/home/llvm/Debug+Asserts/bin/llvm-tblgen:
        libz.so.2 => /usr/lib/libz.so.2 (0xb8200000)
        libstdc++.so.6 => /lib/libstdc++.so.6.0.13 (0xb8211000)
        libm.so.2 => /lib/libm.so.2 (0xb8304000)
        libc.so.3 => /usr/lib/ldqnx.so.2 (0xb0300000)

ls -al /lib | grep 6.0.13
lrwxrwxrwx  1 root      root             19 Apr 04 12:13 libstdc++.so.6 -> libstdc++.so.6.0.13
-rwxr-xr-x  1 root      root        4437552 Jun 03  2010 libstdc++.so.6.0.13

So it does look like it is using an old version. I did a find in /usr for more c++ libraries and I found all of these: 

find -name "libstdc++*"
./lib/libstdc++.so.2.10.0
./lib/libstdc++.so.2.2.10.0
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/libstdc++.so.6.0.18
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/libstdc++.so.6
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/libstdc++.so
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/libstdc++.la
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/libstdc++.so.6.0.18-gdb.py
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/pic/libstdc++.so.6.0.18
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/pic/libstdc++.so.6
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/pic/libstdc++.so
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/pic/libstdc++.la
./qnx650/host/qnx6/x86/usr/i486-pc-nto-qnx6.5.0/lib/pic/libstdc++.so.6.0.18-gdb.py
./qnx650/target/qnx6/x86/lib/gcc/4.4.2/libstdc++.a
./qnx650/target/qnx6/x86/lib/gcc/4.4.2/libstdc++.so
./qnx650/target/qnx6/x86/lib/gcc/4.8.1/libstdc++.a
./qnx650/target/qnx6/x86/lib/gcc/4.8.1/libstdc++convenience.a
./qnx650/target/qnx6/x86/lib/gcc/4.8.1/libstdc++.so
./qnx650/target/qnx6/x86/lib/libstdc++.so.6.0.9
./qnx650/target/qnx6/x86/lib/libstdc++.so.5
./qnx650/target/qnx6/x86/lib/libstdc++.so.5.0.7
./qnx650/target/qnx6/x86/lib/libstdc++.so.6
./qnx650/target/qnx6/x86/lib/libstdc++.so.6.0.13
./qnx650/target/qnx6/x86/lib/libstdc++.so.6.0.18
./qnx650/target/qnx6/x86/lib/libstdc++.so.6.0.18-gdb.py
./qnx650/target/qnx6/x86/usr/lib/libstdc++.so.2.10.0
./qnx650/target/qnx6/x86/usr/lib/libstdc++.so.2.2.10.0

Where the latest release is:
-rwxr-xr-x  1 root      root        5126967 Jun 06  2013 libstdc++.so.6.0.18

So I just tried to recreate the softlink /lib/libstdc++.so.6 to point to 
 /usr/qnx650/target/qnx6/x86/lib/libstdc++.so.6

And it looks like it worked like a charm! 

I will let you know if the problem comes back or if some new problems arise.

Thanks a lot Ryan!

Regards,

Zane McCaig