Discussion:
Problem with make installworld
(too old to reply)
t***@freebsd.org
2024-03-20 20:44:13 UTC
Permalink
Dear all,

I'm trying to run make buildworld / make installworld on a recent main branch
(some days old).

The problem is related to lib/libc/tests/ssp/Makefile
which contains:
_libclang_rt_ubsan= ${SYSROOT}${SANITIZER_LIBDIR}/libclang_rt.ubsan_standalone-${CRTARCH}.a
if exists(${_libclang_rt_ubsan})
PROGS+= h_raw
LDADD.h_raw+= ${SANITIZER_LDFLAGS}

When running make buildworld, we have
${SYSROOT} = /usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp
${SANITIZER_LIBDIR} = /usr/lib/clang/17/lib/freebsd
and so the script is looking for
/usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp/usr/lib/clang/17/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a
which does not exist:
***@blackbird:~ % ls -l /usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp/usr/lib/clang/17/lib/freebsd/
total 652
-r--r--r-- 1 root wheel 284316 Mar 20 18:03 libclang_rt.profile-powerpc.a
-r--r--r-- 1 root wheel 380704 Mar 20 17:41 libclang_rt.profile-powerpc64.a

Therefore, h_raw to NOT built.

However, when make installworld runs, we have
${SYSROOT} =
${SANITIZER_LIBDIR} = /usr/lib/clang/17/lib/freebsd
and so the script is looking for
/usr/lib/clang/17/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a
which does exist:
***@blackbird:~ % ls -l /usr/lib/clang/17/lib/freebsd/
total 47320
-r--r--r-- 1 root wheel 14485032 Dec 24 22:48 libclang_rt.asan-powerpc64.a
-r--r--r-- 1 root wheel 1249352 Dec 24 22:48 libclang_rt.asan-powerpc64.so
-r--r--r-- 1 root wheel 9820 Dec 24 22:48 libclang_rt.asan-preinit-powerpc64.a
-r--r--r-- 1 root wheel 176354 Dec 24 22:48 libclang_rt.asan_cxx-powerpc64.a
-r--r--r-- 1 root wheel 10154 Dec 24 22:48 libclang_rt.asan_static-powerpc64.a
-r--r--r-- 1 root wheel 8261052 Dec 24 22:48 libclang_rt.msan-powerpc64.a
-r--r--r-- 1 root wheel 166924 Dec 24 22:48 libclang_rt.msan_cxx-powerpc64.a
-r--r--r-- 1 root wheel 284316 Dec 24 22:51 libclang_rt.profile-powerpc.a
-r--r--r-- 1 root wheel 380704 Dec 24 22:48 libclang_rt.profile-powerpc64.a
-r--r--r-- 1 root wheel 3925468 Dec 24 22:48 libclang_rt.stats-powerpc64.a
-r--r--r-- 1 root wheel 9770 Dec 24 22:48 libclang_rt.stats_client-powerpc64.a
-r--r--r-- 1 root wheel 14144552 Dec 24 22:48 libclang_rt.tsan-powerpc64.a
-r--r--r-- 1 root wheel 295650 Dec 24 22:48 libclang_rt.tsan_cxx-powerpc64.a
-r--r--r-- 1 root wheel 64462 Dec 24 22:48 libclang_rt.ubsan_minimal-powerpc64.a
-r--r--r-- 1 root wheel 4550190 Dec 24 22:48 libclang_rt.ubsan_standalone-powerpc64.a
-r--r--r-- 1 root wheel 113638 Dec 24 22:48 libclang_rt.ubsan_standalone_cxx-powerpc64.a

Therefore, h_raw is tried to be installed, which fails since it wasn't built.

Is it intended that ${SYSROOT} is different during make installworld and make buildworld?

This is on a Power9 system, but I guess this is not relevant... But maybe I'm wrong.

Best regards
Michael



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dimitry Andric
2024-03-20 23:27:22 UTC
Permalink
Post by t***@freebsd.org
I'm trying to run make buildworld / make installworld on a recent main branch
(some days old).
The problem is related to lib/libc/tests/ssp/Makefile
_libclang_rt_ubsan= ${SYSROOT}${SANITIZER_LIBDIR}/libclang_rt.ubsan_standalone-${CRTARCH}.a
if exists(${_libclang_rt_ubsan})
PROGS+= h_raw
LDADD.h_raw+= ${SANITIZER_LDFLAGS}
When running make buildworld, we have
${SYSROOT} = /usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp
${SANITIZER_LIBDIR} = /usr/lib/clang/17/lib/freebsd
and so the script is looking for
/usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp/usr/lib/clang/17/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a
total 652
-r--r--r-- 1 root wheel 284316 Mar 20 18:03 libclang_rt.profile-powerpc.a
-r--r--r-- 1 root wheel 380704 Mar 20 17:41 libclang_rt.profile-powerpc64.a
Therefore, h_raw to NOT built.
As far as I can see, for powerpc64 it should have been built somewhere during the libraries stage. So it's a bit strange that you don't have the file. Did you use any special options to build?

