FreeBSDDesktop / DEPRECATED-freebsd-base-graphics

Fork of FreeBSD's base repository to work on graphics-stack-related projects
Other
49 stars 13 forks source link

in latest drm-next branch, get cmath.h compile error with 11-current installed. #146

Closed pusateri closed 7 years ago

pusateri commented 7 years ago

Just checked out the drm-next tree and I get an error with 'make buildworld' at version 8563ee90e56daac2fce382943bb30f3c9df7a58e

My /etc/src.conf looks like this:

CC=/usr/local/bin/clang40
CXX=/usr/local/bin/clang++40
CPP=/usr/local/bin/clang-cpp40
>>> stage 1.2: bootstrap tools
--------------------------------------------------------------
cd /usr/freebsd-base-graphics; MAKEOBJDIRPREFIX=/usr/obj/usr/freebsd-base-graphics/tmp  INSTALL="sh /usr/freebsd-base-graphics/tools/install.sh"  TOOLS_PREFIX=/usr/obj/usr/freebsd-base-graphics/tmp  PATH=/usr/obj/usr/freebsd-base-graphics/tmp/legacy/usr/sbin:/usr/obj/usr/freebsd-base-graphics/tmp/legacy/usr/bin:/usr/obj/usr/freebsd-base-graphics/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/freebsd-base-graphics/tmp  MAKEFLAGS="-m /usr/freebsd-base-graphics/tools/build/mk  -m /usr/freebsd-base-graphics/share/mk" /usr/obj/usr/freebsd-base-graphics/make.amd64/bmake  -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1100101  SSP_CFLAGS=  MK_HTML=no NO_LINT=yes MK_MAN=no  -DNO_PIC MK_PROFILE=no -DNO_SHARED  -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no  MK_CLANG_EXTRAS=no MK_CLANG_FULL=no  MK_LLDB=no MK_TESTS=no  MK_INCLUDES=yes bootstrap-tools
===> lib/clang/libllvmminimal (obj,all,install)
/usr/obj/usr/freebsd-base-graphics/tmp/usr/freebsd-base-graphics/lib/clang/libllvmminimal created for /usr/freebsd-base-graphics/lib/clang/libllvmminimal
/usr/obj/usr/freebsd-base-graphics/tmp/usr/freebsd-base-graphics/lib/clang/libllvmminimal/Support created for /usr/freebsd-base-graphics/lib/clang/libllvmminimal
/usr/obj/usr/freebsd-base-graphics/tmp/usr/freebsd-base-graphics/lib/clang/libllvmminimal/TableGen created for /usr/freebsd-base-graphics/lib/clang/libllvmminimal
/usr/local/bin/clang++40  -O2 -pipe -I/usr/freebsd-base-graphics/lib/clang/include -I/usr/freebsd-base-graphics/contrib/llvm/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd12.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd12.0\" -DDEFAULT_SYSROOT=\"/usr/obj/usr/freebsd-base-graphics/tmp\" -ffunction-sections -fdata-sections -MD -MF.depend.Support_APInt.o -MTSupport/APInt.o -Qunused-arguments -I/usr/obj/usr/freebsd-base-graphics/tmp/legacy/usr/include -std=c++11 -fno-exceptions -fno-rtti  -stdlib=libc++ -Wno-c++11-extensions  -c /usr/freebsd-base-graphics/contrib/llvm/lib/Support/APInt.cpp -o Support/APInt.o
In file included from /usr/freebsd-base-graphics/contrib/llvm/lib/Support/APInt.cpp:15:
In file included from /usr/freebsd-base-graphics/contrib/llvm/include/llvm/ADT/APInt.h:20:
In file included from /usr/freebsd-base-graphics/contrib/llvm/include/llvm/Support/MathExtras.h:18:
In file included from /usr/freebsd-base-graphics/contrib/llvm/include/llvm/Support/SwapByteOrder.h:19:
In file included from /usr/freebsd-base-graphics/lib/clang/include/llvm/Support/DataTypes.h:34:
/usr/include/c++/v1/cmath:683:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float       acos(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/math.h:660:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY float       acos(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/cmath:679:9: note: using declaration
using ::acos;
        ^
/usr/include/c++/v1/cmath:684:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) ...
                                             ^
/usr/include/c++/v1/math.h:661:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) ...
                                             ^
/usr/include/c++/v1/cmath:679:9: note: using declaration
using ::acos;
        ^
/usr/include/c++/v1/cmath:690:1: error: declaration conflicts with target of
      using declaration already in scope
acos(_A1 __lcpp_x) _NOEXCEPT {return acos((double)__lcpp_x);}
^
/usr/include/c++/v1/math.h:667:1: note: target of using declaration
acos(_A1 __lcpp_x) _NOEXCEPT {return acos((double)__lcpp_x);}
^
/usr/include/c++/v1/cmath:679:9: note: using declaration
using ::acos;
        ^
/usr/include/c++/v1/cmath:698:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float       asin(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/math.h:672:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY float       asin(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/cmath:694:9: note: using declaration
using ::asin;
        ^
/usr/include/c++/v1/cmath:699:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) ...
                                             ^
/usr/include/c++/v1/math.h:673:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) ...
                                             ^
/usr/include/c++/v1/cmath:694:9: note: using declaration
using ::asin;
        ^
/usr/include/c++/v1/cmath:705:1: error: declaration conflicts with target of
      using declaration already in scope
