Skip to contentSkip to conversation

Clone build fail with the latest CVS sanpshot

LTP Subrata Modak 3 participants 7 messages Nov 9, 2009 – Nov 15, 2009

lore
Share & tools
lore
#0 lore raw

Mike/Garret,

I get the following failure with todayś CVS. ./configure has been done before make:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
-I/ltp-intermediate-20091109/testcases/kernel/include
-I/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone -I../../../../include -I../../../../include -L/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone -L../../../../lib mqns_01.c -lltp -lclone -lpthread -lrt -o mqns_01
/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone/libclone.a(libclone.o): In function `do_clone_tests':
/ltp-intermediate-20091109/testcases/kernel/containers/libclone/libclone.c:25: undefined reference to `ltp_clone_quick'
collect2: ld returned 1 exit status
make[4]: *** [mqns_01] Error 1

Regards--
Subrata

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 10 lines · On Monday 09 November 2009 06:17:09 Subrata Modak wrote:

I get the following failure with todayś CVS. ./configure has been done before make:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/ltp-intermediate-20091109/testcases/kernel/include
-I/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone
 -I../../../../include -I../../../../include  
 -L/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone
 -L../../../../lib  mqns_01.c   -lltp -lclone -lpthread -lrt -o mqns_01
 /ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone/li
Quoted 4 lines

bclone.a(libclone.o): In function `do_clone_tests':
/ltp-intermediate-20091109/testcases/kernel/containers/libclone/libclone.c
:25: undefined reference to `ltp_clone_quick' collect2: ld returned 1 exit
status

should be fixed now. static lib linking order is picky. -mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 4 lines · Mike Frysinger
Quoted 3 lines · On Monday 09 November 2009 06:17:09 Subrata Modak wrote:

I get the following failure with todayś CVS. ./configure has been done before make:

Quoted 13 lines
Quoted 11 lines

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/ltp-intermediate-20091109/testcases/kernel/include
-I/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone
 -I../../../../include -I../../../../include  
 -L/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone
 -L../../../../lib  mqns_01.c   -lltp -lclone -lpthread -lrt -o mqns_01
 /ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone/li

bclone.a(libclone.o): In function `do_clone_tests':
/ltp-intermediate-20091109/testcases/kernel/containers/libclone/libclone.c
:25: undefined reference to `ltp_clone_quick' collect2: ld returned 1 exit
status

should be fixed now. static lib linking order is picky.

Thanks Mike. building fine now.

Regards--
Subrata

Quoted 1 line

-mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 19 lines · Subrata Modak
Quoted 4 lines · Mike Frysinger
Quoted 3 lines · On Monday 09 November 2009 06:17:09 Subrata Modak wrote:

I get the following failure with todayś CVS. ./configure has been done before make:

Quoted 13 lines
Quoted 11 lines

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/ltp-intermediate-20091109/testcases/kernel/include
-I/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone

 -I../../../../include -I../../../../include -L/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone -L../../../../lib  mqns_01.c   -lltp -lclone -lpthread -lrt -o mqns_01 /ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclone/li bclone.a(libclone.o): In function `do_clone_tests':
 /ltp-intermediate-20091109/testcases/kernel/containers/libclone/libclone.c :25: undefined reference to `ltp_clone_quick' collect2: ld returned 1 exit status

should be fixed now.  static lib linking order is picky.

Quoted 1 line

Thanks Mike. building fine now.

When you switch that back though, it fails to compile on Gentoo. Hence that's why I did `-lclone $(LDLIBS) -lpthread -lrt'.

Some autoconf tests need to be created to detect broken linkers like this because it's really annoying doing this tug-of-war with the library ordering...

Thanks,
-Garrett

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 23 lines · On Thursday 12 November 2009 15:43:20 Garrett Cooper wrote:
Quoted 22 lines · Subrata Modak
Quoted 20 lines · Mike Frysinger
Quoted 15 lines · On Monday 09 November 2009 06:17:09 Subrata Modak wrote:

I get the following failure with todayś CVS. ./configure has been done before make:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/ltp-intermediate-20091109/testcases/kernel/include
-I/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libcl

one -I../../../../include -I../../../../include
-L/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libc
lone -L../../../../lib mqns_01.c -lltp -lclone -lpthread -lrt -o
mqns_01 /ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclon e/li bclone.a(libclone.o): In function `do_clone_tests':
/ltp-intermediate-20091109/testcases/kernel/containers/libclone/libcl
one.c

Quoted 2 lines

:25: undefined reference to `ltp_clone_quick' collect2: ld returned 1 : exit status

should be fixed now. static lib linking order is picky.

Quoted 4 lines
Quoted 1 line

Thanks Mike. building fine now.

When you switch that back though, it fails to compile on Gentoo. Hence that's why I did `-lclone $(LDLIBS) -lpthread -lrt'.

huh ? i test everything on gentoo, and this has been working for me. if ltp requires pthread/rt, that should be fixed in common code. the issue here is that libclone needs libltp symbols, and that's it.

Quoted 3 lines

Some autoconf tests need to be created to detect broken linkers like this because it's really annoying doing this tug-of-war with the library ordering...

i dont think so ... start by posting the actual error messages you're seeing. -mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#5 lore raw
Quoted 33 lines · Mike Frysinger
Quoted 23 lines · On Thursday 12 November 2009 15:43:20 Garrett Cooper wrote:
Quoted 22 lines · Subrata Modak
Quoted 20 lines · Mike Frysinger
Quoted 15 lines · On Monday 09 November 2009 06:17:09 Subrata Modak wrote:

I get the following failure with todayś CVS. ./configure has been done before make:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/ltp-intermediate-20091109/testcases/kernel/include
-I/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libcl

