ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
384 stars 86 forks source link

Ginkgo build crashes #1530

Closed TomasOberhuber closed 5 months ago

TomasOberhuber commented 5 months ago

At this point

[ 61%] Building CXX object core/test/reorder/CMakeFiles/core_test_reorder_amd.dir/amd.cpp.o

the build crashes with the following

In file included from /home/oberhuber/Downloads/ginkgo/include/ginkgo/core/base/types.hpp:9,
     2                  from /home/oberhuber/Downloads/ginkgo/core/test/base/types.cpp:5:
     3 ./array:1:1: error: stray â<80><98>\177â<80><99> in program
     4     1 | <U+007F>ELF<U+0002><U+0001><U+0001><U+0003><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0003><U+0000>><U+0000><U+0001><U+0000><U+0000><U+0000><c0><fe><U+0006><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0010>P8<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+00       00>8<U+0000>
     5       | ^~~~~~~~
     6 ./array:1:5: error: stray â<80><98>\2â<80><99> in program
     7     1 | <U+007F>ELF<U+0002><U+0001><U+0001><U+0003><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0003><U+0000>><U+0000><U+0001><U+0000><U+0000><U+0000><c0><fe><U+0006><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0010>P8<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+00       00>8<U+0000>
     8       |            ^~~~~~~~
     9 ./array:1:6: error: stray â<80><98>\1â<80><99> in program
    10     1 | <U+007F>ELF<U+0002><U+0001><U+0001><U+0003><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0003><U+0000>><U+0000><U+0001><U+0000><U+0000><U+0000><c0><fe><U+0006><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0010>P8<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>@<U+00       00>8<U+0000>
    11       |                    ^~~~~~~~
    12 ./array:1:7: error: stray â<80><98>\1â<80><99> in program
....

and it continues for several more megabytes :). I use the following compilers:

gcc (GCC) 13.2.1 20230801

and

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Tue_Aug_15_22:02:13_PDT_2023 Cuda compilation tools, release 12.2, V12.2.140 Build cuda_12.2.r12.2/compiler.33191640_0

upsj commented 5 months ago

It sounds like you are trying to include a binary as a header file. Does your CPATH environment variable perhaps include an empty string (::), contain . or start or end with :? We've had many issues like that in the past.

TomasOberhuber commented 5 months ago

Yes, it helped. It has never happened to me before. I am sorry for that. Thanks a lot.

upsj commented 5 months ago

No worries, this is among the most obscure build bugs we had so far. That happens if you have an executable that is named the same as a standard library header. We could probably rename the test, but that would make things inconsistent, so we avoided it so far