On 2022/02/21 22:12, Klemens Nanni wrote: > On Sat, Feb 19, 2022 at 02:40:24AM -0700, Kurt Mosiejczuk wrote: > > http://build-failures.rhaalovely.net/sparc64/2022-02-16/net/pmacct,postgresql.log > > > checking for cdada_get_ver in -lcdada... no > > configure: error: Could not find libcdada > > The dependency is correctly handled, but AC_CHECK_LIB chokes on how > ports-clang arches handle c++ libs. > > COMPILER_LIBCXX has "stdc++" and "estdc++>=17" for base-clang and > ports-gcc, respectively. > > This ends up in configure.ac's libcdada AC_CHECK_LIB check as can be > seen in the hackish diff below. > > ${WRKBUILD}/config.log shows the actual error: > > > configure:20504: checking for cdada_get_ver in -lcdada > > configure:20529: cc -o conftest -O2 -pipe -I/usr/local/include > > -L/usr/local/lib conftest.c -lcdada -lcdada -lestdc++>=17 -lpthread -lpcap > > -lm -lpthread >&5 > > /usr/bin/ld: cannot find -lestdc++>=17 > > collect2: error: ld returned 1 exit status > > Removing the version spec makes configure work thus fixes the build, > but this hackish attempt doesn't look like a solution. > > Leaving this here for others to chime in.
it _ought_ to use $(CXX) to try and link rather than $(CC), but I don't know if that's viable with this autoconf check. > .for i in ${COMPILER_LIBCXX} > -CXXLIB+= -l$i > +CXXLIB+= -l${i:C/[<>=]+[0-9.]+$//} > .endfor I am okay with this with a comment to explain the regex, e.g. # strip off the library-specs(5) version number check the libcdada port itself should have the same change