Re: Build failure in share/examples/tests/tests/googletest/sample1_unittest.full

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Sun, 20 Oct 2024 13:18:09 UTC
Hello,

Same here with meta-mode on a i7 laptop.

David Wolfskill <david@catwhisker.org> escreveu (domingo, 20/10/2024 à(s)
13:15):

> Running:
> FreeBSD freebeast.catwhisker.org 15.0-CURRENT FreeBSD 15.0-CURRENT #5
> main-n273063-4ad443a106d3: Sat Oct 19 10:38:11 UTC 2024
> root@freebeast.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/GENERIC
> amd64 1500025 1500025
>
> after updating sources to main-n273073-bd66c1b43e33:
>
> ...
> Building
> /common/S4/obj/usr/src/amd64.amd64/tests/sys/pjdfstest/tests/rename/11
> Building
> /common/S4/obj/usr/src/amd64.amd64/tests/sys/pjdfstest/tests/symlink/01
> Building
> /common/S4/obj/usr/src/amd64.amd64/secure/lib/libcrypto/ASN1_generate_nconf.3.gz
> ld: error: undefined symbol:
> testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char
> const*, char const*, testing::internal::CodeLocation, void const*, void
> (*)(), void (*)(), testing::internal::TestFactoryBase*)
> >>> referenced by sample2_unittest.cc:47
> (/usr/src/contrib/googletest/googletest/samples/sample2_unittest.cc:47)
> >>>               sample2_unittest.o:(_GLOBAL__sub_I_sample2_unittest.cc)
> >>> referenced by sample2_unittest.cc:78
> (/usr/src/contrib/googletest/googletest/samples/sample2_unittest.cc:78)
> >>>               sample2_unittest.o:(_GLOBAL__sub_I_sample2_unittest.cc)
> >>> referenced by sample2_unittest.cc:85
> (/usr/src/contrib/googletest/googletest/samples/sample2_unittest.cc:85)
> >>>               sample2_unittest.o:(_GLOBAL__sub_I_sample2_unittest.cc)
> >>> referenced 1 more times
> Building
> /common/S4/obj/usr/src/amd64.amd64/share/man/man5/periodic.conf.5.gz
> Building
> /common/S4/obj/usr/src/amd64.amd64/share/i18n/csmapper/CP/UCS%CP850.mps
> Building /common/S4/obj/usr/src/amd64.amd64/tests/sys/fs/tmpfs/h_tools
> Building
> /common/S4/obj/usr/src/amd64.amd64/share/msgdef_unicode/tr_TR.UTF-8.out
> Building
> /common/S4/obj/usr/src/amd64.amd64/share/man/man9/BUF_TIMELOCK.9.gz
> Building
> /common/S4/obj/usr/src/amd64.amd64/secure/lib/libcrypto/ASN1_item_d2i_bio.3.gz
> Building
> /common/S4/obj/usr/src/amd64.amd64/share/i18n/esdb/APPLE/MACARABIC.src
> Building
> /common/S4/obj/usr/src/amd64.amd64/share/i18n/csmapper/KOI/UCS%KOI8-CyrillicOld.mps
> c++: error: linker command failed with exit code 1 (use -v to see
> invocation)
> *** [sample1_unittest.full] Error code 1
>
> make[8]: stopped making "all" in
> /usr/src/share/examples/tests/tests/googletest
> .ERROR_TARGET='sample1_unittest.full'
>
> .ERROR_META_FILE='/common/S4/obj/usr/src/amd64.amd64/share/examples/tests/tests/googletest/sample1_unittest.full.meta'
> .MAKE.LEVEL='8'
> MAKEFILE=''
> .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
> Building /common/S4/obj/usr/src/amd64.amd64/bin/csh/ja_JP.UTF-8.cat
> _ERROR_CMD='c++ -target x86_64-unknown-freebsd15.0
> --sysroot=/common/S4/obj/usr/src/amd64.amd64/tmp
> -B/common/S4/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-common
> -fPIE -g -gz=zlib -Wno-format-zero-length -fstack-protector-strong
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter
> -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow
> -Wunused-parameter -Wcast-align -Wchar-subscripts -Wdate-time
> -Wmissing-variable-declarations -Wno-empty-body -Wno-string-plus-int
> -Wno-unused-const-variable -Wno-error=unused-but-set-parameter
> -Qunused-arguments
> -I/common/S4/obj/usr/src/amd64.amd64/tmp/usr/include/private
> -DGTEST_HAS_POSIX_RE=1 -DGTEST_HAS_PTHREAD=1
> -DGTEST_HAS_STREAM_REDIRECTION=1 -frtti -fPIE -std=c++14
> -Wno-c++11-extensions  -Wl,-zrelro -pie   -o sample1_unittest.full
> sample1_unittest.o sample1.o -lprivategtest_main -lprivategtest;'
> .CURDIR='/usr/src/share/examples/tests/tests/googletest'
> .MAKE='make'
>
> .OBJDIR='/common/S4/obj/usr/src/amd64.amd64/share/examples/tests/tests/googletest'
> .TARGETS=' all'
> CPUTYPE=''
> DESTDIR='/common/S4/obj/usr/src/amd64.amd64/tmp'
> LD_LIBRARY_PATH=''
> MACHINE='amd64'
> MACHINE_ARCH='amd64'
> MACHINE_CPUARCH='amd64'
> MAKEOBJDIRPREFIX=''
> MAKESYSPATH='/usr/src/share/mk'
> MAKE_VERSION='20240711'
> ....
>
> (Also had a (similar) whine about linker commands failing, for
> tests/sys/capsicum/capsicum-test.full.)
>
> This is in meta-mode, on a 32x2 Epyc running "make -j 112 buildworld".
>
> I have placed copies of the build typescript and the 2 meta files in
> https://www.catwhisker.org/~david/FreeBSD/head/n273073/
>
> I am about to try a similar build on a couple of smaller machines,
> but they may take a while to get to the point of failure.
>
> Peace,
> david
> --
> David H. Wolfskill                              david@catwhisker.org
> It has been said that history repeats itself. This is perhaps not quite
> correct; it merely rhymes. -- Theodor Reik
>
> See https://www.catwhisker.org/~david/publickey.gpg for my public key.
>


-- 
Nuno Teixeira
FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org