make error linking libng.a

Discussion about building and installing Elmer
Post Reply
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

make error linking libng.a

Post 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
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: make error linking libng.a

Post 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.
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: make error linking libng.a

Post 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.
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: make error linking libng.a

Post 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
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: make error linking libng.a

Post 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
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: make error linking libng.a

Post 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
Last edited by annier on 06 Dec 2017, 14:50, edited 1 time in total.
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: make error linking libng.a

Post 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.
Post Reply