Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Linker errors: (13 Items)
   
Linker errors  
Hi,

I am getting linker error while compiling the latest trunk. How do I fix it?

Thanks,
Santosh
[skumar@ts4 trunk]$ make CPULIST="ppc" install>build.out
In file included from /home/skumar/io-pkt/trunk/lib/edit/editline.c:9:
/home/skumar/io-pkt/trunk/lib/edit/filecomplete.c: In function `_fn_qsort_string_compare':
/home/skumar/io-pkt/trunk/lib/edit/filecomplete.c:337: warning: implicit declaration of function `strcasecmp'
In file included from /home/skumar/io-pkt/trunk/lib/edit/editline.c:21:
/home/skumar/io-pkt/trunk/lib/edit/tty.c: In function `tty_stty':
/home/skumar/io-pkt/trunk/lib/edit/tty.c:1290: warning: implicit declaration of function `ffs'
sys-nto.o: In function `get_pty':
/home/skumar/io-pkt/trunk/services/pppd/nto/sys-nto.c:1923: undefined reference to `openpty'
/home/skumar/io-pkt/trunk/services/pppd/nto/sys-nto.c:1923: relocation truncated to fit: R_PPC_REL24 openpty
cc: /opt/qnx632/host/linux/x86/usr/bin/powerpc-unknown-nto-qnx6.3.0-ld error 1
make[5]: *** [/home/skumar/io-pkt/trunk/services/pppd/nto/ppc/be/pppd] Error 1
make[4]: *** [install] Error 2
make[3]: *** [install] Error 2
make[2]: *** [install] Error 2
make[1]: *** [install] Error 2
make: *** [install] Error 2
Re: Linker errors  
On Wed, Feb 11, 2009 at 07:09:00PM -0500, Santosh Kumar wrote:
> Hi,
> 
> I am getting linker error while compiling the latest trunk. How do I fix it?
> 
> Thanks,
> Santosh
> [skumar@ts4 trunk]$ make CPULIST="ppc" install>build.out
> In file included from /home/skumar/io-pkt/trunk/lib/edit/editline.c:9:
> /home/skumar/io-pkt/trunk/lib/edit/filecomplete.c: In function `_fn_qsort_string_compare':
> /home/skumar/io-pkt/trunk/lib/edit/filecomplete.c:337: warning: implicit declaration of function `strcasecmp'
> In file included from /home/skumar/io-pkt/trunk/lib/edit/editline.c:21:
> /home/skumar/io-pkt/trunk/lib/edit/tty.c: In function `tty_stty':
> /home/skumar/io-pkt/trunk/lib/edit/tty.c:1290: warning: implicit declaration of function `ffs'
> sys-nto.o: In function `get_pty':
> /home/skumar/io-pkt/trunk/services/pppd/nto/sys-nto.c:1923: undefined reference to `openpty'
> /home/skumar/io-pkt/trunk/services/pppd/nto/sys-nto.c:1923: relocation truncated to fit: R_PPC_REL24 openpty
> cc: /opt/qnx632/host/linux/x86/usr/bin/powerpc-unknown-nto-qnx6.3.0-ld error 1
> make[5]: *** [/home/skumar/io-pkt/trunk/services/pppd/nto/ppc/be/pppd] Error 1
> make[4]: *** [install] Error 2
> make[3]: *** [install] Error 2
> make[2]: *** [install] Error 2
> make[1]: *** [install] Error 2
> make: *** [install] Error 2
> 

openpty is in the static libc (libc.a).  Do you have a
/opt/qnx632/target/qnx6/ppcbe/lib/libc.a ?

-seanb
Re: Linker errors  
Hi Sean,

Yes libc.a is present with 766 permissions on it. BTW, Im trying to comilple it with 6.3.2 tool chain. So, the libc is 
probably version 2. Is that OK?

