Checking whether `clang++` is available ... no A suitable C++ compiler could not be detected on your system! Set the CXX environment variable to the path to a C++ compiler binary if this is incorrect. >>> Source configured. >>> Compiling source in /var/tmp/portage/net-irc/inspircd-3.16.1/work/inspircd-3.16.1 ... make -j4 'LDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0' 'CXXFLAGS=-O2 -pipe -march=native -fno-diagnostics-color' INSPIRCD_VERBOSE=1 make: *** No targets specified and no makefile found. Stop. * ERROR: net-irc/inspircd-3.16.1::gentoo failed (compile phase): * emake failed ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop_plasma_systemd_merged_usr-20231203-121010 ------------------------------------------------------------------- CC=clang CXX=clang++ gcc-config -l: [1] x86_64-pc-linux-gnu-10 [2] x86_64-pc-linux-gnu-13 * clang/llvm (if any): clang version 17.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/17/bin Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg /usr/lib/llvm/17 17.0.6 Python 3.11.7 Available Ruby profiles: (none found) Available Rust versions: [1] rust-bin-1.74.1 [2] rust-1.74.1 * The following VMs are available for generation-2: 1) Eclipse Temurin JDK 11.0.20.1_p1 [openjdk-bin-11] 2) Eclipse Temurin JDK 17.0.8.1_p1 [openjdk-bin-17] 3) Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21] *) Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 system-vm [2] openjdk-bin-11 [3] openjdk-bin-17 [4] openjdk-bin-21 php cli (if any): go version go1.21.4 linux/amd64 HEAD of ::gentoo commit db21fe99b39f4ec730eb6f4cd0a92f742705f9c9 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sat Dec 9 02:02:07 2023 +0000 2023-12-09 02:02:06 UTC emerge -qpvO net-irc/inspircd [ebuild N ] net-irc/inspircd-3.16.1 USE="gnutls pcre postgres sqlite ssl -argon2 -debug -ldap -maxminddb -mbedtls -mysql -pcre2 -re2 -regex-posix -regex-stdlib -sslrehashsignal -tre"
Created attachment 878540 [details] emerge-info.txt
Created attachment 878541 [details] emerge-history.txt.xz
Created attachment 878542 [details] environment
Created attachment 878543 [details] etc.clang.tar.xz
Created attachment 878544 [details] etc.portage.tar.xz
Created attachment 878545 [details] net-irc:inspircd-3.16.1:20231209-025425.log
Created attachment 878546 [details] qlist-info.txt.xz
Created attachment 878547 [details] temp.tar.xz
Hmm. Not really sure how to triage this one. I filed a bug report upstream: https://github.com/inspircd/inspircd/issues/2070 In the meantime, I don't currently have a clang-based build environment; is there a way to get access to an environment where I can reproduce this issue?
The configure breaks at ``` "/usr/bin/x86_64-pc-linux-gnu-ld.bfd" -pie --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/13 -L/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/lib -L/lib -L/usr/lib -z relro -z now -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/13/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/crtn.o /usr/bin/x86_64-pc-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o: in function `_start': (.text+0x1b): undefined reference to `main' ``` It's trying to use gcc stuff here.
Full log: ``` >>> Emerging (1 of 1) net-irc/inspircd-3.16.1::gentoo * inspircd-3.16.1.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ] * inspircd-3.16.1-fix-build-paths.patch.bz2 BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking inspircd-3.16.1.tar.gz to /var/tmp/portage/net-irc/inspircd-3.16.1/work >>> Unpacking inspircd-3.16.1-fix-build-paths.patch.bz2 to /var/tmp/portage/net-irc/inspircd-3.16.1/work >>> Source unpacked in /var/tmp/portage/net-irc/inspircd-3.16.1/work >>> Preparing source in /var/tmp/portage/net-irc/inspircd-3.16.1/work/inspircd-3.16.1 ... * Applying inspircd-3.16.1-fix-build-paths.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/net-irc/inspircd-3.16.1/work/inspircd-3.16.1 ... Enabling the regex_pcre module ... Enabling the ssl_openssl module ... argon2 = disabled geo_maxmind = disabled ldap = disabled mysql = disabled pgsql = disabled regex_pcre = enabled regex_pcre2 = disabled regex_posix = disabled regex_re2 = disabled regex_stdlib = disabled regex_tre = disabled sqlite3 = disabled ssl_gnutls = disabled ssl_mbedtls = disabled ssl_openssl = enabled sslrehashsignal = disabled Remember: YOU are responsible for making sure any libraries needed have been installed! Configuring InspIRCd 3.16.1 on Linux 6.6.4-gentoo x86_64. Checking whether /var/tmp/portage/net-irc/inspircd-3.16.1/work/inspircd-3.16.1 is writable ... yes clang version 17.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/17/bin Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang++.cfg System configuration file directory: /etc/clang Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/13 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Selected multilib: .;@m64 "/usr/bin/x86_64-pc-linux-gnu-ld.bfd" -pie --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/13 -L/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/lib -L/lib -L/usr/lib -z relro -z now -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/13/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/crtn.o /usr/bin/x86_64-pc-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o: in function `_start': (.text+0x1b): undefined reference to `main' clang++: error: linker command failed with exit code 1 (use -v to see invocation) Checking whether `clang++ -v` is available ... no A suitable C++ compiler could not be detected on your system! Set the CXX environment variable to the path to a C++ compiler binary if this is incorrect. >>> Source configured. >>> Compiling source in /var/tmp/portage/net-irc/inspircd-3.16.1/work/inspircd-3.16.1 ... make -j2 -s 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' CXXFLAGS= INSPIRCD_VERBOSE=1 make: *** No targets specified and no makefile found. Stop. * ERROR: net-irc/inspircd-3.16.1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-irc/inspircd-3.16.1::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-irc/inspircd-3.16.1::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-irc/inspircd-3.16.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-irc/inspircd-3.16.1/temp/environment'. * Working directory: '/var/tmp/portage/net-irc/inspircd-3.16.1/work/inspircd-3.16.1' * S: '/var/tmp/portage/net-irc/inspircd-3.16.1/work/inspircd-3.16.1' ```
I provided our project with a fixing attempt at https://github.com/inspircd/inspircd/pull/2071 Ultimatively, clang++ does not handle -v like g++ does. It's safer to use the long option --verbose.
I believe this is solved in 4.1.0.