public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* building --with-build-config=bootstrap-ubsan results in link failure
@ 2022-05-07 15:02 Zdenek Sojka
  2022-05-07 17:36 ` Zdenek Sojka
  0 siblings, 1 reply; 2+ messages in thread
From: Zdenek Sojka @ 2022-05-07 15:02 UTC (permalink / raw)
  To: gcc-help

Hello,

as suggested at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105368#c5 , I
am trying to build gcc (trunk) with --with-build-config=bootstrap-ubsan ,
but the build fails to link in stage2 :

...
make[5]: Entering directory '/repo/build-gcc-trunk-amd64/isl'
/bin/sh ./libtool  --tag=CXX   --mode=link /repo/build-gcc-trunk-amd64/./
prev-gcc/xg++ -B/repo/build-gcc-trunk-amd64/./prev-gcc/ -B/repo/gcc-trunk//
binary-trunk-r13-166-20220507001626-gea3fbfda608-checking-release-bootstrap-
ubsan-amd64/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/repo/build-gcc-trunk-amd
64/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/repo/build-gcc-trunk-
amd64/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/repo/build-
gcc-trunk-amd64/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-
linux-gnu  -I/repo/build-gcc-trunk-amd64/prev-x86_64-pc-linux-gnu/libstdc++-
v3/include  -I/repo/gcc-trunk/libstdc++-v3/libsupc++ -L/repo/build-gcc-trunk
-amd64/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/repo/build-gcc-
trunk-amd64/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -g -O2 -
fno-checking -fsanitize=undefined -DUBSAN_BOOTSTRAP  -static-libstdc++ -
static-libgcc -fsanitize=undefined -static-libubsan -DUBSAN_BOOTSTRAP -B/
repo/build-gcc-trunk-amd64/prev-x86_64-pc-linux-gnu/libsanitizer/ -B/repo/
build-gcc-trunk-amd64/prev-x86_64-pc-linux-gnu/libsanitizer/ubsan/ -B/repo/
build-gcc-trunk-amd64/prev-x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs  -o
isl_test_cpp isl_test_cpp-isl_test_cpp.o libisl.la /repo/build-gcc-trunk-amd
64/./gmp/libgmp.la
libtool: link: /repo/build-gcc-trunk-amd64/./prev-gcc/xg++ -B/repo/build-gcc
-trunk-amd64/./prev-gcc/ -B/repo/gcc-trunk//binary-trunk-r13-166-
20220507001626-gea3fbfda608-checking-release-bootstrap-ubsan-amd64/x86_64-pc
-linux-gnu/bin/ -nostdinc++ -B/repo/build-gcc-trunk-amd64/prev-x86_64-pc-
linux-gnu/libstdc++-v3/src/.libs -B/repo/build-gcc-trunk-amd64/prev-x86_64-
pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/repo/build-gcc-trunk-amd64/prev
-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/repo/build-
gcc-trunk-amd64/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/repo/gcc-
trunk/libstdc++-v3/libsupc++ -g -O2 -fno-checking -fsanitize=undefined -
DUBSAN_BOOTSTRAP -static-libstdc++ -static-libgcc -fsanitize=undefined -
static-libubsan -DUBSAN_BOOTSTRAP -B/repo/build-gcc-trunk-amd64/prev-x86_64-
pc-linux-gnu/libsanitizer/ -B/repo/build-gcc-trunk-amd64/prev-x86_64-pc-
linux-gnu/libsanitizer/ubsan/ -B/repo/build-gcc-trunk-amd64/prev-x86_64-pc-
linux-gnu/libsanitizer/ubsan/.libs -o isl_test_cpp isl_test_cpp-isl_test_
cpp.o  -L/repo/build-gcc-trunk-amd64/prev-x86_64-pc-linux-gnu/libstdc++-v3/
src/.libs -L/repo/build-gcc-trunk-amd64/prev-x86_64-pc-linux-gnu/libstdc++-v
3/libsupc++/.libs ./.libs/libisl.a /repo/build-gcc-trunk-amd64/./gmp/.libs/
libgmp.a
/usr/bin/x86_64-pc-linux-gnu-ld: /repo/build-gcc-trunk-amd64/prev-x86_64-pc-
linux-gnu/libsanitizer/ubsan/.libs/libubsan.a(ubsan_type_hash_itanium.o): in
function `findBaseAtOffset(__cxxabiv1::__class_type_info const*, long)':
/repo/gcc-trunk/libsanitizer/ubsan/ubsan_type_hash_itanium.cpp:162:
undefined reference to `__dynamic_cast'
/usr/bin/x86_64-pc-linux-gnu-ld: /repo/gcc-trunk/libsanitizer/ubsan/ubsan_
type_hash_itanium.cpp:166: undefined reference to `typeinfo for __cxxabiv1::
__vmi_class_type_info'
/usr/bin/x86_64-pc-linux-gnu-ld: /repo/gcc-trunk/libsanitizer/ubsan/ubsan_
type_hash_itanium.cpp:166: undefined reference to `__dynamic_cast'
/usr/bin/x86_64-pc-linux-gnu-ld: /repo/build-gcc-trunk-amd64/prev-x86_64-pc-
linux-gnu/libsanitizer/ubsan/.libs/libubsan.a(ubsan_type_hash_itanium.o): in
function `isDerivedFromAtOffset(__cxxabiv1::__class_type_info const*, __
cxxabiv1::__class_type_info const*, long)':
/repo/gcc-trunk/libsanitizer/ubsan/ubsan_type_hash_itanium.cpp:125:
undefined reference to `__dynamic_cast'
/usr/bin/x86_64-pc-linux-gnu-ld: /repo/gcc-trunk/libsanitizer/ubsan/ubsan_
type_hash_itanium.cpp:129: undefined reference to `typeinfo for __cxxabiv1::
__vmi_class_type_info'
/usr/bin/x86_64-pc-linux-gnu-ld: /repo/gcc-trunk/libsanitizer/ubsan/ubsan_
type_hash_itanium.cpp:129: undefined reference to `__dynamic_cast'
/usr/bin/x86_64-pc-linux-gnu-ld: /repo/build-gcc-trunk-amd64/prev-x86_64-pc-
linux-gnu/libsanitizer/ubsan/.libs/libubsan.a(ubsan_type_hash_itanium.o): in
function `__ubsan::checkDynamicType(void*, void*, unsigned long)':
/repo/gcc-trunk/libsanitizer/ubsan/ubsan_type_hash_itanium.cpp:233:
undefined reference to `__dynamic_cast'
collect2: error: ld returned 1 exit status

I am configuring as:
$ /repo/build-gcc-trunk-amd64/./prev-gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/repo/build-gcc-trunk-amd64/./prev-gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --
enable-valgrind-annotations --disable-nls --enable-checking=release --with-
build-config=bootstrap-ubsan --with-cloog --with-ppl --with-isl --build=x86_
64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --
with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-
gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r13-
166-20220507001626-gea3fbfda608-checking-release-bootstrap-ubsan-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20220507 (experimental) (GCC)


The libraries were downloaded by:
$ contrib/download_prerequisites
gmp-6.2.1.tar.bz2: OK
mpfr-4.1.0.tar.bz2: OK
mpc-1.2.1.tar.gz: OK
isl-0.24.tar.bz2: OK
All prerequisites downloaded successfully.

Is there anything obvious I am doing wrong?

Thanks in advance,
Zdenek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: building --with-build-config=bootstrap-ubsan results in link failure
  2022-05-07 15:02 building --with-build-config=bootstrap-ubsan results in link failure Zdenek Sojka
@ 2022-05-07 17:36 ` Zdenek Sojka
  0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Sojka @ 2022-05-07 17:36 UTC (permalink / raw)
  To: Zdenek Sojka; +Cc: gcc-help

Hello,

---------- Původní e-mail ----------
Od: Zdenek Sojka via Gcc-help <gcc-help@gcc.gnu.org>
Komu: gcc-help@gcc.gnu.org
Datum: 7. 5. 2022 17:04:09
Předmět: building --with-build-config=bootstrap-ubsan results in link
failure
"Hello,

as suggested at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105368#c5 , I
am trying to build gcc (trunk) with --with-build-config=bootstrap-ubsan ,
but the build fails to link in stage2 :

... "



...



"

The libraries were downloaded by:
$ contrib/download_prerequisites
gmp-6.2.1.tar.bz2: OK
mpfr-4.1.0.tar.bz2: OK
mpc-1.2.1.tar.gz: OK
isl-0.24.tar.bz2: OK
All prerequisites downloaded successfully.
"
deleting these downloaded sources and using system libraries fixes this for
me.

Best regards,
Zdenek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-07 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07 15:02 building --with-build-config=bootstrap-ubsan results in link failure Zdenek Sojka
2022-05-07 17:36 ` Zdenek Sojka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).