oscar-system / OscarPolytope.jl

Polytopes for OSCAR
2 stars 4 forks source link

Build error #5

Closed thofma closed 4 years ago

thofma commented 4 years ago

I did ]add https://github.com/oscar-system/OscarPolytope.jl and got

  Building Polymake → `~/.julia/packages/Polymake/MuMBQ/deps/build.log`
  ┌ Error: Error building `Polymake`, showing the last 100 of log: 
  │        (f.template apply<ParametersT>(),...);
  │                                             ^   
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:387:44: note:         ‘ParametersT’
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp: In member function ‘void jlcxx::detail::ForEachParameterType<F, jlcxx::ParameterList<ParametersT ...> >::operator()(F&&)’:
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:387:40: error: expected primary-expression before ‘...’ token
  │        (f.template apply<ParametersT>(),...);
  │                                         ^   
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:387:40: error: expected ‘)’ before ‘...’ token
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:387:44: error: parameter packs not expanded with ‘...’:
  │        (f.template apply<ParametersT>(),...);
  │                                             ^   
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:387:44: note:         ‘ParametersT’
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp: In function ‘void jlcxx::detail::create_parameter_types(jlcxx::ParameterList<ParametersT ...>, std::index_sequence<Indices ...>)’:
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:55: error: expected primary-expression before ‘...’ token
  │      (create_parameter_type<N, ParametersT,Indices>(), ...);
  │                                                        ^   
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:55: error: expected ‘)’ before ‘...’ token
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:59: error: parameter packs not expanded with ‘...’:
  │      (create_parameter_type<N, ParametersT,Indices>(), ...);
  │                                                            ^   
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:59: note:         ‘ParametersT’
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:59: note:         ‘Indices’
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp: In function ‘void jlcxx::detail::create_parameter_types(jlcxx::ParameterList<ParametersT ...>, std::index_sequence<Indices ...>)’:
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:55: error: expected primary-expression before ‘...’ token
  │      (create_parameter_type<N, ParametersT,Indices>(), ...);
  │                                                        ^   
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:55: error: expected ‘)’ before ‘...’ token
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:59: error: parameter packs not expanded with ‘...’:
  │      (create_parameter_type<N, ParametersT,Indices>(), ...);
  │                                                            ^   
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:59: note:         ‘ParametersT’
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/module.hpp:922:59: note:         ‘Indices’
  │ In file included from /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/jlcxx.hpp:15:0,
  │                  from /home/blablabla/.julia/packages/Polymake/MuMBQ/deps/src/polymake_includes.h:7,
  │                  from /home/blablabla/.julia/packages/Polymake/MuMBQ/deps/src/polymake_arrays.cpp:1:
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/smart_pointers.hpp: In static member function ‘static jl_datatype_t* jlcxx::julia_type_factory<T, jlcxx::CxxWrappedTrait<jlcxx::SmartPointerTrait> >::julia_type()’:
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/smart_pointers.hpp:210:8: error: expected ‘(’ before ‘constexpr’
  │      if constexpr(!std::is_same<supertype<PointeeT>, PointeeT>::value)
  │         ^   
  │ In file included from /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/jlcxx.hpp:15:0,
  │                  from /home/blablabla/.julia/packages/Polymake/MuMBQ/deps/src/polymake_includes.h:7,
  │                  from /home/blablabla/.julia/packages/Polymake/MuMBQ/deps/src/polymake.cpp:1:
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/smart_pointers.hpp: In static member function ‘static jl_datatype_t* jlcxx::julia_type_factory<T, jlcxx::CxxWrappedTrait<jlcxx::SmartPointerTrait> >::julia_type()’:
  │ /home/blablabla/.julia/packages/CxxWrap/lDNAy/deps/usr/include/jlcxx/smart_pointers.hpp:210:8: error: expected ‘(’ before ‘constexpr’
  │      if constexpr(!std::is_same<supertype<PointeeT>, PointeeT>::value)
  │         ^   
  │ CMakeFiles/polymake.dir/build.make:62: die Regel für Ziel „CMakeFiles/polymake.dir/polymake.cpp.o“ scheiterte
  │ make[2]: *** [CMakeFiles/polymake.dir/polymake.cpp.o] Fehler 1
  │ make[2]: *** Auf noch nicht beendete Prozesse wird gewartet …
  │ CMakeFiles/polymake.dir/build.make:75: die Regel für Ziel „CMakeFiles/polymake.dir/polymake_arrays.cpp.o“ scheiterte
  │ make[2]: *** [CMakeFiles/polymake.dir/polymake_arrays.cpp.o] Fehler 1
  │ CMakeFiles/Makefile2:75: die Regel für Ziel „CMakeFiles/polymake.dir/all“ scheiterte
benlorenz commented 4 years ago

Can you please attach or upload the full build log ~/.julia/packages/Polymake/MuMBQ/deps/build.log?

Either the C++ compiler seems to be too old for C++17 or the compile flags are not set / detected correctly.

thofma commented 4 years ago

https://gist.github.com/thofma/5ad640cabb22773406164967584f58c2

benlorenz commented 4 years ago

Hm, this doesn't contain the information I had hoped for ... Could you post the contents from ~/.julia/packages/Polymake/MuMBQ/deps/src/CMakeFiles/polymake.dir/flags.make and gcc --version?

thofma commented 4 years ago
~$ cat ~/.julia/packages/Polymake/MuMBQ/deps/src/CMakeFiles/polymake.dir/flags.make
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.15

# compile CXX with /usr/bin/g++
CXX_FLAGS =  -std=c++14 -DPOLYMAKE_VERSION=400 -fPIC -pipe -Wno-error -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function -DPOLYMAKE_WITH_FLINT -O3 -DPOLYMAKE_DEBUG=0 -fPIC   -std=gnu++1z

CXX_DEFINES = -DJULIA_ENABLE_THREADING -Dpolymake_EXPORTS

CXX_INCLUDES = -I/home/thofmann/.julia/packages/CxxWrap/lDNAy/deps/usr/lib/cmake/JlCxx/../../../include -I/home/thofmann/.julia/packages/Polymake/MuMBQ/deps/usr/include/polymake/external -I/home/thofmann/.julia/packages/Polymake/MuMBQ/deps/usr/include -I/home/thofmann/.julia/packages/Polymake/MuMBQ/deps/usr/include/polymake/external/../share/polymake -isystem /home/thofmann/.julia/packages/CxxWrap/lDNAy/deps/usr/include -isystem /home/thofmann/julia/julia-1.1.1/include/julia 

~$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
benlorenz commented 4 years ago

gcc 5 is too old for compiling (against) libcxxwrap-julia, this (if constexpr from C++17) needs at least gcc 7. We should add a version check for the compiler in the Polymake.jl cmake files to catch this earlier and print an error. (We might be able to support gcc 5 and gcc 6 by pre-compiling the libpolymake-julia interface since polymake itself only needs C++14 but we want to switch polymake to C++17 soon so this might not be worth the effort.)

thofma commented 4 years ago

OK, I see. (I am on Ubuntu 16.04 LTS.) Then I'll wait till 2024 when the support ends and when I will have to install a new system anyway. Or I'll try to find another machine :)