spack / spack

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.

Home Page:https://spack.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation issue: re2c

msimberg opened this issue · comments

Steps to reproduce the issue

$ spack spec -I <spec>
Input spec
--------------------------------
 -   re2c

Concretized
--------------------------------
 -   re2c@2.2%gcc@13.2.0 build_system=generic arch=linux-ubuntu22.04-icelake
[+]      ^gcc-runtime@13.2.0%gcc@13.2.0 build_system=generic arch=linux-ubuntu22.04-icelake
[e]      ^glibc@2.35%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-icelake

Error message

Error message
==> Error: ProcessError: Command exited with status 2:
    'make' '-j8'

6 errors found in build log:
     332      CXX      src/util/temp_file.o
     333      CXX      src/util/range.o
     334      CXX      src/parse/lex.o
     335      CXX      src/parse/parser.o
     336      CXX      src/parse/lex_conf.o
     337      CXXLD    re2go
  >> 338    /usr/bin/ld: src/re2go-main.o: undefined reference to symbol '_Unwind_Resume@@@@GCC_3.0'
  >> 339    /usr/bin/ld: /opt/spack-2e8600bb716b7a7bda5ad96cec8bd9268e00c085/opt/spack/linux-ubuntu22.04-icelake/gcc-11.4.0/gcc-13.2.0-h2dgtmkfzsi2eogium5dz5x2kq7wq3ne/lib64/libgcc_s.so.1: error adding symbols: DSO missing
            from command line
  >> 340    collect2: error: ld returned 1 exit status
  >> 341    make[2]: *** [Makefile:2557: re2go] Error 1
     342    make[2]: *** Waiting for unfinished jobs....
     343    make[2]: Leaving directory '/tmp/root/spack-stage/spack-stage-re2c-2.2-d7iaz4acbgx5v6hf3rzsiurbryxmrxjp/spack-src'
  >> 344    make[1]: *** [Makefile:4581: all-recursive] Error 1
     345    make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-re2c-2.2-d7iaz4acbgx5v6hf3rzsiurbryxmrxjp/spack-src'
  >> 346    make: *** [Makefile:1751: all] Error 2

See build log for details:
  /tmp/root/spack-stage/spack-stage-re2c-2.2-d7iaz4acbgx5v6hf3rzsiurbryxmrxjp/spack-build-out.txt

Information on your system

* **Spack:** 0.22.0.dev0
* **Python:** 3.10.12
* **Platform:** linux-ubuntu22.04-icelake
* **Concretizer:** clingo

Additional information

https://gist.github.com/msimberg/f5b0408054864ef68e31b9ca17751587

From bisecting this seems to have been introduced by #43861. It seems like it does not happen with a system-provided GCC, but does with a spack-installed GCC. I did my testing with the dockerfile here: https://gist.github.com/msimberg/f5b0408054864ef68e31b9ca17751587#file-dockerfile. Building with podman build --build-arg BASE_IMAGE=docker.io/ubuntu:22.04 --build-arg SPACK_COMMIT=2e8600bb716b7a7bda5ad96cec8bd9268e00c085 --build-arg COMPILER=gcc@13.2.0 -f Dockerfile . fails, with SPACK_COMMIT=d946c37cbb7a41acbb2b34fc98078acc96533705 succeeds.

@haampie any idea what might be going wrong here? Do you think re2c is broken or is something wrong in the GCC package changes? Happy to do more debugging if useful.

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

This is fixed on develop (2eb7add)