Skip to content

Installation issue: cgns (fPIC issue) #39699

@payerle

Description

@payerle

Steps to reproduce the issue

$ spack spec -lI cgns
Input spec
--------------------------------
 -   cgns

Concretized
--------------------------------
 -   m5vc5qo  [email protected]%[email protected]+base_scope+fortran+hdf5~int64+ipo+legacy~mem_debug+mpi+scoping+shared+static+testing+tools build_system=cmake build_type=RelWithDebInfo generator=make arch=linux-rhel8-zen2
[+]  kzbjptx      ^[email protected]%[email protected]~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=linux-rhel8-zen2
[+]  2nd5xjs          ^[email protected]%[email protected]+symlinks+termlib abi=5 build_system=autotools arch=linux-rhel8-zen2
[+]  acpcwrk          ^[email protected]%[email protected]~docs+shared build_system=generic certs=system arch=linux-rhel8-zen2
[+]  p7qp44w      ^[email protected]%[email protected]+guile build_system=autotools patches=599f134 arch=linux-rhel8-zen2
[+]  snqs5yc          ^[email protected]%[email protected]+readline build_system=autotools threads=posix arch=linux-rhel8-zen2
[+]  c26pf64              ^[email protected]%[email protected]+libatomic-ops build_system=autotools threads=posix arch=linux-rhel8-zen2
[+]  lhefaa5                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  nwvzdt4              ^[email protected]%[email protected]+bzip2+curses+git+libunistring+libxml2+tar+xz build_system=autotools arch=linux-rhel8-zen2
[+]  jmrtao4                  ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=linux-rhel8-zen2
[+]  6tl6au3                  ^[email protected]%[email protected] build_system=autotools zip=pigz arch=linux-rhel8-zen2
[+]  onyctuz                      ^[email protected]%[email protected] build_system=makefile arch=linux-rhel8-zen2
[+]  ogpntgf                      ^[email protected]%[email protected]+programs build_system=makefile compression=lz4,lzma,zlib libs=shared,static arch=linux-rhel8-zen2
[+]  s2yvnqh                          ^[email protected]%[email protected] build_system=makefile libs=shared,static arch=linux-rhel8-zen2
[+]  h5xayww                  ^[email protected]%[email protected]+pic build_system=autotools libs=shared,static arch=linux-rhel8-zen2
[+]  k7tcz64              ^[email protected]%[email protected]+cxx build_system=autotools libs=shared,static patches=69ad2e2 arch=linux-rhel8-zen2
[+]  kpsuuut              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  d3bx5oi              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  x3mkx4p              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  ryhrrvu              ^[email protected]%[email protected] build_system=autotools patches=682a465,e55be05 arch=linux-rhel8-zen2
[+]  rxkfgbd          ^[email protected]%[email protected]+internal_glib build_system=autotools arch=linux-rhel8-zen2
[+]  stpg6jt      ^[email protected]%[email protected]+cxx+fortran+hl+ipo+java+mpi+shared+szip+threadsafe+tools api=default build_system=cmake build_type=RelWithDebInfo generator=make patches=2a1e311 arch=linux-rhel8-zen2
[+]  iy5ro4n          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  vqsod6z          ^[email protected]_7%[email protected] build_system=generic arch=linux-rhel8-zen2
[+]  jpm3doc          ^[email protected]%[email protected]+optimize+pic+shared build_system=makefile arch=linux-rhel8-zen2
[+]  roegncq      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  at6vdch          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  a2wysy5          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  3nodp4k          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  23l2zhm          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  jfsbatp          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  qlyp3o5      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  svszhzp          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  gwfkdc3              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  knlmgzd              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  2rzdmj2              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  k3erefc                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  t7btf5s                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  qhsvnq2                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  herup77                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  o4aqa47          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  3c7dro2          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  yo3pway          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  o6mgx5d      ^[email protected]%[email protected] build_system=autotools gl=osmesa arch=linux-rhel8-zen2
[+]  lvj7wgx      ^[email protected]%[email protected]+atomics~cuda+cxx+cxx_exceptions~gpfs~internal-hwloc~java+legacylaunchers~lustre~memchecker+orterunprefix+pmi+romio+rsh~singularity~static~vt+wrapper-rpath build_system=autotools fabrics=ucx schedulers=slurm arch=linux-rhel8-zen2
[+]  ctfnt3p          ^[email protected]%[email protected]~cairo~cuda~gl+libudev+libxml2~netloc~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-rhel8-zen2
[+]  oktvvq3              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  zteihso              ^[email protected]%[email protected]~python build_system=autotools patches=3e06d42 arch=linux-rhel8-zen2
[+]  6p53zmi          ^[email protected]%[email protected] build_system=autotools patches=4e1d78c,62fc8a8,ff37630 arch=linux-rhel8-zen2
[+]  e5cktjy              ^[email protected]%[email protected] build_system=autotools patches=35c4492,7793209,a49dd5b arch=linux-rhel8-zen2
[+]  6mgpv7j              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  cjebbaj              ^[email protected]%[email protected]+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-rhel8-zen2
[+]  uvi2god                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  soukbeu                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  qtcped7          ^[email protected]%[email protected]+gssapi build_system=autotools arch=linux-rhel8-zen2
[+]  ko25i4e              ^[email protected]%[email protected]+shared build_system=autotools arch=linux-rhel8-zen2
[+]  43xbx5l              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  2tqklmb              ^[email protected]%[email protected]~obsolete_api build_system=autotools arch=linux-rhel8-zen2
[+]  4grunmz          ^[email protected]%[email protected]+cpanm+open+shared+threads build_system=generic arch=linux-rhel8-zen2
[+]  nkkrcue              ^[email protected]%[email protected]+cxx+docs+stl build_system=autotools patches=26090f4 arch=linux-rhel8-zen2
[+]  hjzedoe              ^[email protected]%[email protected]~debug+pic+shared build_system=generic arch=linux-rhel8-zen2
[+]  tsdsqho              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  xbiwwfl          ^[email protected]%[email protected]~docs+pmi_backwards_compatibility build_system=autotools arch=linux-rhel8-zen2
[+]  ug5dirg          ^slurm@system%[email protected]~gtk~hdf5~hwloc~mariadb~pmix+readline~restd build_system=autotools sysconfdir=/etc/slurm arch=linux-rhel8-zen2
[+]  oq3hlnb          ^[email protected]%[email protected]~assertions~backtrace_detail+cma~cuda~dc~debug~dm+examples~gdrcopy~gtest~ib_hw_tm~java+knem~logging~mlx5_dv+openmp+optimizations~parameter_checking+pic~rc+rdmacm~rocm+thread_multiple~ucg~ud~verbs~vfs+xpmem build_system=autotools libs=shared opt=3 simd=auto arch=linux-rhel8-zen2
[+]  5gqoewn      ^[email protected]%[email protected] build_system=bundle arch=linux-rhel8-zen2
[+]  ronsr6s          ^[email protected]%[email protected]+glx~llvm+opengl+opengles+osmesa~strip build_system=meson buildtype=debugoptimized default_library=shared,static patches=ee737d1 arch=linux-rhel8-zen2
[+]  fxc4ppz              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  lazftoc              ^[email protected]%[email protected]+libbsd build_system=autotools arch=linux-rhel8-zen2
[+]  rs2ddq5                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  hkztvet                      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  foha5hv              ^[email protected]%[email protected]+lex+nls build_system=autotools patches=f8b85a0 arch=linux-rhel8-zen2
[+]  lr5iwpq                  ^[email protected]%[email protected] build_system=autotools patches=440b954 arch=linux-rhel8-zen2
[+]  lutg2mh                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  2yshqcu              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  65dpibi              ^[email protected]%[email protected]~block_signals~conservative_checks~cxx_exceptions~debug~debug_frame+docs+pic+tests+weak_backtrace+xz+zlib build_system=autotools components=coredump,ptrace,setjump libs=shared,static arch=linux-rhel8-zen2
[+]  oozqy34              ^[email protected]%[email protected] build_system=python_pip patches=0f0b1bd arch=linux-rhel8-zen2
[+]  dcjyras                  ^[email protected]%[email protected] build_system=generic arch=linux-rhel8-zen2
[+]  3f4dteo                  ^[email protected]%[email protected] build_system=generic arch=linux-rhel8-zen2
[+]  zu7kuev                  ^[email protected]%[email protected] build_system=generic arch=linux-rhel8-zen2
[+]  gsrt7hl              ^[email protected]%[email protected]+re2c build_system=generic arch=linux-rhel8-zen2
[+]  npv6wpd                  ^[email protected]%[email protected] build_system=generic arch=linux-rhel8-zen2
[+]  5meqv3b              ^[email protected]%[email protected] build_system=python_pip arch=linux-rhel8-zen2
[+]  26xogaz                  ^[email protected]%[email protected] build_system=python_pip arch=linux-rhel8-zen2
[+]  t45xqwm              ^[email protected]%[email protected]+bz2+crypt+ctypes+dbm~debug+libxml2+lzma+nis+optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=0d98e93,4c24573,f2fd060 arch=linux-rhel8-zen2
[+]  qna53es                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  icy23ix                      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  jbj5l5f                      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  hhwsw3i                  ^[email protected]%[email protected]+column_metadata+dynamic_extensions+fts+functions+rtree build_system=autotools arch=linux-rhel8-zen2
[+]  rckoxz7              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  4zbzlco                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  6fgglfp                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  4tvhibv      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  uv323sa      ^[email protected]%[email protected]+xft+xss build_system=autotools arch=linux-rhel8-zen2
[+]  3oevaar          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  ebtsjlq              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  ruxdkjg                  ^[email protected]%[email protected] build_system=autotools fonts=encodings,font-adobe-100dpi,font-adobe-75dpi,font-adobe-utopia-100dpi,font-adobe-utopia-75dpi,font-adobe-utopia-type1,font-alias,font-arabic-misc,font-bh-100dpi,font-bh-75dpi,font-bh-lucidatypewriter-100dpi,font-bh-lucidatypewriter-75dpi,font-bh-type1,font-bitstream-100dpi,font-bitstream-75dpi,font-bitstream-speedo,font-bitstream-type1,font-cronyx-cyrillic,font-cursor-misc,font-daewoo-misc,font-dec-misc,font-ibm-type1,font-isas-misc,font-jis-misc,font-micro-misc,font-misc-cyrillic,font-misc-ethiopic,font-misc-meltho,font-misc-misc,font-mutt-misc,font-schumacher-misc,font-screen-cyrillic,font-sun-misc,font-winitzki-cyrillic,font-xfree86-type1 arch=linux-rhel8-zen2
[+]  v4lwqfy                      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  kztf3jt                          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  q7rswc7                          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  el4zigk                      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  cjqnhw3                      ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  r4tsdwi                          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  pcfi3uy                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  6cupoxl              ^[email protected]%[email protected]+pic+shared build_system=autotools arch=linux-rhel8-zen2
[+]  yj4wdtz                  ^[email protected]%[email protected]+ipo build_system=cmake build_type=RelWithDebInfo generator=make libs=shared,static arch=linux-rhel8-zen2
[+]  swbnj5g              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  s4fgvuq                  ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  kdzyy7n          ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
[+]  g7lhvjh              ^[email protected]%[email protected] build_system=autotools arch=linux-rhel8-zen2
...