Thanks,
Santosh
> On Wed, Feb 11, 2009 at 07:09:00PM -0500, Santosh Kumar wrote:
> > Hi,
> > 
> > I am getting linker error while compiling the latest trunk. How do I fix it?
> 
> > 
> > Thanks,
> > Santosh
> > [skumar@ts4 trunk]$ make CPULIST="ppc" install>build.out
> > In file included from /home/skumar/io-pkt/trunk/lib/edit/editline.c:9:
> > /home/skumar/io-pkt/trunk/lib/edit/filecomplete.c: In function `
> _fn_qsort_string_compare':
> > /home/skumar/io-pkt/trunk/lib/edit/filecomplete.c:337: warning: implicit 
> declaration of function `strcasecmp'
> > In file included from /home/skumar/io-pkt/trunk/lib/edit/editline.c:21:
> > /home/skumar/io-pkt/trunk/lib/edit/tty.c: In function `tty_stty':
> > /home/skumar/io-pkt/trunk/lib/edit/tty.c:1290: warning: implicit declaration
>  of function `ffs'
> > sys-nto.o: In function `get_pty':
> > /home/skumar/io-pkt/trunk/services/pppd/nto/sys-nto.c:1923: undefined 
> reference to `openpty'
> > /home/skumar/io-pkt/trunk/services/pppd/nto/sys-nto.c:1923: relocation 
> truncated to fit: R_PPC_REL24 openpty
> > cc: /opt/qnx632/host/linux/x86/usr/bin/powerpc-unknown-nto-qnx6.3.0-ld error
>  1
> > make[5]: *** [/home/skumar/io-pkt/trunk/services/pppd/nto/ppc/be/pppd] Error
>  1
> > make[4]: *** [install] Error 2
> > make[3]: *** [install] Error 2
> > make[2]: *** [install] Error 2
> > make[1]: *** [install] Error 2
> > make: *** [install] Error 2
> > 
> 
> openpty is in the static libc (libc.a).  Do you have a
> /opt/qnx632/target/qnx6/ppcbe/lib/libc.a ?
> 
> -seanb


Re: Linker errors  
Performing an nm on libc.a (ntoppc-nm libc.a |grep openpty) we have in 6.3.2 tool chain returns nothing. What version of
 libc is required?

Santosh

> Hi Sean,
> 
> Yes libc.a is present with 766 permissions on it. BTW, Im trying to comilple 
> it with 6.3.2 tool chain. So, the libc is probably version 2. Is that OK?
> 
> Thanks,
> Santosh
RE: Linker errors  
Have you modified the 6.3.2 installation at all?  I just tried a fresh
build on 6.3.2 and lib/edit built as expected for ppc.

	R.

-----Original Message-----
From: Santosh Kumar [mailto:community-noreply@qnx.com] 
Sent: Thursday, February 12, 2009 4:23 PM
To: builds-networking
Subject: Re: Linker errors

Performing an nm on libc.a (ntoppc-nm libc.a |grep openpty) we have in
6.3.2 tool chain returns nothing. What version of libc is required?

Santosh

> Hi Sean,
> 
> Yes libc.a is present with 766 permissions on it. BTW, Im trying to 
> comilple it with 6.3.2 tool chain. So, the libc is probably version 2.
Is that OK?
> 
> Thanks,
> Santosh


_______________________________________________
Builds
http://community.qnx.com/sf/go/post22155
Re: RE: Linker errors  
Hi Robert,

Seems like one of our group members had made some change in libc that we use on 6.3.2. This could be as a a result of 
that. We are investigating it.

Thanks,
Santosh
> Have you modified the 6.3.2 installation at all?  I just tried a fresh
> build on 6.3.2 and lib/edit built as expected for ppc.
> 
> 	R.
> 
> -----Original Message-----
> From: Santosh Kumar [mailto:community-noreply@qnx.com] 
> Sent: Thursday, February 12, 2009 4:23 PM
> To: builds-networking
> Subject: Re: Linker errors
> 
> Performing an nm on libc.a (ntoppc-nm libc.a |grep openpty) we have in
> 6.3.2 tool chain returns nothing. What version of libc is required?
> 
> Santosh



Re: RE: Linker errors  
Hi Robert,

I changed the common.mk inside trunk/sys/target directory to add in a additional compiler flag. After that I see this:

/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/dist/wpa/hostapd/hostapd_cli.c: In function `wpa_request':
/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/dist/wpa/hostapd/hostapd_cli.c:398: warning: implicit 
declaration of function `strncasecmp'
/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/dist/wpa/hostapd/hostapd_cli.c: In function `wpa_request':
/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/dist/wpa/hostapd/hostapd_cli.c:398: warning: implicit 
declaration of function `strncasecmp'
make[4]: *** No rule to make target `/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/sys/io-pkt-spe-v4.use', 
needed by `/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/sys/target/ppc/o.be.spe.v4/io-pkt-spe-v4'.  Stop.
make[3]: *** [install] Error 2
make[2]: *** [install] Error 2
make[1]: *** [install] Error 2
make: *** [install] Error 2

