Hi,
Following previous reports, I am now trying to build libadjoint without its PETSc-related features, to workaround the fact that my PETSc built does not have C support. I realize that the cleaner way would be to build PETSc with C support, but I have already had so much of a hard time building it that I am afraid to start again, even changing the smallest option.
So now I am trying to build libadjoint (r418) with:
PETSC_ARCH="" PETSC_DIR="" SLEPC_ARCH="" SLEPC_DIR="" make install
(Note that PETSC_ARCH="" PETSC_DIR="" is not enough since SLEPC headers include PETSc ones)
Unfortunately, I am still getting an error (and a bunch of warnings), all related to the use of -lstdc++. Below is the full output. Thank you in advance for your help to fix my issues !
CC src/adj_adjointer_routines.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_adjointer_routines.o src/adj_adjointer_routines.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_adjointer_visualisation.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_adjointer_visualisation.o src/adj_adjointer_visualisation.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_core.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_core.o src/adj_core.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_data_structures.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_data_structures.o src/adj_data_structures.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_debug.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_debug.o src/adj_debug.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_dictionary.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_dictionary.o src/adj_dictionary.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_error_handling.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_error_handling.o src/adj_error_handling.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_evaluation.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_evaluation.o src/adj_evaluation.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_petsc_data_structures.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_petsc_data_structures.o src/adj_petsc_data_structures.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_predictability.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_predictability.o src/adj_predictability.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_simplification.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_simplification.o src/adj_simplification.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_test_tools.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_test_tools.o src/adj_test_tools.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/adj_variable_lookup.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/adj_variable_lookup.o src/adj_variable_lookup.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
CC src/html_encode.c
mpicc -g -O0 -fPIC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wpointer-arith -Wstrict-prototypes -ggdb3 -fstack-protector-all -lstdc++ -c -o obj/html_encode.o src/html_encode.c
i686-apple-darwin10-gcc-4.2.1: -lstdc++: linker input file unused because linking not done
SED include/libadjoint/adj_constants_f.h
SED include/libadjoint/adj_error_handling_f.h
FC src/adj_fortran.F90
C++ src/revolve.cpp
C++ src/revolve_c.cpp
AR lib/libadjoint.a
LD lib/libadjoint.dylib
ld: library not found for -lstdc++
collect2: error: ld returned 1 exit status
make: *** [lib/libadjoint.dylib] Error 1
And for reference:
minerve:dorsal tlecomte$ mpicc --version darwin10- gcc-4.2. 1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) 1504.15. 3~1/RELEASE_ X86_64 x86_64
i686-apple-
minerve:dorsal tlecomte$ uname -a
Darwin #### 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-