Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-11-05 17:26:28


[2002-11-05] David Abrahams wrote:

>
>David Abrahams <dave_at_[hidden]> writes:
>
>> David Abrahams <dave_at_[hidden]> writes:
>>
>> collect2: ld returned 1 exit status
>
>....
>
>Whoops! The complete message was intended to be:
>
>I'm still seeing some strange results from my tests of this on Cygwin,
>for which I'd like to request help. I assume the same problems are
>happening on Linux.
>
>You can see for yourself by invoking bjam in
>tools/build/test/v1-testing. Although the executable `link-no' fails
>to link, and even claims to be returning a nonzero exit code, the
>status that comes back from the wait() invocation in the execunix.c is
>zero!
>
> gcc-Link-action
bin/link-no.test/gcc/debug/runtime-link-dynamic/link-no.exe
>
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../libcygwin.a(libcmain.o)(.text+0x7c)
> : undefined reference to `_WinMain_at_16'
> collect2: ld returned 1 exit status
>
>
> export LD_LIBRARY_PATH
> g++ -g -o
"bin/link-no.test/gcc/debug/runtime-link-dynamic/link-no.exe"
> "bin/link-no.test/gcc/debug/runtime-link-dynamic/a.o"
>
>
>And since it's marked FAIL_EXPECTED, the zero staus code gets inverted
>and the test fails:
>
> ...failed gcc-Link-action
>bin/link-no.test/gcc/debug/runtime-link-dynamic/link-no.exe...
>
>I'm baffled as to what might be happening here.

OK... here's my try at it on RH73... Sorry about the length not sure how
much of it is pertinent...