-Dimitry



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
t***@freebsd.org
2024-03-21 00:12:40 UTC
Permalink
Post by Dimitry Andric
Post by t***@freebsd.org
I'm trying to run make buildworld / make installworld on a recent main branch
(some days old).
The problem is related to lib/libc/tests/ssp/Makefile
_libclang_rt_ubsan= ${SYSROOT}${SANITIZER_LIBDIR}/libclang_rt.ubsan_standalone-${CRTARCH}.a
if exists(${_libclang_rt_ubsan})
PROGS+= h_raw
LDADD.h_raw+= ${SANITIZER_LDFLAGS}
When running make buildworld, we have
${SYSROOT} = /usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp
${SANITIZER_LIBDIR} = /usr/lib/clang/17/lib/freebsd
and so the script is looking for
/usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp/usr/lib/clang/17/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a
total 652
-r--r--r-- 1 root wheel 284316 Mar 20 18:03 libclang_rt.profile-powerpc.a
-r--r--r-- 1 root wheel 380704 Mar 20 17:41 libclang_rt.profile-powerpc64.a
Therefore, h_raw to NOT built.
As far as I can see, for powerpc64 it should have been built somewhere during the libraries stage. So it's a bit strange that you don't have the file. Did you use any special options to build?
No, not any I'm aware of. I can run tests or provide further information.

Best regards
Michael
Post by Dimitry Andric
-Dimitry
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dimitry Andric
2024-03-21 17:12:21 UTC
Permalink
Post by t***@freebsd.org
Post by Dimitry Andric
Post by t***@freebsd.org
I'm trying to run make buildworld / make installworld on a recent main branch
(some days old).
The problem is related to lib/libc/tests/ssp/Makefile
_libclang_rt_ubsan= ${SYSROOT}${SANITIZER_LIBDIR}/libclang_rt.ubsan_standalone-${CRTARCH}.a
if exists(${_libclang_rt_ubsan})
PROGS+= h_raw
LDADD.h_raw+= ${SANITIZER_LDFLAGS}
When running make buildworld, we have
${SYSROOT} = /usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp
${SANITIZER_LIBDIR} = /usr/lib/clang/17/lib/freebsd
and so the script is looking for
/usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp/usr/lib/clang/17/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a
total 652
-r--r--r-- 1 root wheel 284316 Mar 20 18:03 libclang_rt.profile-powerpc.a
-r--r--r-- 1 root wheel 380704 Mar 20 17:41 libclang_rt.profile-powerpc64.a
Therefore, h_raw to NOT built.
As far as I can see, for powerpc64 it should have been built somewhere during the libraries stage. So it's a bit strange that you don't have the file. Did you use any special options to build?
No, not any I'm aware of. I can run tests or provide further information.
This was my mistake: I recently refactored lib/libclang_rt/Makefile to make it more readable and maintainable, but it accidentally broke building of most of the libclang_rt*.a files for powerpc64. It should now be fixed by https://cgit.freebsd.org/src/commit/?id=f0620ceeccf0 .

-Dimitry



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
t***@freebsd.org
2024-03-21 20:13:36 UTC
Permalink
Post by Dimitry Andric
Post by t***@freebsd.org
Post by Dimitry Andric
Post by t***@freebsd.org
I'm trying to run make buildworld / make installworld on a recent main branch
(some days old).
The problem is related to lib/libc/tests/ssp/Makefile
_libclang_rt_ubsan= ${SYSROOT}${SANITIZER_LIBDIR}/libclang_rt.ubsan_standalone-${CRTARCH}.a
if exists(${_libclang_rt_ubsan})
PROGS+= h_raw
LDADD.h_raw+= ${SANITIZER_LDFLAGS}
When running make buildworld, we have
${SYSROOT} = /usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp
${SANITIZER_LIBDIR} = /usr/lib/clang/17/lib/freebsd
and so the script is looking for
/usr/obj/usr/home/tuexen/freebsd-src/powerpc.powerpc64/tmp/usr/lib/clang/17/lib/freebsd/libclang_rt.ubsan_standalone-powerpc64.a
total 652
-r--r--r-- 1 root wheel 284316 Mar 20 18:03 libclang_rt.profile-powerpc.a
-r--r--r-- 1 root wheel 380704 Mar 20 17:41 libclang_rt.profile-powerpc64.a
Therefore, h_raw to NOT built.
As far as I can see, for powerpc64 it should have been built somewhere during the libraries stage. So it's a bit strange that you don't have the file. Did you use any special options to build?
No, not any I'm aware of. I can run tests or provide further information.
This was my mistake: I recently refactored lib/libclang_rt/Makefile to make it more readable and maintainable, but it accidentally broke building of most of the libclang_rt*.a files for powerpc64. It should now be fixed by https://cgit.freebsd.org/src/commit/?id=f0620ceeccf0 .
Hi Dimitry,

I tested the main branch with your fix and I can confirm that the
problem is fixed.

Thank you very much for the quick fix!

Best regards
Michael
Post by Dimitry Andric
-Dimitry
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...