Open mattpulver opened 6 months ago
Hello @mattpulver ,
We've tried to reproduce the issue with all the software versions as reported except Arch Linux though with no luck. Did you have any progress on your side meanwhile?
Yes I'm able to get through this by adding
awk '{print} /\(ONEAPI\.include_options\)/{print "\tsed -i \x27s# -isystem/usr/include$$##\x27 $@"}' \
makefile > makefile.tmp && mv makefile.tmp makefile
to the prepare()
step in the PKGBUILD file.
I haven't tracked down where the /usr/include
entry is coming from that appears in the intermediate inc_[ay]_folders.txt
files but I think this would be fixed if they were omitted. I'm not sure why they need to be included, as they seem to mess up
#include_next <stdlib.h>
Describe the bug Fatal error when building:
To Reproduce Steps to reproduce the behavior:
Expected behavior It should build successfully
Diagnosis and Fix The problem first occurs at this step:
which results in the above
fatal error
. We can see the reason for this by adding-v
to theg++
command. It reports:From the error message:
In context, that line in
/usr/include/c++/13.2.1/cstdlib
is:What should happen is that
stdlib.h
is included from/usr/include
. However since/usr/include
precedes/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../include/c++/13.2.1
in the above#include <...> search
paths, it doesn't find it, resulting in the error.The source of how these
#include <...> search
paths got mixed up is from@./__work_gnu/md/lnx32e/oneapi_dynamic/inc_y_folders.txt
which is in the aboveg++
command:Note the last parameter
-isystem/usr/include
. By simply excluding this from theinc_a_folders.txt
andinc_y_folders.txt
generated files fixes the problem. Making this change results in/usr/include
coming correctly after/usr/include/c++/13.2.1
in the#include <...> search
paths.Environment: