Cannot build tests

Bug #1135494 reported by Timothée Lecomte
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libadjoint
New
Undecided
Unassigned

Bug Description

Hi,

I am trying to run libadjoint tests to verify that the build is working correctly. Unfortunately, tests refuse to be built by default.

When I run 'make test', I get the following error:

  FC bin/tests/test_adj_datatype_size
ld: library not found for -lstdc++
collect2: error: ld returned 1 exit status
make: *** [bin/tests/test_adj_datatype_size] Error 1

This is on MacOS X 10.6.8, where mpif90 is present. I have finally succeeded in running the tests using 'FC="" CC=g++ make test' (to bypass Fortran build, and use g++ compiler since I built libadjoint with it), but it would be nice if the fortran-related error was not there.

Thanks for your help !

Revision history for this message
Timothée Lecomte (timothee-lecomte-5) wrote :

For reference for future readers of this page, the solution was found on bug #1135519:

It looks like my stdc++ problem comes from the fact that gfortran is used for the linking, and I have gfortran 4.7.2 installed (from Homebrew):
minerve:dorsal tlecomte$ gfortran --version
GNU Fortran (GCC) 4.7.2

'gfortran -lstdc++' complains while 'gcc -lstdc++' and 'g++ -lstdc++' do not,

Well, as you suggested, I changed '-lstdc++' to '-lstdc++.6' in line 176 of the Makefile, and got rid of that error. Finally, I had to install greadlink (through Homebrew coreutils) to get the python bindings properly built, and now I have a fully working libadjoint where all tests pass ! Thanks !!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.