Skip to content

Installation issue: r-gmp (bad c compiler) #5766

Description

@payerle

Steps to reproduce the issue

I run into an issue about a bad C compiler when trying to build r-gmp package

$ spack --env myenv find -lvfcdI r-gmp
...
-- linux-rhel8-zen2 / %cxx=gcc@13.4.0 ---------------------------
 -   guxeeg3 r-gmp@0.7-4 build_system=generic
[+]  c4lvqa5     compiler-wrapper@1.0 build_system=generic
[e]  lxilqo6     gcc@13.4.0+binutils~bootstrap+graphite~mold+nvptx~piclibs~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran,lto'
[+]  6veby57     gcc-runtime@13.4.0 build_system=generic
[e]  wklw66w     glibc@2.28 build_system=autotools
[+]  qphn4tr     gmake@4.4.1~guile build_system=generic
[+]  zfpfw4w     gmp@6.3.0+cxx build_system=autotools libs:=shared,static
[+]  gbt55l4         autoconf@2.72 build_system=autotools
[+]  zgiqg7h             perl@5.42.0+cpanm+opcode+open+shared+threads build_system=generic
[+]  kddwxvy                 berkeley-db@18.1.40+cxx+docs+stl build_system=autotools patches:=26090f4
[+]  x7mvisw                 gdbm@1.25 build_system=autotools
[+]  spxl244         automake@1.16.5 build_system=autotools
[+]  v2bnibg         libtool@2.4.7 build_system=autotools
[+]  dp2hpm5         m4@1.4.20+sigsegv build_system=autotools
[+]  aveg6xi             diffutils@3.12 build_system=autotools
[+]  okijcpw             libsigsegv@2.14 build_system=autotools
[+]  wznhsoy     r@4.5.2+X+memory_profiling+rmath build_system=autotools patches:=abc572d
[+]  clcmbca         bzip2@1.0.8~debug+pic+shared build_system=generic
[+]  632l5xv         cairo@1.18.4+X~dwrite+fc+ft+gobject+pdf+png~quartz~strip~svg+tee+zlib build_system=meson buildtype=debugoptimized default_library:=shared,static
[+]  zad3wjf             fontconfig@2.15.0+pic build_system=autotools
[+]  q4vunj7                 font-util@1.4.1 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
[+]  ga5liro                     bdftopcf@1.1.1 build_system=autotools
[+]  wv2xmsv                         fontsproto@2.1.3 build_system=autotools
[+]  o4z6wt2                         libxfont@1.5.4 build_system=autotools
[+]  jwttesr                     mkfontdir@1.0.7 build_system=autotools
[+]  4d54f6q                     mkfontscale@1.2.3 build_system=autotools
[+]  mm4hyym                         libfontenc@1.1.8 build_system=autotools
[+]  fiog6du                 gperf@3.1 build_system=autotools patches:=3dd36db
[+]  54axnim                 util-linux-uuid@2.41 build_system=autotools
[+]  w2jifvd             freetype@2.14.1+pic+shared build_system=autotools
[+]  4fdzicc             glib@2.86.1+introspection+libmount~strip build_system=meson buildtype=debugoptimized default_library:=shared,static tracing:=none
[+]  vetiyia                 elfutils@0.193~debuginfod+exeprefix~nls build_system=autotools
[+]  dr6yyre                 python-venv@1.0 build_system=generic
[+]  q6ptk6w                 util-linux@2.40.2+bash build_system=autotools patches:=040a650
[+]  yrnoinb                     bash@5.3 build_system=autotools patches:=1f60843,e385548,f245d9c
[+]  fo3zrm4             libxcb@1.17.0 build_system=autotools
[+]  ktowec6                 libpthread-stubs@0.5 build_system=autotools
[+]  hemivbf                 libxau@1.0.12 build_system=autotools
[+]  fnlpgyj                 libxdmcp@1.1.5 build_system=autotools
[+]  dclf4ak                 xcb-proto@1.17.0 build_system=autotools
[+]  2uqczom             libxext@1.3.6 build_system=autotools
[+]  q3vd5f7             libxrender@0.9.12 build_system=autotools
[+]  ppjkqco                 renderproto@0.11.1 build_system=autotools
[+]  wphaqbx             lzo@2.10 build_system=autotools libs:=shared,static
[+]  6p3fqfq             meson@1.8.5 build_system=python_pip patches:=0f0b1bd
[+]  iij36rk                 py-pip@25.1.1 build_system=generic
[+]  c4bjnug                 py-setuptools@80.9.0 build_system=generic
[+]  2af64e5                 py-wheel@0.45.1 build_system=generic
[+]  k3cbjsl             ninja@1.13.0+re2c build_system=generic
[+]  vyu5qj7                 re2c@3.1 build_system=autotools
[+]  xzkemwu             pixman@0.46.4+shared~strip build_system=meson buildtype=debugoptimized default_library:=shared,static
[+]  l22ndgk                 bison@3.8.2~color build_system=autotools
[+]  xenirt3                 flex@2.6.3+lex+nls build_system=autotools
[+]  hn2krca             pkgconf@2.5.1 build_system=autotools
[+]  a2dwrpm             python@3.12.12+bz2+crypt+ctypes+dbm~debug+libxml2+lzma+optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic
[+]  6xvipxp                 expat@2.7.3+libbsd build_system=autotools
[+]  e2mxkgo                 libxcrypt@4.4.38~obsolete_api build_system=autotools
[+]  g6dfwgz                 sqlite@3.50.4+column_metadata+fts+rtree build_system=autotools
[+]  5iwsjnc         curl@8.15.0+gssapi~ldap+libidn2~librtmp~libssh+libssh2+nghttp2 build_system=autotools libs:=shared,static tls:=mbedtls,openssl
[+]  vjvgdcm             krb5@1.21.3+shared build_system=autotools
[+]  p2qbo6v                 libedit@3.1-20240808 build_system=autotools
[+]  cwtascr             libidn2@2.3.7 build_system=autotools
[+]  34m2usx             libssh2@1.11.1+shared build_system=autotools crypto=mbedtls
[+]  yjg7uxr             mbedtls@2.28.9+pic build_system=makefile build_type=RelWithDebInfo libs:=shared,static
[+]  wgsyfrl             nghttp2@1.67.1 build_system=autotools
[+]  yfj7zom             openssl@3.6.0~docs+shared build_system=generic certs=system
[+]  rcuuwdi         findutils@4.10.0 build_system=autotools patches:=440b954
[+]  un24op4         gettext@0.23.1+bzip2+curses+git+libunistring+libxml2+pic+shared+tar+xz build_system=autotools
[+]  xfwlwc5             libiconv@1.18 build_system=autotools libs:=shared,static
[+]  2xh2w6v             libunistring@1.2 build_system=autotools
[+]  ji2noye             libxml2@2.13.5+http+pic~python+shared build_system=autotools
[+]  ac3qlxk             tar@1.35 build_system=autotools zip=pigz
[+]  xdqbnzg                 pigz@2.8 build_system=makefile
[+]  2x76rxv         harfbuzz@11.5.1+gobject+graphite2~strip build_system=meson buildtype=debugoptimized default_library:=shared,static
[+]  uziisde             gobject-introspection@1.86.0~strip build_system=meson buildtype=debugoptimized default_library:=shared,static patches:=96b2701
[+]  eoi2kzz                 glib-bootstrap@2.86.1~strip build_system=meson buildtype=release default_library:=shared
[+]  uzrwzjk             graphite2@1.3.14+ipo build_system=cmake build_type=RelWithDebInfo generator=make patches:=39e58d6
[+]  ipzrqow         icu4c@76.1 build_system=autotools cxxstd=17
[+]  fot2yxz         libjpeg-turbo@3.0.4+ipo~jpeg8+partial_decoder+pic build_system=cmake build_type=RelWithDebInfo generator=make libs:=shared,static
[+]  komdk4j             cmake@3.31.9~doc+ncurses+ownlibs~qtgui build_system=generic build_type=RelWithDebInfo
[+]  5nwi3ut             nasm@2.16.03 build_system=autotools
[+]  i6c5keh         libpng@1.6.47+ipo+pic build_system=cmake build_type=RelWithDebInfo generator=make libs:=shared,static
[+]  7duv2p3         libtiff@4.7.0+ccitt+ipo~jbig+jpeg~jpeg12+lerc+libdeflate+logluv+lzma+lzw+next+old-jpeg~opengl+packbits+pic+pixarlog+shared+thunder~webp+zlib+zstd build_system=cmake build_type=RelWithDebInfo generator=make
[+]  eszycy5             lerc@4.0.0+ipo build_system=cmake build_type=RelWithDebInfo generator=make
[+]  fhp65oj         libtirpc@1.3.7 build_system=autotools
[+]  vwuuvkl         libx11@1.8.12 build_system=autotools
[+]  ejfmocr             inputproto@2.3.2 build_system=autotools
[+]  dea3x2j             kbproto@1.0.7 build_system=autotools
[+]  kjgiuug             util-macros@1.20.1 build_system=autotools
[+]  77k2ftu             xextproto@7.3.0 build_system=autotools
[+]  6lo4qpr             xproto@7.0.31 build_system=autotools
[+]  kg2dyl7             xtrans@1.6.0 build_system=autotools
[+]  ktpyfcx         libxmu@1.2.1 build_system=autotools
[+]  fdqblid         libxt@1.3.1 build_system=autotools
[+]  k4tm7jz             libice@1.1.2 build_system=autotools
[+]  eupcdsq                 libbsd@0.12.2 build_system=autotools
[+]  4t7s7tj                     libmd@1.1.0 build_system=autotools
[+]  6zfnyxf             libsm@1.2.6 build_system=autotools
[+]  4fr2zga         ncurses@6.5-20250705+symlinks+termlib abi=5 build_system=autotools patches:=7a351bc
[+]  ocpiiql         openblas@0.3.30~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared build_system=makefile symbol_suffix=none threads=openmp
[+]  u52ukjh         openjdk@17.0.11_9 build_system=generic certs=none
[+]  rtgupjp         pango@1.54.0+X~strip build_system=meson buildtype=debugoptimized default_library:=shared,static
[+]  ueo2pyt             fribidi@1.0.12 build_system=autotools
[+]  s6lych3             json-glib@1.10.8~strip build_system=meson buildtype=debugoptimized default_library:=shared,static
[+]  e3mylxq             libffi@3.5.2 build_system=autotools
[+]  qwvzslb             libxft@2.3.8 build_system=autotools
[+]  ejeuz77         pcre2@10.44+jit+multibyte+pic build_system=autotools
[+]  xnkg5zv         readline@8.3 build_system=autotools patches:=21f0a03
[+]  dxeypx5         texinfo@7.2+xs build_system=autotools
[+]  qouqgrj         tk@8.6.17+xft+xss build_system=autotools
[+]  mo2kraw             libxscrnsaver@1.2.4 build_system=autotools
[+]  jto2nw6                 scrnsaverproto@1.2.2 build_system=autotools
[+]  3tbb57d             tcl@8.6.17 build_system=autotools
[+]  4k7atcq         which@2.21 build_system=autotools
[+]  dozx2ei         xz@5.6.3+pic build_system=autotools libs:=shared,static
[+]  yyfhywn         zlib@1.3.1+optimize+pic+shared build_system=makefile
[+]  pi6zcmw         zstd@1.5.7+programs build_system=makefile compression:=lz4,lzma,zlib libs:=shared,static
[+]  rv4gmuf             lz4@1.10.0+pic build_system=makefile libs:=shared,static

