On Oct 24, 2024, at 20:00, Mark Millard <mark...@yahoo.com> wrote:

> Dimitry Andric <dim_at_FreeBSD.org> wrote on
> Date: Wed, 23 Oct 2024 18:32:46 UTC :
> 
>> The branch main has been updated by dim:
>> 
>> URL: 
>> https://cgit.FreeBSD.org/src/commit/?id=f3dbef108212460489ae68b4c47e20b73984f433
>> 
>> commit f3dbef108212460489ae68b4c47e20b73984f433
>> Author: Dimitry Andric <d...@freebsd.org>
>> AuthorDate: 2024-10-23 16:49:02 +0000
>> Commit: Dimitry Andric <d...@freebsd.org>
>> CommitDate: 2024-10-23 18:27:43 +0000
>> 
>> Bump __FreeBSD_version for llvm 19.1.2 merge
>> 
>> PR: 280562
>> MFC after: 1 month
>> ---
>> sys/sys/param.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/sys/sys/param.h b/sys/sys/param.h
>> index 8af2f9594bc1..7647c0d6e518 100644
>> --- a/sys/sys/param.h
>> +++ b/sys/sys/param.h
>> @@ -73,7 +73,7 @@
>> * cannot include sys/param.h and should only be updated here.
>> */
>> #undef __FreeBSD_version
>> -#define __FreeBSD_version 1500025
>> +#define __FreeBSD_version 1500026
>> 
>> /*
>> * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
> 
> 
> I've been getting buildworld failures under META_MODE style builds for
> the likes of:
> 
> # Meta data file 
> /usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/share/examples/tests/tests/googletest/sample1_unittest.full.meta
> CMD c++ -target x86_64-unknown-freebsd15.0 
> --sysroot=/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp 
> -B/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/tmp/usr/bin 
> -O2 -pipe -fno-common -DNDEBUG -fPIE -g -gz=zlib -Wno-format-zero-length 
> -fstack-protector-strong -Wsystem-headers -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 -Wno-error=cast-function-type-mismatch 
> -Qunused-arguments 
> -I/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-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
> CWD 
> /usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/share/examples/tests/tests/googletest
> TARGET sample1_unittest.full
> OODATE sample1_unittest.o sample1.o
> -- command output --
> ld: error: undefined symbol: testing::internal::MakeAndRegisterTestInfo(char 
> const*, char const*, char const*, char const*, 
> testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testin
> g::internal::TestFactoryBase*)
>>>> referenced by sample1_unittest.cc:76 
>>>> (/usr/main-src/contrib/googletest/googletest/samples/sample1_unittest.cc:76)
>>>>              sample1_unittest.o:(_GLOBAL__sub_I_sample1_unittest.cc)
>>>> referenced by sample1_unittest.cc:100 
>>>> (/usr/main-src/contrib/googletest/googletest/samples/sample1_unittest.cc:100)
>>>>              sample1_unittest.o:(_GLOBAL__sub_I_sample1_unittest.cc)
>>>> referenced by sample1_unittest.cc:103 
>>>> (/usr/main-src/contrib/googletest/googletest/samples/sample1_unittest.cc:103)
>>>>              sample1_unittest.o:(_GLOBAL__sub_I_sample1_unittest.cc)
>>>> referenced 3 more times
> c++: error: linker command failed with exit code 1 (use -v to see invocation)
> 
> *** Error code 1
> . . .
> 
> Another example is:
> 
> ld: error: undefined symbol: testing::internal::MakeAndRegisterTestInfo(char 
> const*, char const*, char const*, char const*, 
> testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testin
> g::internal::TestFactoryBase*)
>>>> referenced by zfsd_unittest.cc:236 
>>>> (/usr/main-src/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc:236)
>>>>              zfsd_unittest.o:(_GLOBAL__sub_I_zfsd_unittest.cc)
>>>> referenced by zfsd_unittest.cc:242 
>>>> (/usr/main-src/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc:242)
>>>>              zfsd_unittest.o:(_GLOBAL__sub_I_zfsd_unittest.cc)
>>>> referenced by zfsd_unittest.cc:248 
>>>> (/usr/main-src/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc:248)
>>>>              zfsd_unittest.o:(_GLOBAL__sub_I_zfsd_unittest.cc)
>>>> referenced 19 more times
> c++: error: linker command failed with exit code 1 (use -v to see invocation)
> 
> 
> Intersting is the first parameter being "char const *" when the
> MakeAndRegisterTestInfo implementation in
> contrib/googletest/googletest/src/gtest.cc has std::string instead:
> 
> TestInfo* MakeAndRegisterTestInfo(
>    std::string test_suite_name, const char* name, const char* type_param,
>    const char* value_param, CodeLocation code_location,
>    TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc,
>    TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory) {
> . . .
> 
> What I'm finding is that various .o files are not being rebuilt in the
> META_MODE build. For example,
> 
> . . ./cddl/usr.sbin/zfsd/tests/zfsd_unittest.o
> . . ./examples/tests/tests/googletest/sample*_unittest.o
> 
> have maintained old dates in the file system that predate the
> recent update that switched to std::string use.
> 
> Systematic deletion of such .o files allowed META_MODE to then be
> able to complete the buildworld . The removes were (across multiple
> trees):
> 
> # rm 
> /usr/obj/BUILDs/main-*-*dbg-clang/usr/main-src/*/cddl/usr.sbin/zfsd/tests/*.o
> # rm 
> /usr/obj/BUILDs/main-*-*dbg-clang/usr/main-src/*/share/examples/tests/tests/googletest*/*.o
> # rm /usr/obj/BUILDs/main-*-*dbg-clang/usr/main-src/*/tests/sys/capsicum*/*.o
> # rm /usr/obj/BUILDs/main-*-*dbg-clang/usr/main-src/*/tests/sys/fs/fusefs*/*.o
> # rm 
> /usr/obj/BUILDs/main-*-*dbg-clang/usr/main-src/*/lib/googletest/tests/*/*.o


FYI:

>>> Removing old directories
/usr/lib/clang/18/share
rmdir: /usr/lib/clang/18/lib/freebsd: Directory not empty
. . .
rmdir: /usr/lib/clang/18/lib: Directory not empty
. . .
rmdir: /usr/lib/clang/18: Directory not empty

# ls -C1 /usr/lib/clang/18/lib/freebsd/*
/usr/lib/clang/18/lib/freebsd/libclang_rt.asan_static-aarch64.a
/usr/lib/clang/18/lib/freebsd/libclang_rt.fuzzer_interceptors-aarch64.a


===
Mark Millard
marklmi at yahoo.com


Reply via email to