Error message

Error message
...
/cvmfs/hpcsw.umd.edu/spack-software/2023.05.30/linux-rhel8-zen2/gcc-9.4.0/openmpi-4.1.1-lvj7wgxqp223cb6msiwgof2ms3qcij4o/bin/mpif90 -fPIC  -DNO_CONCATENATION -O2 -g -DNDEBUG -shared -Wl,-soname,libcgns.so.4.2 -o libcgns.so.4.2 CMakeFiles/cgns_shared.dir/cgns_error.c.o CMakeFiles/cgns_shared.dir/cgns_internals.c.o CMakeFiles/cgns_shared.dir/cgns_io.c.o CMakeFiles/cgns_shared.dir/cgnslib.c.o CMakeFiles/cgns_shared.dir/cg_hashmap.c.o CMakeFiles/cgns_shared.dir/adf/ADF_interface.c.o CMakeFiles/cgns_shared.dir/adf/ADF_internals.c.o CMakeFiles/cgns_shared.dir/adfh/ADFH.c.o CMakeFiles/cgns_shared.dir/pcgnslib.c.o CMakeFiles/cgns_shared.dir/cg_ftoc.c.o CMakeFiles/cgns_shared.dir/cgio_ftoc.c.o CMakeFiles/cgns_f2c.dir/cgns_f.F90.o  -Wl,-rpath,/cvmfs/hpcsw.umd.edu/spack-software/2023.05.30/linux-rhel8-zen2/gcc-9.4.0/hdf5-1.10.7-stpg6jtn3e2ollbzguvwdhse65o57hjk/lib:/cvmfs/hpcsw.umd.edu/spack-software/2023.05.30/linux-rhel8-zen2/gcc-9.4.0/zlib-1.2.13-jpm3doc2g37hjstjg5rhj7vrtrusrtxi/lib:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /cvmfs/hpcsw.umd.edu/spack-software/2023.05.30/linux-rhel8-zen2/gcc-9.4.0/hdf5-1.10.7-stpg6jtn3e2ollbzguvwdhse65o57hjk/lib/libhdf5.so.103.3.0 -ldl /cvmfs/hpcsw.umd.edu/spack-software/2023.05.30/linux-rhel8-zen2/gcc-9.4.0/zlib-1.2.13-jpm3doc2g37hjstjg5rhj7vrtrusrtxi/lib/libz.so 
/bin/ld: CMakeFiles/cgns_f2c.dir/cgns_f.F90.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
...

Information on your system

$ spack debug report
* **Spack:** 0.21.0.dev0 (84faf5a6cf342efddb976b7432e44aff12f1c985)
* **Python:** 3.6.8
* **Platform:** linux-rhel8-zen2
* **Concretizer:** clingo

Additional information

spack-build-env.txt
spack-build-out.txt

Maintainers: @gsjaardema

Basically, it looks like we need to add -fPIC to the compilation flags

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions