steinwurf / cpuid

C++ library for detecting CPU capabilities
https://cpuid.steinwurf.com
Other
105 stars 21 forks source link

Recurse "waf-tools" for "configure" failed with: Unknown compiler: c++ #59

Closed yurivict closed 1 year ago

yurivict commented 1 year ago

Configure breaks:

Checking C++ compiler 'c++'              : Recurse "waf-tools" for "configure" failed with: Unknown compiler: c++
(complete log in /disk-samsung/freebsd-ports/devel/cpuid/work/cpuid-8.0.0-38-g5755ad8/build/freebsd/config.log)

clang-14 FreeBSD 13.1

yurivict commented 1 year ago
$ cat /usr/ports/devel/cpuid/work/cpuid-8.0.0-38-g5755ad8/build/freebsd/config.log
# project cpuid (8.0.0) configured on Tue Aug  2 13:43:57 2022 by
# waf 2.0.22 (abi 20, python 3090df0 on freebsd13)
# using ./waf configure --prefix=/usr/local -j6
#
----------------------------------------
Setting top to
/disk-samsung/freebsd-ports/devel/cpuid/work/cpuid-8.0.0-38-g5755ad8
----------------------------------------
Setting out to
/disk-samsung/freebsd-ports/devel/cpuid/work/cpuid-8.0.0-38-g5755ad8/build/freebsd
----------------------------------------
Using the mkspec:
cxx_default
----------------------------------------
Checking C++ compiler 'c++'
jpihl commented 1 year ago

Unfortunately the waf-tools helper library doesn't support "c++" as the c++ compiler. I'm not familiar with freebsd, but on ubuntu c++ is just a symlink to g++. You can force waf to use a different c++ compiler like so:

CXX=g++ python3 waf configure

Alternatively you can just use CMake to build the library instead.