simit-lang / simit

A language for computing on sparse systems
http://simit-lang.org
Other
452 stars 52 forks source link

Compiling on latest ArchLinux - LLVM 6.0 #112

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello community, hello Frederik!

I've recently been tasked with performing a simulation on a box that has the bleeding edge Arch on it.

piotro@p1ohost-kernel -> cmake ../ -- The C compiler identification is GNU 7.3.1 -- The CXX compiler identification is GNU 7.3.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /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: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Debug Build -- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") -- Found Eigen -- Shared library -- Building without gpu-backend -- Found OpenGL: /usr/lib/libOpenGL.so
-- Found GLUT: /usr/lib/libglut.so
-- Found OpenGL and GLUT CMake Error at src/CMakeLists.txt:57 (message): Need LLVM version 3.7 or higher. Found llvm-config version "6.0.0". -- Configuring incomplete, errors occurred! See also "/home/piotro/Sync/Prism/simit/build/CMakeFiles/CMakeOutput.log".

As evident, version 6 is at a loss for this compilation. However, there is an llvm-config available at my box as presented below:

piotro@p1ohost-kernel -> llvm-config --cxxflags -I/usr/include -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -D_GNU_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

I also took a sneak peek into the CMakeLists file only to find line 57 look like so:

set(C_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -Woverloaded-virtual -pedantic-errors -Wno-deprecated")

I'll be diggin into the issue and double checking the paths, however I'm posting this issue to have a clean fallback option discussed. If there is nothing that can be done with these versions, then I guess I'll need to downgrade LLVM. Perhaps a quick hack into CMakeLists? Any help or direction pointing is appreciated.

ghost commented 6 years ago

Didnt have LLVM_CONFIG set, closed.

fredrikbk commented 6 years ago

Glad you found a solution! :)