On Wed, Apr 24 2019, Charlene Wendling <[email protected]> wrote: > Hi ports, > > It already happened with gcc-6, but i've a better fix now. > >> http://build-failures.rhaalovely.net/powerpc/2018-11-20/x11/rxvt-unicode.log > > I wasn't able to get why it happened with ports-gcc-8 and not > clang: as they share the same __cplusplus value, they should > have the same operator issues. Until i diffed 'make configure' > on amd64 and macppc to see the difference. > > I've found out that when using clang, rxvt-unicode is not built > with libsupc++. It's not the case with gcc, so i tried building > without libsupc++, and it works. I wonder if there is a eg++ bug > here.
It's not an eg++ bug. Upstream wants to avoid libstdc++ and link against libsupc++ instead to get a smaller executable, etc. This is documented by the gcc folks: https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.what_is_libsupcxx But in ports-gcc the library is renamed: libsupc++ -> libesupc++. The diff below also fixes the build on sparc64, runtime doesn't seem affected. The diff doesn't change anything with clang on amd64 where 1. libesupc++ isn't in the library search path of ./configure 2. even with -L/usr/local/lib in LDFLAGS, the configure test also fails because of missing symbols Using -lesupc++ is probably what upstream would prefer because speed but the difference isn't impressive. Stupid benchmarks on sparc64 with DISPLAY unset: - cc + libesupc++ billy /usr/ports/x11/rxvt-unicode$ time for s in $(jot 100); do urxvt 2>/dev/null; done 0m13.23s real 0m00.10s user 0m01.12s system - c++ billy /usr/ports/x11/rxvt-unicode$ time for s in $(jot 100); do urxvt 2>/dev/null; done 0m15.15s real 0m00.07s user 0m01.28s system I'm leaning toward your solution since it reduces the difference between clang and "ports-gcc" archs. Your call, ok jca@ either way. PS: no need to wait for the usual 1 week timeout IMO Index: patches/patch-configure =================================================================== RCS file: patches/patch-configure diff -N patches/patch-configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-configure 24 Apr 2019 15:34:51 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Try to use libesupc++ with ports-gcc, instead of libsupc++ from base-gcc. + +Index: configure +--- configure.orig ++++ configure +@@ -4499,7 +4499,7 @@ $as_echo_n "checking for working libsupc++... " >&6; } + save_CXX="$CXX" + save_LIBS="$LIBS" + CXX="$CC" +- LIBS="$LIBS -lsupc++" ++ LIBS="$LIBS -lesupc++" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
