RJVB / lnxports

A "local port repository" for use with MacPorts on Linux, overriding ports from the main repository.
4 stars 1 forks source link

libgcc13 13.3.0 build error: `undefined reference to `md_reader::md_reader(bool)'` #33

Open barracuda156 opened 1 week ago

barracuda156 commented 1 week ago

@RJVB Is this something familiar?

:info:build     build/genmddeps.o build/read-md.o build/errors.o .././libiberty/pic/libiberty.a
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/./prev-gcc/xg++ -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/./prev-gcc/ -B/opt/local/riscv64-pine64-linux/bin/ -nostdinc++ -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/src/.libs -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/libsupc++/.libs  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/include/riscv64-pine64-linux  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/include  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/libstdc++-v3/libsupc++ -L/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/src/.libs -L/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/libsupc++/.libs -c   -Os -g -fno-checking -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -DGENERATOR_FILE -I. -Ibuild -I/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc -I/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/build -I/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/../include  -I/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/../libcpp/include  \
:info:build     -o build/gengtype.o /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/gengtype.cc
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/./prev-gcc/xg++ -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/./prev-gcc/ -B/opt/local/riscv64-pine64-linux/bin/ -nostdinc++ -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/src/.libs -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/libsupc++/.libs  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/include/riscv64-pine64-linux  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/include  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/libstdc++-v3/libsupc++ -L/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/src/.libs -L/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/libsupc++/.libs   -Os -g -fno-checking -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o build/genconstants \
:info:build     build/genconstants.o build/read-md.o build/errors.o .././libiberty/pic/libiberty.a
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/./prev-gcc/xg++ -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/./prev-gcc/ -B/opt/local/riscv64-pine64-linux/bin/ -nostdinc++ -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/src/.libs -B/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/libsupc++/.libs  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/include/riscv64-pine64-linux  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/include  -isystem /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/libstdc++-v3/libsupc++ -L/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/src/.libs -L/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/prev-riscv64-pine64-linux/libstdc++-v3/libsupc++/.libs   -Os -g -fno-checking -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o build/genenums \
:info:build     build/genenums.o build/read-md.o build/errors.o .././libiberty/pic/libiberty.a
:info:build /opt/local/bin/ld: build/genenums.o: in function `main':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genenums.cc:52:(.text.startup+0x1a): undefined reference to `md_reader::md_reader(bool)'
:info:build /opt/local/bin/ld: build/genenums.o: in function `noop_reader::noop_reader()':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/read-md.h:330:(.text.startup+0x24): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: build/genenums.o: in function `main':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genenums.cc:55:(.text.startup+0x28): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genenums.cc:55:(.text.startup+0x34): undefined reference to `md_reader::read_md_files(int, char const**, bool (*)(char const*))'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genenums.cc:55:(.text.startup+0x3c): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genenums.cc:56:(.text.startup+0x48): undefined reference to `md_reader::~md_reader()'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genenums.cc:61:(.text.startup+0x98): undefined reference to `md_reader::traverse_enum_types(int (*)(void**, void*), void*)'
:info:build collect2: error: ld returned 1 exit status
:info:build make[3]: *** [Makefile:3065: build/genenums] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build /opt/local/bin/ld: build/genmddeps.o: in function `main':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genmddeps.cc:49:(.text.startup+0xe): undefined reference to `include_callback'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genmddeps.cc:46:(.text.startup+0x20): undefined reference to `include_callback'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genmddeps.cc:46:(.text.startup+0x2e): undefined reference to `md_reader::md_reader(bool)'
:info:build /opt/local/bin/ld: build/genmddeps.o: in function `noop_reader::noop_reader()':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/read-md.h:330:(.text.startup+0x38): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/read-md.h:330:(.text.startup+0x3c): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: build/genmddeps.o: in function `main':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genmddeps.cc:53:(.text.startup+0x48): undefined reference to `md_reader::read_md_files(int, char const**, bool (*)(char const*))'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genmddeps.cc:53:(.text.startup+0x50): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genmddeps.cc:66:(.text.startup+0x9c): undefined reference to `md_reader::~md_reader()'
:info:build /opt/local/bin/ld: build/genconstants.o: in function `print_enum_type(void**, void*)':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genconstants.cc:69:(.text+0x8a): undefined reference to `upcase_string(char*)'
:info:build /opt/local/bin/ld: build/genconstants.o: in function `main':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genconstants.cc:82:(.text.startup+0x1a): undefined reference to `md_reader::md_reader(bool)'
:info:build /opt/local/bin/ld: build/genconstants.o: in function `noop_reader::noop_reader()':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/read-md.h:330:(.text.startup+0x24): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: build/genconstants.o: in function `main':
:info:build /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genconstants.cc:85:(.text.startup+0x28): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genconstants.cc:85:(.text.startup+0x34): undefined reference to `md_reader::read_md_files(int, char const**, bool (*)(char const*))'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genconstants.cc:85:(.text.startup+0x3c): undefined reference to `vtable for noop_reader'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genconstants.cc:86:(.text.startup+0x48): undefined reference to `md_reader::~md_reader()'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genconstants.cc:93:(.text.startup+0x8e): undefined reference to `md_reader::traverse_md_constants(int (*)(void**, void*), void*)'
:info:build /opt/local/bin/ld: /opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/gcc-13.3.0/gcc/genconstants.cc:94:(.text.startup+0xa0): undefined reference to `md_reader::traverse_enum_types(int (*)(void**, void*), void*)'
:info:build collect2: error: ld returned 1 exit status
:info:build make[3]: *** [Makefile:3065: build/genmddeps] Error 1
:info:build collect2: error: ld returned 1 exit status
:info:build make[3]: *** [Makefile:3065: build/genconstants] Error 1
:info:build make[3]: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build/gcc'
:info:build make[2]: *** [Makefile:5018: all-stage2-gcc] Error 2
:info:build make[2]: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build'
:info:build make[1]: *** [Makefile:25369: stage2-bubble] Error 2
:info:build make[1]: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build'
:info:build make: *** [Makefile:25592: bootstrap-lean] Error 2
:info:build make: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_home_svacchanda_lnxports_lang_gcc13/libgcc13/work/build" && /usr/bin/make -j4 -w bootstrap-lean 
:info:build Exit code: 2
:error:build Failed to build libgcc13: command execution failed
RJVB commented 1 week ago

