Forum Topic - Link problem on QNX6.3.0: (4 Items)
   
Link problem on QNX6.3.0  
Hi,
    I have some code I compiled and linked successfully with QNX6.4. Now I am trying to build the same code on QNX6.3.0 
in the same environment. For some reason ld is trying to look for crti.o in /opt/qnx630 (my installation is someplace 
else). I am passing in the correct paths for the libraries and it finds everything else in the right place. What am I 
missing?

Thanks,
Vineet

configure:3237: found /volume/interop/qnx630/host/linux/x86/usr/bin/powerpc-unknown-nto-qnx6.3.0-gcc
configure:3248: result: powerpc-unknown-nto-qnx6.3.0-gcc
configure:3517: checking for C compiler version
configure:3526: powerpc-unknown-nto-qnx6.3.0-gcc --version >&5
powerpc-unknown-nto-qnx6.3.0-gcc (GCC) 3.3.1 (qnx-nto)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3537: $? = 0
configure:3526: powerpc-unknown-nto-qnx6.3.0-gcc -v >&5
Reading specs from /volume/interop/qnx630/host/linux/x86/usr/lib/gcc-lib/powerpc-unknown-nto-qnx6.3.0/3.3.1/specs
Configured with: ../configure --srcdir=.. --enable-cheaders=c --with-gnu-as --with-gnu-ld --with-qnxsysroot=/opt/QNXsdk/target/qnx6 --target=powerpc-unknown-nto-qnx6.3.0 --srcdir=/home/toolsbuild/6.3.0SP1.125263901/cvs/tools/gcc/linux-x86-o-ntoppc/.. --prefix=/opt/QNXsdk/host/linux/x86/usr --exec-prefix=/opt/QNXsdk/host/linux/x86/usr --with-local-prefix=/opt/QNXsdk/host/linux/x86/usr --enable-haifa --enable-languages=c++ --enable-threads=posix --disable-nls --disable-shared --disable-multilib
Thread model: posix
gcc version 3.3.1 (qnx-nto)
configure:3537: $? = 0
configure:3526: powerpc-unknown-nto-qnx6.3.0-gcc -V >&5
powerpc-unknown-nto-qnx6.3.0-gcc: `-V' option must have argument
configure:3537: $? = 1
configure:3526: powerpc-unknown-nto-qnx6.3.0-gcc -qversion >&5
powerpc-unknown-nto-qnx6.3.0-gcc: unrecognized option `-qversion'
powerpc-unknown-nto-qnx6.3.0-gcc: no input files
configure:3537: $? = 1
configure:3557: checking whether the C compiler works
configure:3579: powerpc-unknown-nto-qnx6.3.0-gcc    conftest.c  >&5
/volume/interop/qnx630/host/linux/x86/usr/powerpc-unknown-nto-qnx6.3.0/bin/ld: cannot open /opt/qnx630/target/qnx6/ppcbe
/lib/crti.o: No such file or directory
collect2: ld returned 1 exit status

Re: Link problem on QNX6.3.0  
Hi Vineet,

I am assuming your $QNX_HOST is /volume/interop/qnx630/host/linux/x86
but your $QNX_TARGET is /opt/qnx630/target/qnx6 meaning you will need to
update the $QNX_TARGET environment variable to point to your new location.

Thanks,

Gervais
RE: Link problem on QNX6.3.0  
Hi Gervais,
  Thanks for replying! I managed to resolve the problem. $QNX_TARGET was set correctly but my tree had a GCC specs file 
which hard-coded certain paths to /opt/qnx630 (this specs file is not present in the 6.4 install). Our existing build 
infra uses the -specs flag to point to another specs file but the infra for this newly imported code was pointing to the
 bad specs file. Once I fixed the paths in the specs file it worked.

-Vineet


-----Original Message-----
From: Gervais Mulongoy [mailto:community-noreply@qnx.com] 
Sent: Monday, March 12, 2012 6:24 AM
To: general-toolchain
Subject: Re: Link problem on QNX6.3.0

Hi Vineet,

I am assuming your $QNX_HOST is /volume/interop/qnx630/host/linux/x86
but your $QNX_TARGET is /opt/qnx630/target/qnx6 meaning you will need to update the $QNX_TARGET environment variable to 
point to your new location.

Thanks,

Gervais



_______________________________________________

General
http://community.qnx.com/sf/go/post92042
Re: Link problem on QNX6.3.0  
You are quite welcome.