On Tuesday, December 6, 2016 at 12:21:37 PM UTC-3, Bruno Turcksin wrote: > > Hi, > > On Tuesday, December 6, 2016 at 9:22:35 AM UTC-5, Sudarshan Kumar wrote: > >> /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(netcdf.o): >> requires unsupported dynamic reloc 11; recompile with -fPIC >> > The problem is that libnetcdf was compiled as a static library but you are > building deal.II as a shared library. You can: > 1) recompile libnetcdf as a shared library (preferred option) > 2) recompile libnetcdf as a static library and use the flag -fPIC when you > compile it > 3) compile everything (deal.II + other dependencies) as static libraries > (by far the hardest solution) > > I have done option 1 above. Still I get the following error when I run make install,
[100%] Built target obj_fe.release Linking CXX shared library ../lib/libdeal_II.g.so Linking CXX shared library ../lib/libdeal_II.so /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-netcdf.o): requires dynamic R_X86_64_PC32 reloc against '_ZN7NcError6ncoptsE' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-netcdf.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-netcdf.o): requires dynamic R_X86_64_32 reloc against '__gxx_personality_v0' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires unsupported dynamic reloc 11; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_32 reloc against '__pthread_key_create' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_PC32 reloc against '_Znam' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_PC32 reloc against '_Znam' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(attr.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(ncx.o): requires dynamic R_X86_64_PC32 reloc against 'ncx_put_int_schar' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(dim.o): requires dynamic R_X86_64_PC32 reloc against 'free_NC_string' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(error.o): requires dynamic R_X86_64_PC32 reloc against 'strerror' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(nc.o): requires unsupported dynamic reloc 11; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(string.o): requires dynamic R_X86_64_PC32 reloc against 'strlen' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(v1hpg.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(var.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(utf8proc.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(putget.o): requires unsupported dynamic reloc 11; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(posixio.o): requires dynamic R_X86_64_PC32 reloc against 'close' which may overflow at runtime; recompile with -fPIC collect2: error: ld returned 1 exit status source/CMakeFiles/deal_II.dir/build.make:616: recipe for target 'lib/libdeal_II.so.8.4.1' failed make[2]: *** [lib/libdeal_II.so.8.4.1] Error 1 CMakeFiles/Makefile2:658: recipe for target 'source/CMakeFiles/deal_II.dir/all' failed make[1]: *** [source/CMakeFiles/deal_II.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-netcdf.o): requires dynamic R_X86_64_PC32 reloc against '_ZN7NcError6ncoptsE' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-netcdf.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-netcdf.o): requires dynamic R_X86_64_32 reloc against '__gxx_personality_v0' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires unsupported dynamic reloc 11; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_32 reloc against '__pthread_key_create' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_PC32 reloc against '_Znam' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_PC32 reloc against '_Znam' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf_c++.a(libnetcdf_c___la-ncvalues.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(attr.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(ncx.o): requires dynamic R_X86_64_PC32 reloc against 'ncx_put_int_schar' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(dim.o): requires dynamic R_X86_64_PC32 reloc against 'free_NC_string' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(error.o): requires dynamic R_X86_64_PC32 reloc against 'strerror' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(nc.o): requires unsupported dynamic reloc 11; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(string.o): requires dynamic R_X86_64_PC32 reloc against 'strlen' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(v1hpg.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(var.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(utf8proc.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(putget.o): requires unsupported dynamic reloc 11; recompile with -fPIC /usr/bin/ld.gold: error: /usr/local/lib/libnetcdf.a(posixio.o): requires dynamic R_X86_64_PC32 reloc against 'close' which may overflow at runtime; recompile with -fPIC collect2: error: ld returned 1 exit status source/CMakeFiles/deal_II.g.dir/build.make:616: recipe for target 'lib/libdeal_II.g.so.8.4.1' failed Thanks a lot > Best, > > Bruno > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