one -I../../../../include -I../../../../include -L/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libc lone -L../../../../lib  mqns_01.c   -lltp -lclone -lpthread -lrt -o mqns_01 /ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclon e/li bclone.a(libclone.o): In function `do_clone_tests':
 /ltp-intermediate-20091109/testcases/kernel/containers/libclone/libcl one.c

Quoted 2 lines

:25: undefined reference to `ltp_clone_quick' collect2: ld returned 1 : exit status

should be fixed now.  static lib linking order is picky.

Quoted 4 lines
Quoted 1 line

Thanks Mike. building fine now.

When you switch that back though, it fails to compile on Gentoo. Hence that's why I did `-lclone $(LDLIBS) -lpthread -lrt'.

huh ?  i test everything on gentoo, and this has been working for me.  if ltp requires pthread/rt, that should be fixed in common code.  the issue here is that libclone needs libltp symbols, and that's it.

Quoted 7 lines
Quoted 3 lines

Some autoconf tests need to be created to detect broken linkers like this because it's really annoying doing this tug-of-war with the library ordering...

i dont think so ... start by posting the actual error messages you're seeing. -mike

gcooper@orangebox /scratch/ltp-dev2/ltp/testcases/kernel/containers $ make all make[1]: Entering directory `/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -I/scratch/ltp-dev2/ltp/testcases/kernel/include -I/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/../libclone -I../../../../include -I../../../../include -L/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/../libclone
-L../../../../lib mqns_01.c -lltp -o mqns_01
/tmp/ccgIja6r.o: In function `mq_open':
/usr/include/bits/mqueue2.h:49: undefined reference to mq_open' /tmp/ccgIja6r.o: In function main':
/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/mqns_01.c:98:
undefined reference to `do_clone_unshare_test' /scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/mqns_01.c:123:
undefined reference to `mq_close' /scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/mqns_01.c:124:
undefined reference to `mq_unlink'
/tmp/ccgIja6r.o: In function `mq_open':
/usr/include/bits/mqueue2.h:49: undefined reference to mq_open' /tmp/ccgIja6r.o: In function check_mqueue':
/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/mqns_01.c:65:
undefined reference to `mq_close'
collect2: ld returned 1 exit status
make[1]: *** [mqns_01] Error 1
make[1]: Leaving directory `/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns'
make: *** [all] Error 2

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#6 lore raw
Quoted 62 lines · Garrett Cooper
Quoted 33 lines · Mike Frysinger
Quoted 23 lines · On Thursday 12 November 2009 15:43:20 Garrett Cooper wrote:
Quoted 22 lines · Subrata Modak
Quoted 20 lines · Mike Frysinger
Quoted 15 lines · On Monday 09 November 2009 06:17:09 Subrata Modak wrote:

I get the following failure with todayś CVS. ./configure has been done before make:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -2
-I/ltp-intermediate-20091109/testcases/kernel/include
-I/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libcl

one -I../../../../include -I../../../../include -L/ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libc lone -L../../../../lib  mqns_01.c   -lltp -lclone -lpthread -lrt -o mqns_01 /ltp-intermediate-20091109/testcases/kernel/containers/mqns/../libclon e/li bclone.a(libclone.o): In function `do_clone_tests':
 /ltp-intermediate-20091109/testcases/kernel/containers/libclone/libcl one.c

Quoted 2 lines

:25: undefined reference to `ltp_clone_quick' collect2: ld returned 1 : exit status

should be fixed now.  static lib linking order is picky.

Quoted 4 lines
Quoted 1 line

Thanks Mike. building fine now.

When you switch that back though, it fails to compile on Gentoo. Hence that's why I did `-lclone $(LDLIBS) -lpthread -lrt'.

huh ?  i test everything on gentoo, and this has been working for me.  if ltp requires pthread/rt, that should be fixed in common code.  the issue here is that libclone needs libltp symbols, and that's it.

Quoted 7 lines
Quoted 3 lines

Some autoconf tests need to be created to detect broken linkers like this because it's really annoying doing this tug-of-war with the library ordering...

i dont think so ... start by posting the actual error messages you're seeing. -mike

gcooper@orangebox /scratch/ltp-dev2/ltp/testcases/kernel/containers $ make all make[1]: Entering directory `/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall

(quoted diff) +0 -5
-I/scratch/ltp-dev2/ltp/testcases/kernel/include
-I/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/../libclone
-I../../../../include -I../../../../include
-L/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/../libclone
-L../../../../lib  mqns_01.c   -lltp -o mqns_01

/tmp/ccgIja6r.o: In function `mq_open':
/usr/include/bits/mqueue2.h:49: undefined reference to mq_open' /tmp/ccgIja6r.o: In function main':
/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/mqns_01.c:98:
undefined reference to `do_clone_unshare_test' /scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/mqns_01.c:123:
undefined reference to `mq_close' /scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/mqns_01.c:124:
undefined reference to `mq_unlink'
/tmp/ccgIja6r.o: In function `mq_open':
/usr/include/bits/mqueue2.h:49: undefined reference to `mq_open'

Quoted 9 lines

/tmp/ccgIja6r.o: In function `check_mqueue':
/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns/mqns_01.c:65:
undefined reference to `mq_close'
collect2: ld returned 1 exit status
make[1]: *** [mqns_01] Error 1
make[1]: Leaving directory `/scratch/ltp-dev2/ltp/testcases/kernel/containers/mqns'
make: *** [all] Error 2

I finally resolved it. There's definitely a difference in behavior
between ld with binutils 1.18 (my Gentoo desktop) and 1.19 (Fedora 11), where the linker ordering isn't being resolved properly when there are semi-codependent code blocks in libraries (which I think is the case here with ltp_clone_quick...).
Thanks,
-Garrett

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list