Opened 4 years ago

Closed 4 years ago

#16434 closed bug (fixed)

[Build System] isl build fails

Reported by: diver Owned by: tqh
Priority: normal Milestone: R1/beta3
Component: Build System Version: R1/beta2
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is btrev43162 building on macOS 10.14.6

/Volumes/Haiku/buildtools/gcc/isl/include/isl/cpp.h:99:22: error: exception specification of overriding function is more lax than base version
        virtual const char *what() const noexcept {
                            ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/exception:102:25: note: overridden virtual function is here
    virtual const char* what() const _NOEXCEPT;
                        ^
In file included from /Volumes/Haiku/buildtools/gcc/isl/isl_test_cpp.cc:16:
/Volumes/Haiku/buildtools/gcc/isl/include/isl/cpp.h:99:34: error: expected ';' at end of declaration list
        virtual const char *what() const noexcept {
                                        ^
                                        ;
/Volumes/Haiku/buildtools/gcc/isl/include/isl/cpp.h:86:7: error: exception specification of overriding function is more lax than base version
class exception : public std::exception {
      ^
/Volumes/Haiku/buildtools/gcc/isl/include/isl/cpp.h:86:7: note: while declaring the implicit destructor for 'exception'
/Library/Developer/CommandLineTools/usr/include/c++/v1/exception:101:13: note: overridden virtual function is here
    virtual ~exception() _NOEXCEPT;
            ^
In file included from /Volumes/Haiku/buildtools/gcc/isl/isl_test_cpp.cc:16:
/Volumes/Haiku/buildtools/gcc/isl/include/isl/cpp.h:131:14: error: no matching function for call to 'make_shared'
                what_str = std::make_shared<std::string>(std::string(file) +
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Volumes/Haiku/buildtools/gcc/isl/include/isl/cpp.h:3169:68: error: no member named 'on_error' in 'isl::exception'
  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);

Attachments (2)

isl_build.log (151.9 KB ) - added by diver 4 years ago.
config.log (13.2 KB ) - added by diver 4 years ago.

Download all attachments as: .zip

Change History (10)

by diver, 4 years ago

Attachment: isl_build.log added

comment:1 by tqh, 4 years ago

IIRC Mac OS uses clang to build cross-tools? I'll take a look..

comment:2 by tqh, 4 years ago

Can you try building with the -std=c14++ build/scripts/build_cross_tools_gcc4 gcc part:

# configure gcc
cd "$gccObjDir"
CFLAGS="$ccFlags -std=c++14" CXXFLAGS="$cxxFlags -std=c++14" "$gccSourceDir/configure" ...

I think we might need to either fix isl to newer C++ standards or add the flag when clang is detected. I'll see if gcc builds with -std=c++17

comment:3 by diver, 4 years ago

With this patch:

git diff ../build/scripts/build_cross_tools_gcc4
diff --git a/build/scripts/build_cross_tools_gcc4 b/build/scripts/build_cross_tools_gcc4
index 4900af6b76..52f62d256c 100755
--- a/build/scripts/build_cross_tools_gcc4
+++ b/build/scripts/build_cross_tools_gcc4
@@ -233,7 +233,7 @@ copy_headers "$haikuSourceDir/headers/posix" "$tmpIncludeDir/posix"

 # configure gcc
 cd "$gccObjDir"
-CFLAGS="$ccFlags" CXXFLAGS="$cxxFlags" "$gccSourceDir/configure" \
+CFLAGS="$ccFlags -std=c++14" CXXFLAGS="$cxxFlags -std=c++14" "$gccSourceDir/configure" \

build fails with:

checking for C compiler default output file name...
configure: error: in `/Volumes/Haiku/haiku/generated/cross-tools-x86_64-build/gcc':
configure: error: C compiler cannot create executables
See `config.log' for more details.

by diver, 4 years ago

Attachment: config.log added

comment:4 by tqh, 4 years ago

I guess it can only be set in CXXFLAGS as it only affects C++.

comment:5 by diver, 4 years ago

With this:

-CFLAGS="$ccFlags" CXXFLAGS="$cxxFlags" "$gccSourceDir/configure" \
+CFLAGS="$ccFlags" CXXFLAGS="$cxxFlags -std=c++14" "$gccSourceDir/configure" \

the build succeeded.

comment:6 by tqh, 4 years ago

Perfect, then I have a way to make clang happy: detect clang, set -std=c++14 for building gcc.

comment:7 by tqh, 4 years ago

Should hopefully be fixed by hrev54945. Sorry for the wait..

comment:8 by diver, 4 years ago

Milestone: UnscheduledR1/beta3
Resolution: fixed
Status: assignedclosed

Confirmed as fixed. Thanks!

Note: See TracTickets for help on using tickets.