Created attachment 453788 [details] build.log > [...] > Making all in example > make[2]: Entering directory '/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/nDPI/example' > x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../src/include -pthread -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -I/usr/include/json-c -c -o ndpiReader.o ndpiReader.c > x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../src/include -pthread -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -I/usr/include/json-c -c -o ndpi_util.o ndpi_util.c > /bin/bash ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -pthread -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -I/usr/include/json-c -static -Wl,-O1 -Wl,--as-needed -ljson-c -o ndpiReader ndpiReader.o ndpi_util.o ../src/lib/libndpi.la -lpcap > libtool: link: x86_64-pc-linux-gnu-gcc -pthread -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -I/usr/include/json-c -Wl,-O1 -o ndpiReader ndpiReader.o ndpi_util.o -Wl,--as-needed ../src/lib/.libs/libndpi.a -ljson-c -lpcap -pthread > make[2]: Leaving directory '/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/nDPI/example' > make[2]: Entering directory '/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/nDPI' > make[2]: Leaving directory '/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/nDPI' > make[1]: Leaving directory '/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/nDPI' > make --jobs 6 > /usr/bin/clang++ -O0 -g -Wall -I/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable -I/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/include -D_FILE_OFFSET_BITS=64 -I/usr/include/hiredis -I/usr/include/hiredis -I/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/third-party/mongoose -I/usr/include/json-c -I./nDPI/src/include -I/usr/include/luajit-2.0 -I/usr/include/mysql -I/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable -I/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/include -I/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/third-party/http-client-c/src/ -DDATA_DIR='"/usr/share"' -I/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/third-party/libgeohash -I/var/tmp/portage/net-analyzer/ntopng-2.4/work/ntopng-2.4-stable/third-party/patricia -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -c src/Paginator.cpp -o src/Paginator.o > clang-3.9: error: unknown argument: '-frecord-gcc-switches' Please also have a look on the "-O0 -g"... ignoring CFlags... # emerge --info [250/250] Portage 2.3.2 (python 3.5.2-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r3, 4.8.6-gentoo x86_64) ================================================================= System uname: Linux-4.8.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.3 KiB Mem: 4015996 total, 2045080 free KiB Swap: 1048572 total, 1048572 free Timestamp of repository gentoo: Sat, 19 Nov 2016 19:22:44 +0000 sh dash 0.5.9.1-r1 ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1 app-shells/bash: 4.4_p5::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.0-r2::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo dev-util/cmake: 3.7.0::gentoo dev-util/pkgconfig: 0.29.1::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.22.3-r1::gentoo sys-apps/sandbox: 2.11-r3::gentoo sys-devel/autoconf: 2.69-r2::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.26.1::gentoo, 2.27::gentoo sys-devel/gcc: 5.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r3::gentoo ABI="amd64" ABI_X86="64" ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" ACCEPT_PROPERTIES="*" ACCEPT_RESTRICT="*" ARCH="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches" CFLAGS_amd64="-m64" CFLAGS_x32="-mx32" CFLAGS_x86="-m32" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x32="x86_64-pc-linux-gnux32" CHOST_x86="i686-pc-linux-gnu" CLEAN_DELAY="5" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="gnutls" CXXFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches" DEFAULT_ABI="amd64" DISTDIR="/usr/portage/distfiles" EDITOR="/bin/nano" ELIBC="glibc" EMERGE_DEFAULT_OPTS="--quiet-build=n --verbose --buildpkg-exclude 'virtual/* net-firewall/xtables-addons'" EMERGE_WARNING_DELAY="10" EPREFIX="" EROOT="/" FCFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches" FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches" GCC_SPECS="" GRUB_PLATFORMS="" GUILE_LOAD_PATH="/usr/share/guile/2.0" HOME="/root" INPUT_DEVICES="keyboard mouse evdev" IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest" JAVAC="/etc/java-config-2/current-system-vm/bin/javac" JAVA_HOME="/etc/java-config-2/current-system-vm" JDK_HOME="/etc/java-config-2/current-system-vm" KERNEL="linux" L10N="en en-US de de-DE fr" LANG="en_US.UTF-8" LC_MESSAGES="C" LC_NUMERIC="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LDFLAGS_amd64="-m elf_x86_64" LDFLAGS_x32="-m elf32_x86_64" LDFLAGS_x86="-m elf_i386" MAKEOPTS="--jobs 6"
Created attachment 453806 [details, diff] Properly utilize user CXX and CXXFLAGS So, it does actually have something for setting the compiler it's just in a GPP variable. I adjusted the build system to use CXX instead, and also made sure CXX compiles were actually using user CFLAGS. Confirmed compilation with both clang and gcc
Thank you for your support. I've pushed your patch.
The make system is still calling g++ directly, see the tracker. I am suggesting the following changes: diff --git a/net-analyzer/ntopng/ntopng-2.4.ebuild b/net-analyzer/ntopng/ntopng-2.4.ebuild index f6c9071b71..91b680bec4 100644 --- a/net-analyzer/ntopng/ntopng-2.4.ebuild +++ b/net-analyzer/ntopng/ntopng-2.4.ebuild @@ -3,7 +3,7 @@ # $Id$ EAPI=5 -inherit autotools eutils user +inherit autotools eutils user toolchain-funcs DESCRIPTION="Network traffic analyzer with web interface" HOMEPAGE="http://www.ntop.org/" @@ -20,7 +20,7 @@ DEPEND="dev-db/sqlite:3 dev-libs/geoip dev-libs/glib:2 dev-libs/libxml2 - net-analyzer/rrdtool + net-analyzer/rrdtool:= net-libs/libpcap net-misc/curl virtual/libmysqlclient" @@ -42,6 +42,7 @@ src_prepare() { } src_configure() { + tc-export CC CXX LD NM OBJDUMP PKG_CONFIG cd "${S}/nDPI" econf cd "${S}" In addition I see that ntopng links to libzmq.so.5, libjson-c.so.2 and libhiredis.so.0.13 on my system. So it looks like you didn't catch all the dependencies.
Please verify