[grafik_at_kludge v1-testing]$ bjam-3.1.3
...found 89 targets...
...updating 75 targets...
MkDir1 bin
MkDir1 bin/link-no.test
MkDir1 bin/link-no.test/gcc
MkDir1 bin/link-no.test/gcc/debug
MkDir1 bin/link-no.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/link-no.test/gcc/debug/runtime-link-dynamic/a.o
gcc-Link-action bin/link-no.test/gcc/debug/runtime-link-dynamic/link-no
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function
`_start':
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x18):
undefined reference to `main'
collect2: ld returned 1 exit status
Chmod1 bin/link-no.test/gcc/debug/runtime-link-dynamic/link-no
chmod: getting attributes of
`bin/link-no.test/gcc/debug/runtime-link-dynamic/link-no': No such file or
directory
MkDir1 bin/link-yes.test
MkDir1 bin/link-yes.test/gcc
MkDir1 bin/link-yes.test/gcc/debug
MkDir1 bin/link-yes.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/link-yes.test/gcc/debug/runtime-link-dynamic/c.o
gcc-Link-action bin/link-yes.test/gcc/debug/runtime-link-dynamic/link-yes
Chmod1 bin/link-yes.test/gcc/debug/runtime-link-dynamic/link-yes
MkDir1 bin/run-yes.test
MkDir1 bin/run-yes.test/gcc
MkDir1 bin/run-yes.test/gcc/debug
MkDir1 bin/run-yes.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/run-yes.test/gcc/debug/runtime-link-dynamic/c.o
gcc-Link-action bin/run-yes.test/gcc/debug/runtime-link-dynamic/run-yes
Chmod1 bin/run-yes.test/gcc/debug/runtime-link-dynamic/run-yes
MkDir1 bin/run-no.test
MkDir1 bin/run-no.test/gcc
MkDir1 bin/run-no.test/gcc/debug
MkDir1 bin/run-no.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/run-no.test/gcc/debug/runtime-link-dynamic/c.o
gcc-Link-action bin/run-no.test/gcc/debug/runtime-link-dynamic/run-no
Chmod1 bin/run-no.test/gcc/debug/runtime-link-dynamic/run-no
MkDir1 bin/fail-link-yes.test
MkDir1 bin/fail-link-yes.test/gcc
MkDir1 bin/fail-link-yes.test/gcc/debug
MkDir1 bin/fail-link-yes.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/fail-link-yes.test/gcc/debug/runtime-link-dynamic/a.o
gcc-Link-action
bin/fail-link-yes.test/gcc/debug/runtime-link-dynamic/fail-link-yes
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function
`_start':
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x18):
undefined reference to `main'
collect2: ld returned 1 exit status

export LD_LIBRARY_PATH
g++ -g -o
"bin/fail-link-yes.test/gcc/debug/runtime-link-dynamic/fail-link-yes"
"bin/fail-link-yes.test/gcc/debug/runtime-link-dynamic/a.o"

...failed gcc-Link-action
bin/fail-link-yes.test/gcc/debug/runtime-link-dynamic/fail-link-yes...
MkDir1 bin/fail-link-no.test
MkDir1 bin/fail-link-no.test/gcc
MkDir1 bin/fail-link-no.test/gcc/debug
MkDir1 bin/fail-link-no.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/fail-link-no.test/gcc/debug/runtime-link-dynamic/c.o
gcc-Link-action
bin/fail-link-no.test/gcc/debug/runtime-link-dynamic/fail-link-no

export LD_LIBRARY_PATH
g++ -g -o
"bin/fail-link-no.test/gcc/debug/runtime-link-dynamic/fail-link-no"
"bin/fail-link-no.test/gcc/debug/runtime-link-dynamic/c.o"

...failed gcc-Link-action
bin/fail-link-no.test/gcc/debug/runtime-link-dynamic/fail-link-no...
...removing
bin/fail-link-no.test/gcc/debug/runtime-link-dynamic/fail-link-no
MkDir1 bin/fail-run-no.test
MkDir1 bin/fail-run-no.test/gcc
MkDir1 bin/fail-run-no.test/gcc/debug
MkDir1 bin/fail-run-no.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/fail-run-no.test/gcc/debug/runtime-link-dynamic/c.o
gcc-Link-action
bin/fail-run-no.test/gcc/debug/runtime-link-dynamic/fail-run-no
Chmod1 bin/fail-run-no.test/gcc/debug/runtime-link-dynamic/fail-run-no
MkDir1 bin/fail-run-yes.test
MkDir1 bin/fail-run-yes.test/gcc
MkDir1 bin/fail-run-yes.test/gcc/debug
MkDir1 bin/fail-run-yes.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/fail-run-yes.test/gcc/debug/runtime-link-dynamic/c.o
gcc-Link-action
bin/fail-run-yes.test/gcc/debug/runtime-link-dynamic/fail-run-yes
Chmod1 bin/fail-run-yes.test/gcc/debug/runtime-link-dynamic/fail-run-yes
MkDir1 bin/fail-link-no-dependency.test
MkDir1 bin/fail-link-no-dependency.test/gcc
MkDir1 bin/fail-link-no-dependency.test/gcc/debug
MkDir1 bin/fail-link-no-dependency.test/gcc/debug/runtime-link-dynamic
gcc-C++-action
bin/fail-link-no-dependency.test/gcc/debug/runtime-link-dynamic/b.o
b.cpp:6:2: #error this does not compile.

g++ -c -Wall -ftemplate-depth-100 -g -O0 -fno-inline -o
"bin/fail-link-no-dependency.test/gcc/debug/runtime-link-dynamic/b.o"
"b.cpp"

...failed gcc-C++-action
bin/fail-link-no-dependency.test/gcc/debug/runtime-link-dynamic/b.o...
...skipped
<fail-link-no-dependency.test/gcc/debug/runtime-link-dynamic>fail-link-no-dependency
for lack of
<fail-link-no-dependency.test/gcc/debug/runtime-link-dynamic>b.o...
MkDir1 bin/a.test
MkDir1 bin/a.test/gcc
MkDir1 bin/a.test/gcc/debug
MkDir1 bin/a.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/a.test/gcc/debug/runtime-link-dynamic/a.o
MkDir1 bin/b.test
MkDir1 bin/b.test/gcc
MkDir1 bin/b.test/gcc/debug
MkDir1 bin/b.test/gcc/debug/runtime-link-dynamic
gcc-C++-action bin/b.test/gcc/debug/runtime-link-dynamic/b.o
b.cpp:6:2: #error this does not compile.
MkDir1 bin/fail-compile-no.test
MkDir1 bin/fail-compile-no.test/gcc
MkDir1 bin/fail-compile-no.test/gcc/debug
MkDir1 bin/fail-compile-no.test/gcc/debug/runtime-link-dynamic
gcc-C++-action
bin/fail-compile-no.test/gcc/debug/runtime-link-dynamic/fail-compile-no.o

g++ -c -Wall -ftemplate-depth-100 -g -O0 -fno-inline -o
"bin/fail-compile-no.test/gcc/debug/runtime-link-dynamic/fail-compile-no.o"
"a.cpp"

...failed gcc-C++-action
bin/fail-compile-no.test/gcc/debug/runtime-link-dynamic/fail-compile-no.o...
...removing
bin/fail-compile-no.test/gcc/debug/runtime-link-dynamic/fail-compile-no.o
MkDir1 bin/fail-compile-yes.test
MkDir1 bin/fail-compile-yes.test/gcc
MkDir1 bin/fail-compile-yes.test/gcc/debug
MkDir1 bin/fail-compile-yes.test/gcc/debug/runtime-link-dynamic
gcc-C++-action
bin/fail-compile-yes.test/gcc/debug/runtime-link-dynamic/fail-compile-yes.o
b.cpp:6:2: #error this does not compile.

g++ -c -Wall -ftemplate-depth-100 -g -O0 -fno-inline -o
"bin/fail-compile-yes.test/gcc/debug/runtime-link-dynamic/fail-compile-yes.o"
"b.cpp"

...failed gcc-C++-action
bin/fail-compile-yes.test/gcc/debug/runtime-link-dynamic/fail-compile-yes.o...
...failed updating 5 targets...
...skipped 1 target...
...updated 69 targets...
[grafik_at_kludge v1-testing]$

...But it does look like it's a problem in Linux also. I'll look at the
execunix code and see if anything obvious hits me.

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk