Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elmer build error on 10.11.6 #6

Open
othreed opened this issue Dec 16, 2016 · 9 comments
Open

Elmer build error on 10.11.6 #6

othreed opened this issue Dec 16, 2016 · 9 comments

Comments

@othreed
Copy link

othreed commented Dec 16, 2016

Hi,
I started with a fresh brew install on my el Capitan OSX and ran into an Error about qt4.
I ran:

brew install elmer.rb --with-elmergui --HEAD

I got the message while installing dependencies:
==> Installing dependencies for elmer: qt5

But later i get this this error about wrong QT version

==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Cloning https://github.com/ElmerCSC/elmerfem.git
Updating /Users/ole/Library/Caches/Homebrew/elmer--git
==> Checking out branch devel
==> cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/elmer/HEAD-bc737be -DWITH_Hypre:BOOL=TRUE -DWITH_Mumps:BOOL=TRUE -DWITH_MPI:BOOL=TRUE -DBLAS_LIBRARIES:STRING=/usr/local/opt/openblas/lib/
Last 15 lines from /Users/ole/Library/Logs/Homebrew/elmer/01.cmake:
-- Skipping test WinkelPoissonMetisKwayDual with 16 procs
-- Skipping test WinkelPoissonMetisKwayNodal with 16 procs
-- Found 429 tests
-- Building ElmerGUI



CMake Error at /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindQt4.cmake:1318 (message):
Found unsuitable Qt version "5.7.0" from /usr/local/opt/qt5/bin/qmake, this
code requires Qt 4.x
Call Stack (most recent call first):
ElmerGUI/CMakeLists.txt:16 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!
See also "/tmp/elmer-20161216-24660-y17ugg/build/CMakeFiles/CMakeOutput.log".

Do not report this issue to Homebrew/brew or Homebrew/core!

How do I resolve the problem with QT4 Not found?

@juhanikataja
Copy link
Contributor

Can you install qt4 using homebrew at all anymore? If not, then it means that ElmerGUI needs to be migrated to use Qt5.

@othreed
Copy link
Author

othreed commented Dec 17, 2016

I saw that homebrew created three directories:
/usr/local/opt/qt5/
/usr/local/opt/qt/ <- this should be 4.x
/usr/local/opt/qwt/

Any suggestions?

@othreed
Copy link
Author

othreed commented Dec 17, 2016

I cleaned everything in homebrew and started again.

brew install elmer --HEAD --with-elmergui
Updating Homebrew...
==> Installing elmer from elmercsc/elmerfem
==> Installing dependencies for elmercsc/elmerfem/elmer: openssl, libevent, open-mpi, cmake, veclibfort, scalapack, hypre, mumps, qt, libpng, freetype, ftgl, freeimage, gl2ps, tbb, oce, boost, fontconfig, szip, hdf5, jpeg, libtiff, vtk, qt5, qwt

so I wonder why qt5 is neccesary

@Spranky63
Copy link

Spranky63 commented Jan 5, 2017

Same problem here.

OS X 10.11.6
gcc 6.3.0_1
brew version 1.1.6
XCode 8.2.1

Changed my local elmer.rb compiler lines to

ENV["CC"] = "/usr/local/Cellar/gcc/6.3.0_1/bin/gcc-6"
ENV["CXX"] = "/usr/local/Cellar/gcc/6.3.0_1/bin/g++-6"

$brew install elmer --HEAD seemed to compile okay, output was:

==> Installing elmer from elmercsc/elmerfem
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Cloning https://github.com/ElmerCSC/elmerfem.git
Updating /Users/myname/Library/Caches/Homebrew/elmer--git
==> Checking out branch devel
==> cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/elmer/HEAD-c10b88c -DWITH
==> make
==> make install
🍺  /usr/local/Cellar/elmer/HEAD-c10b88c: 226 files, 27M, built in 4 minutes 43 seconds

But $brew reinstall elmer --with-elmergui --HEAD gave following errors related to qt:

Checking out branch devel
==> cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/elmer/HEAD-c10b88c -DWITH_Hypre:BOOL=TRUE -DWITH_Mumps:BOOL=TRUE -DWITH_M
Last 15 lines from /Users/myname/Library/Logs/Homebrew/elmer/01.cmake:
-- Skipping test WinkelPoissonMetisKwayDual with 16 procs
-- Skipping test WinkelPoissonMetisKwayNodal with 16 procs
-- Found 433 tests
--   Building ElmerGUI
-- ------------------------------------------------
-- ------------------------------------------------
CMake Error at /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindQt4.cmake:1318 (message):
  Found unsuitable Qt version "5.7.1" from /usr/local/opt/qt5/bin/qmake, this
  code requires Qt 4.x
Call Stack (most recent call first):
  ElmerGUI/CMakeLists.txt:16 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!

Hoping someone can find away to get the Elmergui to install.

@Spranky63
Copy link

Spranky63 commented Jan 5, 2017

Observation

ElmerGUI depends on qwt in elmer.rb, and the qwt install depends on qt5 see:

$ brew deps qtw

@Spranky63
Copy link

Spranky63 commented Jan 6, 2017

Got a step further, but bare in mind I am not a software engineer or terminal expert.

I commented out a line in the findQT4.cmake file in

/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindQt4.cmake

There are some lines:

set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)

#set(_QT4_QMAKE_NAMES qmake qmake4 qmake-qt4 qmake-mac) **Commented Out by Me**
set(_QT4_QMAKE_NAMES qmake4 qmake-qt4 qmake-mac) **Added by me**
_qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)

if (QT_QMAKE_EXECUTABLE AND
  QTVERSION VERSION_GREATER 3 AND QTVERSION VERSION_LESS 5)

I effectively commented out the qmake option to prevent it loading the one from qt5.

I then renamed the qmake file in /usr/local/Cellar/qt/4.8.7_2/bin to qmake4.

I then did $brew link --force qt

Now doing $brew reinstall elmer --with-elmergui --HEAD

gets past the qt5 problem described above.

Unfortunately still does not 100% build. Gets to 75%. Here is the make log file found under Users/myname/Library/Logs/Homebrew/elmer

02cmake.txt

Again, if anyone can help it would be appreciated. I can confirm Elmersolver is working from the command line as I tried an example.

@Spranky63
Copy link

The Elmer wiki:

http://www.elmerfem.org/elmerwiki/index.php?title=Compiling_ElmerGUI_from_source_with_optional_components

suggests to try commenting out sections of elmerGUI.pri in order to solver compiling problems. I tried modifying the

/Users/mayname/Library/Caches/Homebrew/elmer--git/ElmerGUI

elmerGUI.pri file but this just keeps getting over written by the one in the GIT repository when I do $brew reinstall elmer --with-elmergui --HEAD. Unfortunately I am not a Homebrew expert and so do not know how to modify my local tap elmer.rb file so that the files in a local repository with a modified elmerGUI.pri are used.

I think there might be away to download the elmerfem 8.2 archive, modify it, store it locally and change something in the local tap elmer.rb code lines:

desc "Elmer finite element solver"
 homepage "http://elmerfem.org"

 head "https://github.com/ElmerCSC/elmerfem.git", :branch => "devel"

 stable do
  url "https://github.com/ElmerCSC/elmerfem/archive/release-8.2.tar.gz"
  sha256 "ed4c87895c76003dd81faa464b6d0f38225d43e584f75290df21df629d0a4ecc"
 end

but I do not know how. Help!

Seems as though the Mac Elmer community might be very small and there is not much interest, or they do not use the elmerGUI, judging by how little info and help there is available.

@othreed
Copy link
Author

othreed commented Jan 8, 2017

Hi,
I ask a MAC programmer on Freelancer to do the native compilation and provide clear build instructions for us Darwin *NIX Users. Because I could not get the brew install working.

So hopefully He will get it working natively.

I do not know when he will finish it or if he succeeds but I will publish the result in the Elmer Forum and also here :)

I gave up myself because I have not enough knowledge and my time is limited to do the debugging.

:)

@Spranky63
Copy link

Great Idea othreed.

I managed to comment out some options in ElmerGUI.pri but it did not help. I also tried to install the Elmer 8.0 Archive and got to 79%. Both installs give the fatal error

/tmp/elmer-20170106-53903-izw3ce/ElmerGUI/Application/vtkpost/vtkpost.cpp:67:24: fatal error: QVTKWidget.h: No such file or directory
 #include <QVTKWidget.h>

If you google "Elmer QVTKWidget.h" there are some old posts on the web referring to similar problems i.e.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614952.

It would be great if someone could get it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants