[FIXED] Compilation of current version from GIT is broken

Discussion about building and installing Elmer
Post Reply
dvlierop
Posts: 15
Joined: 16 Feb 2011, 23:21

[FIXED] Compilation of current version from GIT is broken

Post by dvlierop »

Using today's version from the GIT repository, compilation fails on Ubuntu 14.04:

Code: Select all

CMake Error at fem/tests/CMakeLists.txt:34 (ADD_SUBDIRECTORY):
  The source directory

    /home/diederik/src_latest/elmerfem/fem/tests/CMakeFiles

  does not contain a CMakeLists.txt file.
This is the full output:

Code: Select all

Cloning into 'elmerfem'...
remote: Counting objects: 13017, done.
remote: Total 13017 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (13017/13017), 34.40 MiB | 3.63 MiB/s, done.
Resolving deltas: 100% (7418/7418), done.
Checking connectivity... done.
-- The Fortran compiler identification is GNU
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working Fortran compiler: /usr/bin/f95
-- Check for working Fortran compiler: /usr/bin/f95  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 -- yes
-- 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
-- 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
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Found MPI_Fortran: /usr/lib/libmpi_f90.so;/usr/lib/libmpi_f77.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so  
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- A library with BLAS API found.
-- A library with BLAS API found.
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Finding Mumps
-- Finding SCALAPACK
-- Checking if BLACS library is needed by SCALAPACK
-- Looking for Fortran blacs_gridinit
-- Looking for Fortran blacs_gridinit - not found
-- Checking if BLACS library is needed by SCALAPACK -- yes
-- Finding BLACS
-- A library with BLACS API found.
-- BLACS libraries: /usr/lib/libblacs-openmpi.so
-- Checking if Metis library is needed by Mumps
-- Checking if Metis library is needed by Mumps -- yes
-- Finding Metis
-- Checking if ParMetis library is needed by Mumps
-- Checking if ParMetis library is needed by Mumps -- yes
-- Finding ParMetis
-- A library with Mumps API found.
-- Mumps include dir: /usr/include
-- Mumps libraries: /usr/lib/libdmumps.so;/usr/lib/libmumps_common.so;/usr/lib/libpord.so;/usr/lib/libscalapack-openmpi.so;/usr/lib/libblacs-openmpi.so;/usr/lib/libmetis.so;/usr/lib/libparmetis.so
-- Checking whether /usr/bin/f95 supports CONTIGUOUS
-- Checking whether /usr/bin/f95 supports CONTIGUOUS -- yes
-- Checking whether /usr/bin/f95 supports EXECUTE_COMMAND_LINE
-- Checking whether /usr/bin/f95 supports EXECUTE_COMMAND_LINE -- yes
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
CMake Error at fem/tests/CMakeLists.txt:34 (ADD_SUBDIRECTORY):
  The source directory

    /home/diederik/src_latest/elmerfem/fem/tests/CMakeFiles

  does not contain a CMakeLists.txt file.


-- ------------------------------------------------
--   BLAS library:   /usr/lib/libblas.so
--   LAPACK library: /usr/lib/liblapack.so;/usr/lib/libblas.so
-- ------------------------------------------------
--   Fortran compiler:        /usr/bin/f95
--   Fortran flags:           
-- ------------------------------------------------
--   C compiler:              /usr/bin/cc
--   C flags:                 
-- ------------------------------------------------
--   MPI Fortran:             TRUE
--   MPI Fortran compiler:    /usr/bin/mpif90
--   MPI Fortran flags:       
--   MPI Fortran include dir: /usr/lib/openmpi/include;/usr/lib/openmpi/lib
--   MPI Fortran libraries:   /usr/lib/libmpi_f90.so;/usr/lib/libmpi_f77.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
--   MPI Fortran link flags:  
-- ------------------------------------------------
--   MPI C:             TRUE
--   MPI C compiler:    /usr/bin/mpicc
--   MPI C flags:       
--   MPI C include dir: /usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi
--   MPI C libraries:   /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
--   MPI C flags:       
-- ------------------------------------------------
--   Mumps:             TRUE
--   Mumps include:     /usr/include
--   Mumps libraries:   /usr/lib/libdmumps.so;/usr/lib/libmumps_common.so;/usr/lib/libpord.so;/usr/lib/libscalapack-openmpi.so;/usr/lib/libblacs-openmpi.so;/usr/lib/libmetis.so;/usr/lib/libparmetis.so
-- ------------------------------------------------
-- ------------------------------------------------
--   Package filename: elmerfem-7.0-672d5a7-20141125_Linux-x86_64 
--   Patch version: 7.0-672d5a7 
-- Configuring incomplete, errors occurred!
See also "/home/diederik/src_latest/elmerfem/CMakeFiles/CMakeOutput.log".
See also "/home/diederik/src_latest/elmerfem/CMakeFiles/CMakeError.log".
The revision of November 14th was still ok though. I've attached the CMake log files.

