Open mkoeppe opened 2 years ago
Changed branch from u/fbissey/suitesparse6.0.1 to u/mkoeppe/suitesparse6.0.1
pushed this commit to address comment:29
New commits:
6f4032e | build/pkgs/cmake/spkg-configure.m4: Require version >= 3.22 |
Forgot about doing that thanks.
Adding #34835 as it will make the test builds quicker
Changed dependencies from #34746 to #34746, #34835
Replying to François Bissey:
I wonder if it has to do with
-- Detecting Fortran/C Interface Failed to compile
When cmake is run to configure cholmod. It looks like we are trying to mix C and Fortran and it is failing.
Yes, I think that's the problem
The only thing I can think about is that openblas was compiled with a different gfortran but it feels far fetched.
In one of the failing builds, I see the following in SuiteSparse_config/build/CMakeFiles/CMakeError.log
:
[100%] Linking Fortran executable FortranCInterface
lto1: internal compiler error: compiler does not support ZSTD LTO compression
0x9c311c lto_end_uncompression(lto_compression_stream*, lto_compression)
../../src/gcc/lto-compress.cc:411
0x9c1910 lto_get_section_data(lto_file_decl_data*, lto_section_type, char const*, int, unsigned long*, bool)
../../src/gcc/lto-section-in.cc:168
0x6929c5 lto_file_finalize
../../src/gcc/lto/lto-common.cc:2264
0x6929c5 lto_create_files_from_ids
../../src/gcc/lto/lto-common.cc:2282
0x6929c5 lto_file_read
../../src/gcc/lto/lto-common.cc:2337
0x6929c5 read_cgraph_and_symbols(unsigned int, char const**)
../../src/gcc/lto/lto-common.cc:2785
0x680312 lto_main()
../../src/gcc/lto/lto.cc:626
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: /sage/local/bin/gfortran returned 1 exit status
compilation terminated.
In the failing configurations, we are using system gcc
but our own gfortran
. This may be a mismatch between them regarding zstd
support.
Yes, it starts making much more sense.
But there should be other similar failures potentially - at least you would think, since this is also tested in autoconf packages as soon blas/lapack is mixed with C code.
Branch pushed to git repo; I updated commit sha1. New commits:
d3544fe | build/pkgs/zstd: New (gcc/gfortran dependency) |
Let's try this
If it works, I'll have to re-enable "supernodal" in cholmod.
running at https://github.com/mkoeppe/SuiteSparse/actions/runs/3674049225
Branch pushed to git repo; I updated commit sha1. New commits:
63c0139 | build/pkgs/zstd: Only require zstd when gcc/gfortran are to be built |
still failing - https://github.com/mkoeppe/SuiteSparse/actions/runs/3674049225/jobs/6211825144
in the failing build, gfortran still does not list zstd as a supported compression algorithm:
/sage/local/bin/gfortran -v
Using built-in specs.
COLLECT_GCC=/sage/local/bin/gfortran
COLLECT_LTO_WRAPPER=/sage/local/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../src/configure --prefix=/sage/local --with-local-prefix=/sage/local --with-system-zlib --without-isl --disable-multilib --disable-nls --disable-libitm --disable-bootstrap --enable-languages=fortran --disable-darwin-at-rpath CXX=g++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.2.0 (GCC)
Branch pushed to git repo; I updated commit sha1. New commits:
424cb49 | build/pkgs/zstd/spkg-install.in: Also install header |
In gentoo we just seem to do make -C lib install
. Although there is also a make -C lib libzstd.pc
during the build phase.
Installing zstd
may not be enough, you may have to tell gcc's configure to use it --with-zstd
. But really, we want to match the support from the host gcc. So, it may be more complicated to achieve.
gfortran is now configured correctly
# local/bin/gfortran -v
Using built-in specs.
COLLECT_GCC=local/bin/gfortran
COLLECT_LTO_WRAPPER=/sage/local/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../src/configure --prefix=/sage/local --with-local-prefix=/sage/local --with-system-zlib --without-isl --disable-multilib --disable-nls --disable-libitm --disable-bootstrap --enable-languages=fortran --disable-darwin-at-rpath CXX=g++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (GCC)
Replying to François Bissey:
we want to match the support from the host gcc. So, it may be more complicated to achieve.
Quite possible that this is needed, yes
suitesparse still fails to build.
comment:49 has changed - getting a different error now
# cat SuiteSparse_config/build/CMakeFiles/CMakeError.log
make[6]: Entering directory '/sage/local/var/tmp/sage/build/suitesparse-git/src/SuiteSparse_config/build/CMakeFiles/FortranCInterface'
make[6]: Leaving directory '/sage/local/var/tmp/sage/build/suitesparse-git/src/SuiteSparse_config/build/CMakeFiles/FortranCInterface'
make[6]: Entering directory '/sage/local/var/tmp/sage/build/suitesparse-git/src/SuiteSparse_config/build/CMakeFiles/FortranCInterface'
[ 92%] Building Fortran object CMakeFiles/FortranCInterface.dir/main.F.o
[ 94%] Building Fortran object CMakeFiles/FortranCInterface.dir/call_sub.f.o
[ 97%] Building Fortran object CMakeFiles/FortranCInterface.dir/call_mod.f90.o
[100%] Linking Fortran executable FortranCInterface
lto1: internal compiler error: bytecode stream: expected tag LTO_function instead of LTO_eh_table
0x9b4cc1 lto_tag_check
../../src/gcc/lto-streamer.h:1028
0x9b4cc1 input_function
../../src/gcc/lto-streamer-in.cc:1361
0x9b4cc1 lto_read_body_or_constructor
../../src/gcc/lto-streamer-in.cc:1621
0x7020ce cgraph_node::get_untransformed_body()
../../src/gcc/cgraph.cc:4011
0x70c48d cgraph_node::expand()
../../src/gcc/cgraphunit.cc:1806
0x70c48d cgraph_node::expand()
../../src/gcc/cgraphunit.cc:1788
0x70da4e expand_all_functions
../../src/gcc/cgraphunit.cc:1999
0x70da4e symbol_table::compile()
../../src/gcc/cgraphunit.cc:2349
0x680901 lto_main()
../../src/gcc/lto/lto.cc:657
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make[7]: *** [/tmp/ccL3cCy7.mk:2: /tmp/cc63Hwwl.ltrans0.ltrans.o] Error 1
This will need more work on another day
I have given it some thoughts. bookworm and sid are the only you report failing at this stage. It looks to me that they are both using gcc-12.2.0+patches - gentoo currently similarly ship gcc-12.2.1_pre20221210, some kind of pre-release. It seems it has incompatibilities with earlier gcc/gfortran releases, at least in debian. And our gcc/gfortran is an earlier and official release. I don't see a way out of this that doesn't forbid this version of the compiler unless there are both gcc and gfortran installed.
I agree, the Debian patches are likely the cause for the incompatibility. I think the LTO data comes with a version annotation, and Debian should probably have bumped the version along with their patches.
(We also carry a patch, for macOS M1/M2 support, but I don't think it is the problem here.)
(from #34203 comment:34)
DESTDIR
is used twice in the-o
.DESTDIR
handling is coming frombuild/pkgs/suitesparse/patches/03-buildflags.patch
We upgrade to 5.12.0 and pick up a fresh set of patches from Debian or another distro
Depends on #34746 Depends on #34835
CC: @kiwifb
Component: packages: standard
Author: François Bissey
Branch/Commit: u/mkoeppe/suitesparse6.0.1 @
424cb49
Issue created by migration from https://trac.sagemath.org/ticket/34206