Page 1 of 1

make error linking libng.a

Posted: 02 Dec 2017, 02:23
by Gary R
I recently had to completely reinstall my Ubuntu OS and getting Elmer up and running as the last item on my list. I configured and generated using cmake with no errors. I ran make -j4 from the top directory. Make got through about 25% of the compile and link and stopped with the following error:

Code: Select all

[ 25%] Linking CXX static library libng.a
[ 25%] Built target ng
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Any suggestions as to what went wrong.

Gary R

Re: make error linking libng.a

Posted: 02 Dec 2017, 22:08
by Gary R
Amendment:
The libng.a file lives at /Elmer/build/ElmerGUI/netgen/ and seems to have been produced. I is a 60Mb file. Hope this helps.

Gary R.

Re: make error linking libng.a

Posted: 03 Dec 2017, 00:49
by Gary R
Amendment II:
The passage that seems to be causing the problem is line 160 of the ElmerGUI/netgen/MakeFile
This is:

Code: Select all

# The main all target
all: cmake_check_build_system
	cd /home/gary/Elmer/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/gary/Elmer/build/CMakeFiles /home/gary/Elmer/build/ElmerGUI/netgen/CMakeFiles/progress.marks
	cd /home/gary/Elmer/build && $(MAKE) -f CMakeFiles/Makefile2 ElmerGUI/netgen/all
	$(CMAKE_COMMAND) -E cmake_progress_start /home/gary/Elmer/build/CMakeFiles 0
.PHONY : all
Gary R.

Re: make error linking libng.a

Posted: 03 Dec 2017, 18:25
by annier
Gary,
Can you retry using cmake-gui (viewtopic.php?f=2&t=3742&sid=1dec9083ef ... e2a97b8263) and installing Elmer with

Code: Select all

WITH_ELMERGUI
unticked.
Or,

Code: Select all

WITH_ELMERGUI
ticked but any options with libnetgen unticked.

Try that and please report here again.

Yours Sincerely,
Anil Kunwar

Re: make error linking libng.a

Posted: 04 Dec 2017, 04:04
by Gary R
Interesting:
With WITH-ELMERGUI unchecked, I got the following error:

Code: Select all

 19%] Linking C static library libmetis.a
[ 19%] Built target metis
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Not sure how to just shut off the netgen part.

I should mention that I consistently get the "configure" error:

Code: Select all

You have called ADD_LIBRARY for library CMakeFiles without any source files. This typically indicates a problem with your CMakeLists.txt file
Don't know whether this has anything to do with my problem but thought I had better mention it.

Gary R

Re: make error linking libng.a

Posted: 04 Dec 2017, 08:28
by annier
Gary,
-Are you using cmake-gui or terminal based commands for cmake? Try with cmake-gui. If something fails, untick the library which cannot be compiled and recompile again. Find the minimal configuration that can be compiled with the available libraries and setup or build essentials in your system.
-When one configuration fails, please be sure to wipe out all the pre-exisiting build, before starting next configuration.

Yours Sincerely,
Anil Kunwar

Re: make error linking libng.a

Posted: 05 Dec 2017, 01:02
by Gary R
Thank you Annier. Switching off the Elmertester module cleared the problem. I have now found that inclusion of either the tester module or the contrubutor module cause errors in either CMakeGUI configure or in the final make run. BUGS?

Thanks again for your help

Gary R.