asin(_A1 __lcpp_x) _NOEXCEPT {return asin((double)__lcpp_x);}
^
/usr/include/c++/v1/math.h:679:1: note: target of using declaration
asin(_A1 __lcpp_x) _NOEXCEPT {return asin((double)__lcpp_x);}
^
/usr/include/c++/v1/cmath:694:9: note: using declaration
using ::asin;
        ^
/usr/include/c++/v1/cmath:713:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float       atan(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/math.h:684:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY float       atan(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/cmath:709:9: note: using declaration
using ::atan;
        ^
/usr/include/c++/v1/cmath:714:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) ...
                                             ^
/usr/include/c++/v1/math.h:685:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) ...
                                             ^
/usr/include/c++/v1/cmath:709:9: note: using declaration
using ::atan;
        ^
/usr/include/c++/v1/cmath:720:1: error: declaration conflicts with target of
      using declaration already in scope
atan(_A1 __lcpp_x) _NOEXCEPT {return atan((double)__lcpp_x);}
^
/usr/include/c++/v1/math.h:691:1: note: target of using declaration
atan(_A1 __lcpp_x) _NOEXCEPT {return atan((double)__lcpp_x);}
^
/usr/include/c++/v1/cmath:709:9: note: using declaration
using ::atan;
        ^
/usr/include/c++/v1/cmath:728:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float       atan2(float __lcpp_y, floa...
                                             ^
/usr/include/c++/v1/math.h:696:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY float       atan2(float __lcpp_y, floa...
                                             ^
/usr/include/c++/v1/cmath:724:9: note: using declaration
using ::atan2;
        ^
/usr/include/c++/v1/cmath:729:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y...
                                             ^
/usr/include/c++/v1/math.h:697:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y...
                                             ^
/usr/include/c++/v1/cmath:724:9: note: using declaration
using ::atan2;
        ^
/usr/include/c++/v1/cmath:740:1: error: declaration conflicts with target of
      using declaration already in scope
atan2(_A1 __lcpp_y, _A2 __lcpp_x) _NOEXCEPT
^
/usr/include/c++/v1/math.h:708:1: note: target of using declaration
atan2(_A1 __lcpp_y, _A2 __lcpp_x) _NOEXCEPT
^
/usr/include/c++/v1/cmath:724:9: note: using declaration
using ::atan2;
        ^
/usr/include/c++/v1/cmath:754:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float       ceil(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/math.h:719:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY float       ceil(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/cmath:750:9: note: using declaration
using ::ceil;
        ^
/usr/include/c++/v1/cmath:755:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) ...
                                             ^
/usr/include/c++/v1/math.h:720:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) ...
                                             ^
/usr/include/c++/v1/cmath:750:9: note: using declaration
using ::ceil;
        ^
/usr/include/c++/v1/cmath:761:1: error: declaration conflicts with target of
      using declaration already in scope
ceil(_A1 __lcpp_x) _NOEXCEPT {return ceil((double)__lcpp_x);}
^
/usr/include/c++/v1/math.h:726:1: note: target of using declaration
ceil(_A1 __lcpp_x) _NOEXCEPT {return ceil((double)__lcpp_x);}
^
/usr/include/c++/v1/cmath:750:9: note: using declaration
using ::ceil;
        ^
/usr/include/c++/v1/cmath:769:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float       cos(float __lcpp_x) _NOEXCE...
                                             ^
/usr/include/c++/v1/math.h:731:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY float       cos(float __lcpp_x) _NOEXCE...
                                             ^
/usr/include/c++/v1/cmath:765:9: note: using declaration
using ::cos;
        ^
/usr/include/c++/v1/cmath:770:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _...
                                             ^
/usr/include/c++/v1/math.h:732:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _...
                                             ^
/usr/include/c++/v1/cmath:765:9: note: using declaration
using ::cos;
        ^
/usr/include/c++/v1/cmath:776:1: error: declaration conflicts with target of
      using declaration already in scope
cos(_A1 __lcpp_x) _NOEXCEPT {return cos((double)__lcpp_x);}
^
/usr/include/c++/v1/math.h:738:1: note: target of using declaration
cos(_A1 __lcpp_x) _NOEXCEPT {return cos((double)__lcpp_x);}
^
/usr/include/c++/v1/cmath:765:9: note: using declaration
using ::cos;
        ^
/usr/include/c++/v1/cmath:784:46: error: declaration conflicts with target of
      using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float       cosh(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/math.h:743:46: note: target of using declaration
inline _LIBCPP_INLINE_VISIBILITY float       cosh(float __lcpp_x) _NOEXC...
                                             ^
/usr/include/c++/v1/cmath:780:9: note: using declaration
using ::cosh;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
*** Error code 1

Stop.
bmake[3]: stopped in /usr/freebsd-base-graphics/lib/clang/libllvmminimal
*** Error code 1

Stop.
bmake[2]: stopped in /usr/freebsd-base-graphics
*** Error code 1

Stop.
bmake[1]: stopped in /usr/freebsd-base-graphics
*** Error code 1

Stop.
make: stopped in /usr/freebsd-base-graphics
nomadlogic commented 7 years ago

Can you reproduce this error with a clean checkout from FreeBSD-CURRENT? If so you would probably have better luck reporting it to that mailing list. Another test would be to unset your clang options in src.conf since upstream now uses clang-4.0.

pusateri commented 7 years ago

removing src.conf doesn't help. Maybe my system is hosed. I'm currently running the drm-i915-update-38 branch from https://github.com/freebsd/freebsd-base-graphics. I'll checkout the master on https://github.com/freebsd/freebsd.git and see if it will build.

pusateri commented 7 years ago

Same problem on freebsd current. I'll close this.