ElmerCSC / homebrew-elmerfem

Homebrew formula for installing Elmer on Macs
6 stars 15 forks source link

Elmer failed to build on OS 10.12.1 #5

Open dunn opened 8 years ago

dunn commented 8 years ago

From @Norwinvd on October 30, 2016 20:12

Hello,

thanks for supporting the Elmer installation by home-brew. I get stuck, I hope you can fix this.

Please find a copy of the error below.

Cheers, Norwin

Bug reports:

==> cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/elmer/HEAD-d3bf396 -DWITH Last 15 lines from /Users/Norwin/Library/Logs/Homebrew/elmer/01.cmake: -Wno-dev

-- The Fortran compiler identification is GNU 6.2.0 CMake Error at /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/CMakeDetermineCCompiler.cmake:57 (message): Could not find compiler set in environment variable CC:

/usr/local/opt/gcc/bin/gcc-7. Call Stack (most recent call first): CMakeLists.txt:17 (PROJECT)

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage Please replace this line with a brief summary of your issue AND if reporting a build issue include the link from:

brew gist-logs elmer: https://gist.github.com/4e325ec341eae76cc5728b07b7652934 (where <formula> is the name of the formula that failed to build).

Copied from original issue: Homebrew/homebrew-core#6424

github4uw commented 8 years ago

Hi,

I have a similar problem see this post (comment 18.10.2016): https://github.com/ElmerCSC/homebrew-elmerfem/issues/1

In my opinion the script has a buck in creating the environment variables.

I changed the following two lines in elmer.rb to: ENV["CC"] = "/usr/local/Cellar/gcc/6.2.0/bin/gcc-6" ENV["CXX"] = "/usr/local/Cellar/gcc/6.2.0/bin/g++-6" Doing this starts the configuration and compilation process.

However, building now fails due to missing libraries. See link to error log

At the moment, I have no idea how to solve this.

Ok some progress. I could solve some issues by reinstalling gcc (version gcc 6) which seems to solve the issue of finding libraries. (reinstalling gcc after Xcode has been updated) The new error log can be found here

Now I get some warnings and errors such as "error: unknown type name". I am not sure if this is a C/C++ problem.

juhanikataja commented 8 years ago

There seems to be a problem with compiling the metis which is bundled in with elmer. Do you have another version of metis lying around? Disabling metis library with brew unlink metis (or what ever the formula name is..) for the duration of compiling elmer might do the trick.

github4uw commented 8 years ago

I searched for metis packages.

$ find /usr/local -name *metis*
/usr/local/Cellar/boost/1.62.0/include/boost/graph/metis.hpp
/usr/local/Cellar/metis
/usr/local/Cellar/metis/5.1.0/bin/gpmetis
/usr/local/Cellar/metis/5.1.0/bin/m2gmetis
/usr/local/Cellar/metis/5.1.0/bin/mpmetis
/usr/local/Cellar/metis/5.1.0/bin/ndmetis
/usr/local/Cellar/metis/5.1.0/include/metis.h
/usr/local/Cellar/metis/5.1.0/lib/libmetis.dylib
/usr/local/Cellar/metis/5.1.0/share/doc/metis
/usr/local/Cellar/metis/5.1.0/share/metis
/usr/local/Cellar/metis/5.1.0/share/metis/graphs/metis.mesh
/usr/local/Cellar/parmetis
/usr/local/Cellar/parmetis/4.0.3_4/bin/parmetis
/usr/local/Cellar/parmetis/4.0.3_4/bin/pometis
/usr/local/Cellar/parmetis/4.0.3_4/include/parmetis.h
/usr/local/Cellar/parmetis/4.0.3_4/lib/libparmetis.dylib
/usr/local/Cellar/parmetis/4.0.3_4/share/parmetis
/usr/local/Cellar/scotch/6.0.4_4/lib/libptscotchparmetis.dylib
/usr/local/Cellar/scotch/6.0.4_4/lib/libscotchmetis.dylib
/usr/local/Cellar/suite-sparse/4.5.3/share/suite-sparse/demo/SPQR/demo_metis.sh
/usr/local/Cellar/suite-sparse/4.5.3/share/suite-sparse/demo/SPQR/demo_metis2.sh
/usr/local/Cellar/suite-sparse/4.5.3/share/suite-sparse/demo/SPQR/demo_metis3.sh
/usr/local/Cellar/trilinos/12.8.1/include/ml_parmetis_constants.h
/usr/local/Homebrew/Library/Locks/metis.brewing
/usr/local/Homebrew/Library/Locks/parmetis.brewing
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-science/metis.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-science/metis4.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-science/parmetis.rb
/usr/local/include/ml_parmetis_constants.h
/usr/local/lib/libptscotchparmetis.dylib
/usr/local/lib/libscotchmetis.dylib
/usr/local/opt/metis
/usr/local/opt/parmetis
/usr/local/var/homebrew/locks/metis.brewing
/usr/local/var/homebrew/locks/parmetis.brewing

I unlinked metis and parmetis. $ brew unlink metis $ brew unlink parmetis

However, the compilation still fails. The error log can be found here.

Is there way to check that metis from elmer is used during compilation? What else could I do?

tzwinger commented 8 years ago

To me it appears as the trouble would arise from compilation of ElmerGrid: make[2]: * [elmergrid/src/metis/CMakeFiles/metis.dir/kmetis.c.o] Error 1 make[1]: * [elmergrid/src/metis/CMakeFiles/metis.dir/all] Error 2 To me it seems that it tries to compile the Metis library shipped within elmerfem/elmergrid/src/metis and fails therein

github4uw commented 8 years ago

Any idea how to solve this problem?

Norwinvd commented 8 years ago

Hello, I tried some combinations for compiling ...

while using "brew install elmer --HEAD" I can compile it without error. I can also start "Elmergrid" while being in the directory, so I have to add this PATH manually.

I like to use it with elmergui ... while trying to install "elmer gui" with adding "–-with-elmergui" or "elmer ice" with adding "–-with-elmerice" the installation gets stuck showing the error I reported earlier.

I hope this helps to find out where it is getting wrong

github4uw commented 8 years ago

Could you please provide more information about your system? Do you know which compiler version was used during building?