On Tuesday September 24 2024 10:43:36 Sergey Fedorov wrote:

@RJVB Is this something familiar?

Not at all.

Are you in contact with Iain? You could ask him if this could have anything to do with the fact we're using his branch.

You could try the +quick variant, which uses a non-bootstrap build that will be a lot easier to triage and maybe patch.

(FWIW, I just realised something was missing from my patch to introduce -stdlib=libc++ support, 1 single, stupid patch hunk, and I have to do a complete rebuild because the bootstrap build couldn't figure out what to do and botched itself.

barracuda156 commented 1 week ago

Are you in contact with Iain? You could ask him if this could have anything to do with the fact we're using his branch.

Yes, though I am not sure he has dealt with riscv. Do we even need to apply Darwin-specific patches outside of Darwin?

RJVB commented 1 week ago

Yes, though I am not sure he has dealt with riscv. Do we even need to apply Darwin-specific patches outside of Darwin?

Need probably not, though I haven't looked at exactly what they offer besides libc++ support. I just like to apply the same patches as much as possible in ports I have on both platforms, and I suppose Iain's goal is also to merge his changes into the main branch and if so he *should be interested to know about side-effects.

I can't really remember why I included them in my Linux build TBH. I remember I excluded them at first, and then there must have been a reason why I decided to include them.

barracuda156 commented 1 week ago

@iains Iain, could you please take a quick look at the error above? Should I open a ticket on GCC bugzilla or it is something known and fixable locally? (This is not powerpc-related, but it uses your branch with minor patches for Linux compatibility.)