Regards,

Diederik
Attachments
CMakeOutput.log
(49.44 KiB) Downloaded 362 times
CMakeError.log
(4.61 KiB) Downloaded 347 times
Last edited by dvlierop on 27 Nov 2014, 09:52, edited 1 time in total.
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Compilation of current version from GIT is broken

Post by annier »

Hi Diederik,
Did you download from
1. https://github.com/ElmerCSC/elmerfem/tree/devel
or from
2.

Code: Select all

$ svn checkout http://svn.code.sf.net/p/elmerfem/code/trunk elmerfem
If you have not tried the second link, can you let all of us know the result of installing the second one by this way?

Yours
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
kataja
Posts: 74
Joined: 09 May 2014, 16:06
Antispam: Yes

Re: Compilation of current version from GIT is broken

Post by kataja »

Hi Diederik,

looks like you had a subdirectory that did not contain CMakeLists.txt in fem/tests. Now in commit d09cbfd such case is handled that only those test subdirs are added that do contain CMakeLists.txt file.

Cheers,
Juhani
dvlierop
Posts: 15
Joined: 16 Feb 2011, 23:21

Re: Compilation of current version from GIT is broken

Post by dvlierop »

This was indeed the code from Github, as I believe this is the repository where the CMake development is happening. I've been testing this repository recently, and I really like it. It's so much easier and better than the old make system! It's just that I wanted to report this bug, which is likely due to recent changes.

I do know how to compile Elmerfem, and very likely the latest revisions from the svn repository are still compiling happily using make. Not much has changed in the build system of the official svn repository, so I don't feel any urge to test that at the moment.

Diederik
dvlierop
Posts: 15
Joined: 16 Feb 2011, 23:21

Re: Compilation of current version from GIT is broken

Post by dvlierop »

Thanks Juhani, will test that today!
dvlierop
Posts: 15
Joined: 16 Feb 2011, 23:21

Re: [FIXED] Compilation of current version from GIT is broken

Post by dvlierop »

Fix confirmed, thanks a lot!

For the record, there are just these warnings remaining when compiling ElmerGUI from Github using CMake:

Code: Select all

/home/diederik/src_test/elmerfem/ElmerGUI/netgen/libsrc/meshing/ruler3.cpp: In member function ‘int netgen::Meshing3::ApplyRules(netgen::ARRAY<netgen::Point3d>&, netgen::ARRAY<int, 0>&, netgen::ARRAY<netgen::MiniElement2d>&, netgen::INDEX, netgen::INDEX_2_HASHTABLE<int>&, netgen::ARRAY<netgen::Element>&, netgen::ARRAY<int, 0>&, int, double, int, float&)’:
/home/diederik/src_test/elmerfem/ElmerGUI/netgen/libsrc/meshing/ruler3.cpp:233:37: warning: zero-length gnu_printf format string [-Wformat-zero-length]
       sprintf (problems.Elem(ri), "");

Code: Select all

[ 68%] Building CXX object netgen/CMakeFiles/ng.dir/libsrc/general/profiler.cpp.o
/home/diederik/src_test/elmerfem/ElmerGUI/netgen/libsrc/general/profiler.cpp: In static member function ‘static void netgen::NgProfiler::Print(FILE*)’:
/home/diederik/src_test/elmerfem/ElmerGUI/netgen/libsrc/general/profiler.cpp:85:91: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    fprintf(prof,"calls %8i, time %6.2f sec",counts[i],double(tottimes[i]) / CLOCKS_PER_SEC);
                                                                                           ^

Code: Select all

[ 94%] Building CXX object Application/CMakeFiles/ElmerGUI.dir/plugins/egnative.cpp.o
/home/diederik/src_test/elmerfem/ElmerGUI/Application/plugins/egnative.cpp: In function ‘int LoadCommands(char*, ElmergridType*, GridType*, int, const char**, int)’:
/home/diederik/src_test/elmerfem/ElmerGUI/Application/plugins/egnative.cpp:2875:39: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘char (*)[600]’ [-Wformat=]
  sscanf(params,"%s", &(eg->filesin[0]));
                                       ^
/home/diederik/src_test/elmerfem/ElmerGUI/Application/plugins/egnative.cpp:2879:39: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘char (*)[600]’ [-Wformat=]
  sscanf(params,"%s",&(eg->filesout[0]));
                                       ^
That's when compiling today's head from Github on Ubuntu 14.04.1, using GCC 4.8.2. Full log has been attached

Regards,

Diederik
Attachments
ElmerGUI.log
(15.46 KiB) Downloaded 354 times
Post Reply