Comment 5 for bug 1134511

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

Thanks Patrick for your work on this. I have now tried again with r418 (still with CC="g++" make install). The build step works, but not the linking, unfortunately. Here is the output :

  CC src/adj_adjointer_routines.c
g++ -g -O0 -fPIC -I/Users/tlecomte/FEniCS-Dorsal-stable/include -I/Users/tlecomte/FEniCS-Dorsal-stable//include -DHAVE_SLEPC -I/Users/tlecomte/FEniCS-Dorsal-stable/include -I/Users/tlecomte/FEniCS-Dorsal-stable/include -I/usr/local/include -I/usr/local/Cellar/mpich2/1.5/include -DHAVE_PETSC -Iinclude/ -Wall -Wextra -Wunused-parameter -Wunsafe-loop-optimizations -Wno-write-strings -Wpointer-arith -ggdb3 -fstack-protector-all -fno-leading-underscore -c -o obj/adj_adjointer_routines.o src/adj_adjointer_routines.c

...a bunch of other successful CC...

  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
Undefined symbols:
  "_Z9EPSCreateiPP6_p_EPS", referenced from:
      _Z15adj_compute_gstP13adj_adjointer12adj_variableP10adj_matrixS1_S3_iP7adj_gstPi in adj_predictability.o
  "_adj_variable_equal", referenced from:
      ___libadjoint_MOD_adj_variable_equal in adj_fortran.o
     (maybe you meant: ___libadjoint_MOD_adj_variable_equal)
  "_adj_variable_get_ndepending_timesteps", referenced from:
      ___libadjoint_MOD_adj_variable_get_ndepending_timesteps in adj_fortran.o
     (maybe you meant: ___libadjoint_MOD_adj_variable_get_ndepending_timesteps)
  "_adj_adjointer_to_html", referenced from:
      ___libadjoint_MOD_adj_adjointer_to_html in adj_fortran.o
     (maybe you meant: ___libadjoint_MOD_adj_adjointer_to_html)
  "_Z7MatAXPYP6_p_MatdS0_12MatStructure", referenced from:
      _Z19petsc_mat_axpy_procP10adj_matrixdS_ in adj_petsc_data_structures.o
  "_Z14MatAssemblyEndP6_p_Mat15MatAssemblyType", referenced from:
      _Z16petsc_solve_proc12adj_variable10adj_matrix10adj_vectorPS1_ in adj_petsc_data_structures.o
  "_adj_create_term", referenced from:
      ___libadjoint_MOD_adj_create_term in adj_fortran.o
     (maybe you meant: ___libadjoint_MOD_adj_create_term)

... a whole lot of other undefined symbols...

ld: symbol(s) not found
collect2: error: ld returned 1 exit status
make: *** [lib/libadjoint.dylib] Error 1

For reference, here is the output of 'g++ --version':
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)

And of 'uname -a':
10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64

If you think you can do something easily to finish the build, then ok, but given your findings about python bindings in #1135519, I'm not sure it's worth the effort...