https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123045
Bug ID: 123045
Summary: gcc/gdc needs libstdc++ from bootstrap sources to link
anything
Product: gcc
Version: 15.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: kirill at korins dot ky
Target Milestone: ---
When I bootstrap on machine without installed exact version of libstdc++ from
this sources, I can't bootstrap D because of:
configure:5400: checking If /usr/ports/pobj/gcc-15.2.0/build-amd64/./gcc/gdc
-B/usr/ports/pobj/gcc-15.2.0/build-amd64/./gcc/
-B/usr/local/x86_64-unknown-openbsd/bin/
-B/usr/local/x86_64-unknown-openbsd/lib/ -isystem
/usr/local/x86_64-unknown-openbsd/include -isystem
/usr/local/x86_64-unknown-openbsd/sys-include -fno-checking can compile D
sources
configure:5410: /usr/ports/pobj/gcc-15.2.0/build-amd64/./gcc/gdc
-B/usr/ports/pobj/gcc-15.2.0/build-amd64/./gcc/
-B/usr/local/x86_64-unknown-openbsd/bin/
-B/usr/local/x86_64-unknown-openbsd/lib/ -isystem
/usr/local/x86_64-unknown-openbsd/include -isystem
/usr/local/x86_64-unknown-openbsd/sys-include -fno-checking -c -fno-druntime
-nostdinc -I /usr/ports/pobj/gcc-15.2.0/gcc-15.2.0/libphobos/libdruntime -O2
-g conftest.d >&5
ld.so: d21: can't load library 'libestdc++.so.21.0'
gdc: fatal error: Killed signal terminated program d21
compilation terminated.
configure:5410: $? = 1
configure: failed program was:
| module object;
|
|
| extern(C) int main() {
| return 0;
| }
configure:5414: result: no
configure:5416: error: can't compile D sources!
where libestdc++.so.21.0 is an openbsd way of naming gcc-15 libstdc++ in ports.
But, as soon as I install gcc-libs, it builds just fine.
As an ugly workaround I added
LD_LIBRARY_PATH=${WRKBUILD}/prev-${CONFIG}/libstdc++-v3/src/.libs
which allows to bootstrap.
Also, ./gcc/gdc haven't got any dependency to libstdc++, and starts. But it
needs libstdc++ to link resulted test program to binary.
P.S. it is extract from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122924
because this is different issue.