Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2024 20:00:02 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Dimitry Andric <dim@FreeBSD.org>, dev-commits-src-main@freebsd.org
Subject:   RE: git: f3dbef108212 - main - Bump __FreeBSD_version for llvm 19.1.2 merge
Message-ID:  <74372DC6-D878-491B-BF7A-E694711F89E5@yahoo.com>
References:  <74372DC6-D878-491B-BF7A-E694711F89E5.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>=20
> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3Df3dbef108212460489ae68b4c47e20b7=
3984f433
>=20
> commit f3dbef108212460489ae68b4c47e20b73984f433
> Author: Dimitry Andric <dim@FreeBSD.org>
> AuthorDate: 2024-10-23 16:49:02 +0000
> Commit: Dimitry Andric <dim@FreeBSD.org>
> CommitDate: 2024-10-23 18:27:43 +0000
>=20
> Bump __FreeBSD_version for llvm 19.1.2 merge
>=20
> PR: 280562
> MFC after: 1 month
> ---
> sys/sys/param.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> 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
>=20
> /*
> * __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/exam=
ples/tests/tests/googletest/sample1_unittest.full.meta
CMD c++ -target x86_64-unknown-freebsd15.0 =
--sysroot=3D/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd6=
4/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=3Dzlib =
-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=3Dunused-but-set-parameter =
-Wno-error=3Dcast-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=3D1 -DGTEST_HAS_PTHREAD=3D1 =
-DGTEST_HAS_STREAM_REDIRECTION=3D1 -frtti -fPIE -std=3Dc++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/exam=
ples/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:7=
6)
>>>               =
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:1=
00)
>>>               =
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:1=
03)
>>>               =
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/test=
s/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



=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?74372DC6-D878-491B-BF7A-E694711F89E5>