The error occurs during 'spack --env myenv install r-gmp'

Error message

Error message
...
checking for gcc... /cvmfs/hpcsw.umd.edu/spack-software/2025.11.0/linux-zen2/compiler-wrapper-1.0-c4lvqa5ekdyxfibdcfh6hfepzpfknhp5/libexec/spack/gcc/gcc -std=gnu2x
checking whether the C compiler works... no
configure: error: in `/tmp/swinst26/spackswinst26/spack-stage/spack-stage-r-gmp-0.7-4-guxeeg3xgautyc7eyo7bq27gdllxfyuc/spack-src':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package 'gmp'
* removing '/cvmfs/hpcsw.umd.edu/spack-software/2025.11.0/linux-zen2/r-gmp-0.7-4-guxeeg3xgautyc7eyo7bq27gdllxfyuc/rlib/R/library/gmp'
Command exited with status 1:
    /cvmfs/hpcsw.umd.edu/spack-software/2025.11.0/linux-zen2/r-4.5.2-wznhsoyv73evcubr3d7s3efjdb7e6abs/bin/R --vanilla CMD INSTALL --library=/cvmfs/hpcsw.umd.edu/spack-software/2025.11.0/linux-zen2/r-gmp-0.7-4-guxeeg3xgautyc7eyo7bq27gdllxfyuc/rlib/R/library /tmp/swinst26/spackswinst26/spack-stage/spack-stage-r-gmp-0.7-4-guxeeg3xgautyc7eyo7bq27gdllxfyuc/spack-src

Information on your system

$ spack debug report
* **Spack:** 1.2.0.dev0
* **Builtin repo:** https://github.com/spack/spack-packages/commit/119680aeee8ea802c6111b7167583bddef97e82f
* **Python:** 3.6.8
* **Platform:** linux-rhel8-zen2

Additional information

No maintainers for r-gmp

The error appears to be due to r-gmp using C compiler but only having cxx and not c listed as dependencies in recipe

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