What is io-pkt-spe-v4? Any idea how to resolve this? The common.mk is attached. 

Thanks,
Santosh
> Hi Robert,
> 
> Seems like one of our group members had made some change in libc that we use 
> on 6.3.2. This could be as a a result of that. We are investigating it.
> 
> Thanks,
> Santosh
> > Have you modified the 6.3.2 installation at all?  I just tried a fresh
> > build on 6.3.2 and lib/edit built as expected for ppc.
> > 
> > 	R.
> > 
> > -----Original Message-----
> > From: Santosh Kumar [mailto:community-noreply@qnx.com] 
> > Sent: Thursday, February 12, 2009 4:23 PM
> > To: builds-networking
> > Subject: Re: Linker errors
> > 
> > Performing an nm on libc.a (ntoppc-nm libc.a |grep openpty) we have in
> > 6.3.2 tool chain returns nothing. What version of libc is required?
> > 
> > Santosh
> 
> 
> 


Attachment: Text common.mk 15.65 KB
RE: RE: Linker errors  
Hi Santosh:

	That's a new CPU variant that's being added in for
PowerQUICC-III processors. The compiler chain will be introduced in
6.4.1, so it won't build in 6.4.0 (or 6.3.2).

Ti build in 6.3.2 / 6.4.0, specify the cpu variants that you want to
build for (variants are arm, sh, ppc, x86)
E.g.

make CPULIST="x86 ppc" install

	R.

-----Original Message-----
From: Santosh Kumar [mailto:community-noreply@qnx.com] 
Sent: Friday, February 13, 2009 9:00 PM
To: builds-networking
Subject: Re: RE: Linker errors

Hi Robert,

I changed the common.mk inside trunk/sys/target directory to add in a
additional compiler flag. After that I see this:

/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/dist/wpa/host
apd/hostapd_cli.c: In function `wpa_request':
/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/dist/wpa/host
apd/hostapd_cli.c:398: warning: implicit declaration of function
`strncasecmp'
/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/dist/wpa/host
apd/hostapd_cli.c: In function `wpa_request':
/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/dist/wpa/host
apd/hostapd_cli.c:398: warning: implicit declaration of function
`strncasecmp'
make[4]: *** No rule to make target
`/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/sys/io-pkt-s
pe-v4.use', needed by
`/home/skumar/workspace/scm1/ne/thirdparty/Networking/trunk/sys/target/p
pc/o.be.spe.v4/io-pkt-spe-v4'.  Stop.
make[3]: *** [install] Error 2
make[2]: *** [install] Error 2
make[1]: *** [install] Error 2
make: *** [install] Error 2

What is io-pkt-spe-v4? Any idea how to resolve this? The common.mk is
attached. 

Thanks,
Santosh
> Hi Robert,
> 
> Seems like one of our group members had made some change in libc that 
> we use on 6.3.2. This could be as a a result of that. We are
investigating it.
> 
> Thanks,
> Santosh
> > Have you modified the 6.3.2 installation at all?  I just tried a 
> > fresh build on 6.3.2 and lib/edit built as expected for ppc.
> > 
> > 	R.
> > 
> > -----Original Message-----
> > From: Santosh Kumar [mailto:community-noreply@qnx.com]
> > Sent: Thursday, February 12, 2009 4:23 PM
> > To: builds-networking
> > Subject: Re: Linker errors
> > 
> > Performing an nm on libc.a (ntoppc-nm libc.a |grep openpty) we have 
> > in
> > 6.3.2 tool chain returns nothing. What version of libc is required?
> > 
> > Santosh
> 
> 
> 




_______________________________________________
Builds
http://community.qnx.com/sf/go/post22277
Re: RE: RE: Linker errors  
Hi Robert,

I tried that but I see the same result. I am compiling for ppc. How does it distinguish between PQII vs PQIII both of 
which are ppc?

Thanks,
Santosh
> Hi Santosh:
> 
> 	That's a new CPU variant that's being added in for
> PowerQUICC-III processors. The compiler chain will be introduced in
> 6.4.1, so it won't build in 6.4.0 (or 6.3.2).
> 
> Ti build in 6.3.2 / 6.4.0, specify the cpu variants that you want to
> build for (variants are arm, sh, ppc, x86)
> E.g.
> 
> make CPULIST="x86 ppc" install
> 
> 	R.
> 



RE: RE: RE: Linker errors  
Hi Santosh:

	I've asked the developer who's working on it to let me know...
It may take a little while to sort out, but hopefully he'll just say "do
this".

	Robert. 

-----Original Message-----
From: Santosh Kumar [mailto:community-noreply@qnx.com] 
Sent: Friday, February 13, 2009 10:00 PM
To: builds-networking
Subject: Re: RE: RE: Linker errors

Hi Robert,

I tried that but I see the same result. I am compiling for ppc. How does
it distinguish between PQII vs PQIII both of which are ppc?

Thanks,
Santosh
> Hi Santosh:
> 
> 	That's a new CPU variant that's being added in for
PowerQUICC-III 
> processors. The compiler chain will be introduced in 6.4.1, so it 
> won't build in 6.4.0 (or 6.3.2).
> 
> Ti build in 6.3.2 / 6.4.0, specify the cpu variants that you want to 
> build for (variants are arm, sh, ppc, x86) E.g.
> 
> make CPULIST="x86 ppc" install
> 
> 	R.
> 





_______________________________________________
Builds
http://community.qnx.com/sf/go/post22279
Re: RE: RE: Linker errors  
Try:

# make EXCLUDE_VARIANTLIST=spe VARIANTLIST="ppc x86"

-seanb

On Fri, Feb 13, 2009 at 10:03:37PM -0500, Robert Craig wrote:
> Hi Santosh:
> 
> 	I've asked the developer who's working on it to let me know...
> It may take a little while to sort out, but hopefully he'll just say "do
> this".
> 
> 	Robert. 
> 
> -----Original Message-----
> From: Santosh Kumar [mailto:community-noreply@qnx.com] 
> Sent: Friday, February 13, 2009 10:00 PM
> To: builds-networking
> Subject: Re: RE: RE: Linker errors
> 
> Hi Robert,
> 
> I tried that but I see the same result. I am compiling for ppc. How does
> it distinguish between PQII vs PQIII both of which are ppc?
> 
> Thanks,
> Santosh
> > Hi Santosh:
> > 
> > 	That's a new CPU variant that's being added in for
> PowerQUICC-III 
> > processors. The compiler chain will be introduced in 6.4.1, so it 
> > won't build in 6.4.0 (or 6.3.2).
> > 
> > Ti build in 6.3.2 / 6.4.0, specify the cpu variants that you want to 
> > build for (variants are arm, sh, ppc, x86) E.g.
> > 
> > make CPULIST="x86 ppc" install
> > 
> > 	R.
> > 
> 
> 
> 
> 
> 
> _______________________________________________
> Builds
> http://community.qnx.com/sf/go/post22279
> 
> 
> _______________________________________________
> Builds
> http://community.qnx.com/sf/go/post22280
> 
Re: RE: RE: Linker errors  
That worked!!

Thanks,
Santosh
> 
> Try:
> 
> # make EXCLUDE_VARIANTLIST=spe VARIANTLIST="ppc x86"
> 
> -seanb
> 
> On Fri, Feb 13, 2009 at 10:03:37PM -0500, Robert Craig wrote:
> > Hi Santosh:
> > 
> > 	I've asked the developer who's working on it to let me know...
> > It may take a little while to sort out, but hopefully he'll just say "do
> > this".
> > 



Re: RE: RE: Linker errors  
On Fri, Feb 13, 2009 at 10:52:37PM -0500, Santosh Kumar wrote:
> That worked!!
> 

BTW sys/target/common.mk looks to have the fix for this
already so the EXCLUDE_VARIANTLIST shouldn't be needed:


io-pkt/sys/target >svn diff -c805 common.mk
Index: common.mk
===================================================================
--- common.mk   (revision 804)
+++ common.mk   (revision 805)
@@ -35,7 +35,7 @@
 NAME=io-pkt
 empty:=
 space:=$(empty) $(empty)
-USEFILE= $(PRODUCT_ROOT)/$(NAME)-$(subst $(space),-,$(filter-out be le, $(VARIANT_LIST))).use
+USEFILE= $(PRODUCT_ROOT)/$(NAME)-$(subst $(space),-,$(filter-out be le spe, $(VARIANT_LIST))).use

 ISMIPS:= $(filter mips,$(subst /,$(space),$(patsubst $(IOPKT_ROOT)%,%, $(CURDIR))))
 ISSH:= $(filter sh,$(subst /,$(space),$(patsubst $(IOPKT_ROOT)%,%, $(CURDIR))))