oscar-system / Singular.jl

Julia package for the Singular library
Other
32 stars 33 forks source link

Error compiling Singular on MacOS 10.10.5. #238

Closed mohamed-barakat closed 4 years ago

mohamed-barakat commented 4 years ago

The following compilation error was reported to me by Alban Quadrat. He was trying to compile Singular on a MacOS 10.10.5.

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.4.1 (2020-04-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Pkg; Pkg.build("Singular")
  Building LoadFlint → `~/.julia/packages/LoadFlint/42zpR/deps/build.log`
  Building Nemo ─────→ `~/.julia/packages/Nemo/Pc5ui/deps/build.log`
  Building CMake ────→ `~/.julia/packages/CMake/ULbyn/deps/build.log`
  Building Singular ─→ `~/.julia/packages/Singular/GGfzi/deps/build.log`
┌ Error: Error building `Singular`: 
│ -- The C compiler identification is AppleClang 7.0.2.7000181
│ -- The CXX compiler identification is AppleClang 7.0.2.7000181
│ -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
│ -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
│ -- Detecting C compiler ABI info
│ -- Detecting C compiler ABI info - done
│ -- Detecting C compile features
│ -- Detecting C compile features - done
│ -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
│ -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
│ -- Detecting CXX compiler ABI info
│ -- Detecting CXX compiler ABI info - done
│ -- Detecting CXX compile features
│ -- Detecting CXX compile features - done
│ -- Found Julia executable: /Applications/Julia-1.4.app/Contents/Resources/julia/bin/julia
│ -- Julia_VERSION_STRING: 1.4.1
│ -- Julia_INCLUDE_DIRS:   /Applications/Julia-1.4.app/Contents/Resources/julia/include/julia
│ -- Julia_LIBRARY_DIR:    /Applications/Julia-1.4.app/Contents/Resources/julia/lib
│ -- Julia_LIBRARY:        /Applications/Julia-1.4.app/Contents/Resources/julia/lib/libjulia.1.4.dylib
│ -- JULIA_HOME:           /Applications/Julia-1.4.app/Contents/Resources/julia/bin
│ -- Julia_LLVM_VERSION:   v8.0.1
│ -- Julia_WORD_SIZE:      64
│ -- Found Julia: /Applications/Julia-1.4.app/Contents/Resources/julia/lib/libjulia.1.4.dylib (found version "1.4.1") 
│ -- Configuring done
│ -- Generating done
│ -- Build files have been written to: /Users/quadrat/.julia/packages/Singular/GGfzi/deps/xcodetypeinfo/build
│ Scanning dependencies of target hello
│ [ 50%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o
│ In file included from /Users/quadrat/.julia/packages/Singular/GGfzi/deps/xcodetypeinfo/hello.cpp:4:
│ In file included from /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/jlcxx.hpp:13:
│ In file included from /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/array.hpp:4:
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/type_conversion.hpp:204:30: error: unknown template name 'bool_constant'
│ struct IsMirroredType : std::bool_constant<(!std::is_class<T>::value || (std::is_standard_layout<T>::value && std::is_trivial<T>::value)) && !IsSmartPointerType<T>::value>
│                              ^
│ In file included from /Users/quadrat/.julia/packages/Singular/GGfzi/deps/xcodetypeinfo/hello.cpp:4:
│ In file included from /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/jlcxx.hpp:13:
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/array.hpp:220:8: error: expected '(' after 'if'
│     if constexpr(std::is_same<julia_t, ValueT>::value)
│        ^
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/array.hpp:232:8: error: expected '(' after 'if'
│     if constexpr(std::is_same<julia_t, ValueT>::value)
│        ^
│ In file included from /Users/quadrat/.julia/packages/Singular/GGfzi/deps/xcodetypeinfo/hello.cpp:4:
│ In file included from /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/jlcxx.hpp:14:
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/module.hpp:494:36: error: unknown template name 'bool_constant'
│ struct DefaultConstructible : std::bool_constant<std::is_default_constructible<T>::value && !std::is_abstract<T>::value>
│                                    ^
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/module.hpp:500:33: error: unknown template name 'bool_constant'
│ struct CopyConstructible : std::bool_constant<std::is_copy_constructible<T>::value && !std::is_abstract<T>::value>
│                                 ^
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/module.hpp:669:8: error: expected '(' after 'if'
│     if constexpr (CopyConstructible<T>::value)
│        ^
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/module.hpp:706:6: error: expected '(' after 'if'
│   if constexpr (DefaultConstructible<T>::value)
│      ^
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/module.hpp:967:8: error: expected '(' after 'if'
│     if constexpr (!(DefaultConstructible<T>::value && sizeof...(ArgsT) == 0))
│        ^
│ In file included from /Users/quadrat/.julia/packages/Singular/GGfzi/deps/xcodetypeinfo/hello.cpp:4:
│ In file included from /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/jlcxx.hpp:15:
│ /Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949/include/jlcxx/smart_pointers.hpp:210:8: error: expected '(' after 'if'
│     if constexpr(!std::is_same<supertype<PointeeT>, PointeeT>::value)
│        ^
│ 9 errors generated.
│ make[2]: *** [CMakeFiles/hello.dir/hello.cpp.o] Error 1
│ make[1]: *** [CMakeFiles/hello.dir/all] Error 2
│ make: *** [all] Error 2
│ ERROR: LoadError: failed process: Process(`/Users/quadrat/.julia/packages/CMake/ULbyn/deps/usr/bin/cmake --build .`, ProcessExited(2)) [2]
│ 
│ Stacktrace:
│  [1] pipeline_error at ./process.jl:525 [inlined]
│  [2] run(::Cmd; wait::Bool) at ./process.jl:440
│  [3] run(::Cmd) at ./process.jl:438
│  [4] top-level scope at /Users/quadrat/.julia/packages/Singular/GGfzi/deps/build.jl:231
│  [5] include(::String) at ./client.jl:439
│  [6] top-level scope at none:5
│ in expression starting at /Users/quadrat/.julia/packages/Singular/GGfzi/deps/build.jl:209
│ libcxxwrap_prefix = CxxWrap.prefix_path() = "/Users/quadrat/.julia/artifacts/f598f80bcf73532d9dd4a75d657d00235079a949"
│ julia_exec = joinpath(Sys.BINDIR, "julia") = "/Applications/Julia-1.4.app/Contents/Resources/julia/bin/julia"
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:892
wbhart commented 4 years ago

What is hello.cpp? I'm not familiar with this file.

To me the error looks like the version of CxxWrap is somehow wrong, but I don't have an idea as to why.

mohamed-barakat commented 4 years ago

This was a fresh installation of Julia 1.4.1 two weeks ago.

wbhart commented 4 years ago

That file, according to the git history, was added as part of the "workaround" for problems with Xcode 11.4.

I'm going to guess it isn't supposed to compile on certain versions, but instead of the failed compilation being ignored, it is crashing the build.

mohamed-barakat commented 4 years ago

I am personally running Xcode 11.4 everything was working till yesterday (see #237).

wbhart commented 4 years ago

Yeah unfortunately I have no insight into that issue at all. I think @fingolfin is going to have to weigh in on this one, and then maybe we get a hint about the other.

fingolfin commented 4 years ago

I am personally running Xcode 11.4 everything was working till yesterday (see #237).

Are you saying it isn't working for you either? On which OS are you?

Otherwise I'd say the answer is simply this: Xcode on macOS 10.10 does not support C++14 and hence CxxWrap can't be used, hence neither can Singular.jl. This is also documented on https://oscar.computeralgebra.de/install/

mohamed-barakat commented 4 years ago

Thanks for the hint, I missed this info segment. I emailed him he should update his OS.

And since yesterday if have this issue #237. Maybe someone could reproduce it.

mohamed-barakat commented 4 years ago

I will close this issue which I consider resolved.