Bug 233734 - Possible build race: ld: cannot find -lh_csu
Summary: Possible build race: ld: cannot find -lh_csu
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-02 21:20 UTC by Li-Wen Hsu
Modified: 2018-12-13 12:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Wen Hsu freebsd_committer 2018-12-02 21:20:00 UTC
Failed runs:

https://ci.freebsd.org/job/FreeBSD-head-mips-build/5273/console
https://ci.freebsd.org/job/FreeBSD-head-mips64-build/5365/console

For a failed run ( https://ci.freebsd.org/job/FreeBSD-head-mips-build/5273/consoleText )

We can see only libh_csu.so.full has been built before -lh_csu is used:

$ grep h_csu consoleText
echo cxx_constructors.full: /usr/obj/usr/src/mips.mips/tmp/usr/lib/libc.a /usr/obj/usr/src/mips.mips/lib/csu/tests/dso/libh_csu.so /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c++.a /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c.a >> .depend.cxx_constructors
--- libh_csu.so.full ---
building shared library libh_csu.so
cc --sysroot=/usr/obj/usr/src/mips.mips/tmp -B/usr/obj/usr/src/mips.mips/tmp/usr/bin  -EB -mabi=32   -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o libh_csu.so.full -Wl,-soname,libh_csu.so  `NM='nm' NMFLAGS='' lorder init_test.pico fini_test.pico cxx_constructors.pico |  tsort -q`
echo init_test.full: /usr/obj/usr/src/mips.mips/tmp/usr/lib/libc.a /usr/obj/usr/src/mips.mips/lib/csu/tests/dso/libh_csu.so /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c++.a /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c.a >> .depend.init_test
c++ --sysroot=/usr/obj/usr/src/mips.mips/tmp -B/usr/obj/usr/src/mips.mips/tmp/usr/bin -O -pipe -DDSO_BASE -I/usr/src/lib/csu/mips -G0 -EB -mabi=32 -msoft-float -g -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized  -Wl,-rpath,/usr/tests/lib/csu/dynamiclib -L/usr/obj/usr/src/mips.mips/lib/csu/tests/dso -EB -mabi=32  -o init_test.full  init_test.o -lh_csu -lprivateatf-c++ -lprivateatf-c -lprivateatf-c
/usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: cannot find -lh_csu

But for a successful run: ( https://ci.freebsd.org/job/FreeBSD-head-mips-build/5274/consoleText )

libh_csu.so has beed built before -lh_csu is used:

$ grep h_csu consoleText
--- libh_csu.so.full ---
building shared library libh_csu.so
cc --sysroot=/usr/obj/usr/src/mips.mips/tmp -B/usr/obj/usr/src/mips.mips/tmp/usr/bin  -EB -mabi=32   -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o libh_csu.so.full -Wl,-soname,libh_csu.so  `NM='nm' NMFLAGS='' lorder init_test.pico fini_test.pico cxx_constructors.pico |  tsort -q`
--- libh_csu.so.debug ---
objcopy --only-keep-debug libh_csu.so.full libh_csu.so.debug
--- libh_csu.so ---
objcopy --strip-debug --add-gnu-debuglink=libh_csu.so.debug  libh_csu.so.full libh_csu.so
echo cxx_constructors.full: /usr/obj/usr/src/mips.mips/tmp/usr/lib/libc.a /usr/obj/usr/src/mips.mips/lib/csu/tests/dso/libh_csu.so /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c++.a /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c.a >> .depend.cxx_constructors
c++ --sysroot=/usr/obj/usr/src/mips.mips/tmp -B/usr/obj/usr/src/mips.mips/tmp/usr/bin -O -pipe -DDSO_BASE -I/usr/src/lib/csu/mips -G0 -EB -mabi=32 -msoft-float -g -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized  -Wl,-rpath,/usr/tests/lib/csu/dynamiclib -L/usr/obj/usr/src/mips.mips/lib/csu/tests/dso -EB -mabi=32  -o cxx_constructors.full  cxx_constructors.o -lh_csu -lprivateatf-c++ -lprivateatf-c -lprivateatf-c
echo init_test.full: /usr/obj/usr/src/mips.mips/tmp/usr/lib/libc.a /usr/obj/usr/src/mips.mips/lib/csu/tests/dso/libh_csu.so /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c++.a /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c.a >> .depend.init_test
c++ --sysroot=/usr/obj/usr/src/mips.mips/tmp -B/usr/obj/usr/src/mips.mips/tmp/usr/bin -O -pipe -DDSO_BASE -I/usr/src/lib/csu/mips -G0 -EB -mabi=32 -msoft-float -g -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized  -Wl,-rpath,/usr/tests/lib/csu/dynamiclib -L/usr/obj/usr/src/mips.mips/lib/csu/tests/dso -EB -mabi=32  -o init_test.full  init_test.o -lh_csu -lprivateatf-c++ -lprivateatf-c -lprivateatf-c
echo fini_test.full: /usr/obj/usr/src/mips.mips/tmp/usr/lib/libc.a /usr/obj/usr/src/mips.mips/lib/csu/tests/dso/libh_csu.so /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c++.a /usr/obj/usr/src/mips.mips/tmp/usr/lib/libprivateatf-c.a >> .depend.fini_test
c++ --sysroot=/usr/obj/usr/src/mips.mips/tmp -B/usr/obj/usr/src/mips.mips/tmp/usr/bin -O -pipe -DDSO_BASE -I/usr/src/lib/csu/mips -G0 -EB -mabi=32 -msoft-float -g -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized  -Wl,-rpath,/usr/tests/lib/csu/dynamiclib -L/usr/obj/usr/src/mips.mips/lib/csu/tests/dso -EB -mabi=32  -o fini_test.full  fini_test.o -lh_csu -lprivateatf-c++ -lprivateatf-c -lprivateatf-c
install -N /usr/src/etc  -s -o root -g wheel -m 444   -S  libh_csu.so /usr/obj/usr/src/mips.mips/release/dist/base/usr/tests/lib/csu/dynamiclib//
install -N /usr/src/etc  -o root -g wheel -m 444    libh_csu.so.debug /usr/obj/usr/src/mips.mips/release/dist/base/usr/lib/debug/usr/tests/lib/csu/dynamiclib//
a ./usr/tests/lib/csu/dynamiclib/libh_csu.so
a usr/lib/debug/usr/tests/lib/csu/dynamiclib/libh_csu.so.debug