Problem compiling ElmerGUI on 64bit Fedora 14

Discussion about building and installing Elmer
Post Reply
Rnaya
Posts: 1
Joined: 17 Apr 2019, 11:14
Antispam: Yes
Location: Clifton, NJ

Problem compiling ElmerGUI on 64bit Fedora 14

Post by Rnaya » 18 Apr 2019, 07:53

Hello everyone!

I am trying to install Elmer-fem on a x86_64 Fedora 29 machine. There are various things needed to to be installed in this package and I mean a lot of "./configure -> make ->make install" procedures. The problem is that I can't get through the installation of a specific component of Elmer-fem called ElmerGUI due to (I think) a problem in defining the correct paths of tcl, tk and FTGL libraries. Specifically, I can't get through the compilation of the "post" folder, therefore, I can't install fully Elmer-fem.

Here is my problem. I downloaded the trunk folder of elmerfem and I try to compile it using the compile.sh script with the addition of :
Code:

Code: Select all

#the compiler flags
export CFLAGS=""
export FCFLAGS=""
export F77FLAGS=""
export FFLAGS=""
export CXXFLAGS="-I/usr/include/FTGL -I/usr/lib64/tk8.5 -I/usr/lib64/tcl8.5"
#linking
export LDFLAGS=""
#paths
export ELMER_HOME="/home/user/Programs/elmerfem/trunk"
I tried to specify the correct library folders differently (like putting the line of CXXFLAGS at CFLAGS. All libraries exist and the paths are correct. Nothing has worked so far. The compiler can't find the tcl, tk and FTGL libraries!

Code:

Code: Select all

 ---A lot of checking---
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termio.h usability... yes
checking termio.h presence... yes
checking for termio.h... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for cc_r... gcc
checking whether we are using the Microsoft C compiler... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for OpenGL library... -lGL
checking for OpenGL Utility library... -lGLU
checking for -ltcl8.6 -ltk8.6 libs in -L/usr/lib... no
checking for -ltcl8.5 -ltk8.5 libs in -L/usr/lib... yes
checking for tcl.h in -I/usr/include... ok
checking for tk.h in -I/usr/include... no
checking for tcl.h in -I/usr/include/tcl8.6... ok



--A lot of checking for tk and tcl--

checking for tk.h in -I/really/weird/place/tk81... no
checking for tcl.h in -I/ok/I/quit... ok
checking for tk.h in -I/ok/I/quit... no
checking for tcl.h in -I/ok/I/quit/tcl86... ok
checking for tk.h in -I/ok/I/quit/tk86... no
checking for tcl.h in -I/ok/I/quit/tcl85... ok
checking for tk.h in -I/ok/I/quit/tk85... no
checking for tcl.h in -I/ok/I/quit/tcl84... ok
checking for tk.h in -I/ok/I/quit/tk84... no
checking for tcl.h in -I/ok/I/quit/tcl83... ok
checking for tk.h in -I/ok/I/quit/tk83... no
checking for tcl.h in -I/ok/I/quit/tcl82... ok
checking for tk.h in -I/ok/I/quit/tk82... no
configure: WARNING: Couldn't determine tcl.h and tk.h location. Specify it manually with CFLAGS and CXXFLAGS
checking how to run the C++ preprocessor... g++ -E
checking for /usr/local/bin/freetype-config... no
checking for /usr/bin/freetype-config... yes

   FT_LIBS:            -lfreetype
   FT_CFLAGS:          -I/usr/include/freetype2
   
checking for printf in -lftgl... yes
checking FTGL/ftgl.h usability... no
checking FTGL/ftgl.h presence... no
checking for FTGL/ftgl.h... no

   ********************************************
   ***    WARNING: FTGL/ftgl.h not found    ***
   ***    Trying to locate the old style    ***
   ***         FTGL/FTGL.h instead          ***
   ********************************************
  
checking FTGL/FTGL.h usability... no
checking FTGL/FTGL.h presence... no
checking for FTGL/FTGL.h... no
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for error_at_line... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking return type of signal handlers... void
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for floor... no
checking for gettimeofday... yes
checking for memset... yes
checking for sqrt... no
checking for strerror... yes
checking for shl_load in -ldld... no
checking for shl_load... no
checking for shl_findsym... no
checking for dlopen in -ldl... yes
checking for dlopen... yes
checking for dlsym... yes
checking for dlerror... yes
checking for dlclose... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/camera/Makefile
config.status: creating src/elements/Makefile
config.status: creating src/graphics/Makefile
config.status: creating src/modules/Makefile
config.status: creating src/objects/Makefile
config.status: creating src/sico2elmer/Makefile
config.status: creating src/glaux/Makefile
config.status: creating src/tk/Makefile
config.status: creating src/tcl/Makefile
config.status: creating src/visuals/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

ElmerPost build options:
  Version                   5.5.0
  Install prefix            /home/tmac/Programs/elmerfem/trunk
  CFLAGS                    -I/usr/include/FTGL -I/usr/lib64/tk8.5 -I/usr/lib64/tcl8.5 -m64 -fPIC -I/home/tmac/Programs/elmerfem/trunk/include -pthread -pthread -I/usr/include/freetype2
  CXXFLAGS                  -I/usr/include/FTGL -I/usr/lib64/tk8.5 -I/usr/lib64/tcl8.5 -m64 -fPIC -pthread -pthread -I/usr/include/freetype2
  FCFLAGS                   -O -m64 -fPIC -I. -I/home/tmac/Programs/elmerfem/trunk/include

  LDFLAGS                   -L.  -L/home/tmac/Programs/elmerfem/trunk/lib
  LIBS                      -lftgl -ldl -L.  -L/home/tmac/Programs/elmerfem/trunk/lib -lGL  -lm -lGLU -lGL  -lm -lmatc -L/usr/lib -ltk8.5 -ltcl8.5 -lfreetype -lftgl

Compilers:
  Fortran 90 compiler       gfortran
  CC                        gcc
  C++                       g++

Libs:
  OpenGL                    -lGL  -lm -lGLU -lGL  -lm
  MATC			    -lmatc
  Tcl/Tk		    -L/usr/lib -ltk8.5 -ltcl8.5
  FTGL                      -lftgl -lfreetype

Making clean in src
make[1]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src'
Making clean in elements
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/elements'
test -z "libelements.a" || rm -f libelements.a
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/elements'
Making clean in tcl
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/tcl'
make[2]: Nothing to be done for `clean'.
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/tcl'
Making clean in visuals
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/visuals'
test -z "libvisuals.a" || rm -f libvisuals.a
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/visuals'
Making clean in objects
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/objects'
test -z "libobjects.a" || rm -f libobjects.a
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/objects'
Making clean in sico2elmer
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/sico2elmer'
test -z "sico2elmer" || rm -f sico2elmer
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/sico2elmer'
Making clean in modules
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/modules'
test -z "libmodule.a" || rm -f libmodule.a
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/modules'
Making clean in graphics
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/graphics'
test -z "libgraphics.a" || rm -f libgraphics.a
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/graphics'
Making clean in camera
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/camera'
test -z "libcamera.a" || rm -f libcamera.a
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/camera'
Making clean in glaux
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/glaux'
test -z "libglaux.a" || rm -f libglaux.a
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/glaux'
Making clean in tk
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src/tk'
test -z "libtk.a" || rm -f libtk.a
rm -f *.o
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src/tk'
Making clean in .
make[2]: Entering directory `/home/tmac/Programs/elmerfem/trunk/post/src'
test -z "ElmerPost QueryGLXExt" || rm -f ElmerPost QueryGLXExt
rm *.so
rm: cannot remove `*.so': No such file or directory
make[2]: *** [clean-local] Error 1
make[2]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src'
make[1]: *** [clean-recursive] Error 1
make[1]: Leaving directory `/home/tmac/Programs/elmerfem/trunk/post/src'
make: *** [clean-recursive] Error 1
ElmerGrid and ElmerMesh2D are installed.
Any ideas? I need Elmer to work on a project for simulating waveguides in 3D and it looks really cool and capable of doing things like that but I can't get it fully installed.

kevinarden
Posts: 155
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Problem compiling ElmerGUI on 64bit Fedora 14

Post by kevinarden » 18 Apr 2019, 12:13

https://www.csc.fi/web/elmer/binaries

easier to install it with a PPA , although use elmerfem-csc-eg to get ElmerGUI

or use a virtual machine,but there are compile instructions at the bottom of the page.

kevinarden
Posts: 155
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Problem compiling ElmerGUI on 64bit Fedora 14

Post by kevinarden » 19 Apr 2019, 02:03

The binaries are for debian, Fedora is not debian based.
The Virtual machine would work. However if you still want to compile ElmerGUI the following is from the ElmerGUI directory of the github source.

Brief build instructions for ElmerGUI:
--------------------------------------

Prequisites:

- Qt 4 (4.8 or higher)

Optional components:

- Qwt 6 (for qt 4.8)
- Vtk 5 (compiled with qt 4.8)
- Open Cascade (programmed with 6.3, but versions 6.2-6.5 seems to work as well.)
- PythonQt (see ./PythonQt/README for more details)
- Tetgen (1.4.2 or newer)

Please read the file LICENSES before using any of these software components.

Tetgen should be installed as described in ../misc/tetgen_plugin/RAEDME

In order to compile ElmerGUI, edit the file ElmerGUI.pri and select the
optional components to build. You should also define the directories where
the external libraries and their headers reside.

If this is the first time you compile ElmerGUI, the following lines may be
commented out in order to minimize possible compilation problems (add the
lines gradually back later):

#------------------------------------------------------------------------------
# Optional components:
#------------------------------------------------------------------------------
# DEFINES += EG_QWT # Use QWT for convergence monitor?
# DEFINES += EG_VTKP # Use VTK for postprocessing?
# DEFINES += EG_MATC # Use MATC for internal operations in postprocessing?
# DEFINES += EG_OCC # Use OpenCASCADE for importing CAD files?
# DEFINES += EG_PYTHONQT # Use PythonQt for scripting in post processor?

Compile as:

$ qmake
$ make

This should produce the executable "./ElmerGUI" or "./release/ElmerGUI.exe"

If the plugin for tetgen is found in the path (LD_LIBRARY_PATH for Unix,
and PATH for Windows), its functionality will be available when the program
starts. If the library is not found, the main program will run, but with'
some functionality disabled.

Finally install the program by typing

$ make install

Finally set the environment variable ELMERGUI_HOME = $ELMER_HOME/bin
and make sure it is in PATH (ELMER_HOME is defined in ElmerGUI.pri).

Post Reply