Quansight / pearu-sandbox

Pearu's sandbox
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

error: function-like macro '__GLIBC_USE' is not defined #9

Open pearu opened 5 years ago

pearu commented 5 years ago
29: In file included from $PREFIX/lib/clang/8.0.1/include/__clang_cuda_runtime_wrapper.h:50:
29: In file included from /usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/cmath:45:
29: /usr/include/math.h:66:23: error: function-like macro '__GLIBC_USE' is not defined
29: #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)

Solution A:

export CFLAGS="$CFLAGS -D__GLIBC_USE\(...\)=0"

Although, it is better to get the include paths right:

    GCCVERSION=$(basename $(dirname $($GXX -print-libgcc-file-name)))
    export CPLUS_INCLUDE_PATH=$PREFIX/$HOST/include/c++/$GCCVERSION:$PREFIX/lib/gcc/$HOST/$GCCVERSION/include
niexin-dev commented 2 years ago

Thank you very much