-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clapack] Remove broken host-arithchk #17573
[clapack] Remove broken host-arithchk #17573
Conversation
Just a warning that I did not have access to ARM Windows machines when generating the The Linux one is not from my PR. The NO_LONG_LONG looks suspicious though. I thought this should only be printed if Unfortunately, it seems that f2c hasn't been maintained for a long time, which means that there are no guarantees that everything works as it should with it even on newer platforms ... All I can say is that igraph's tests pass. |
I generated the linux header via a 64-bit docker container, so at least it's what is output by arithchk on my machine. |
Something's not right there. On Linux x86_64, I get:
This is with gcc 7.5. I do not have direct access to Linux on aarch64 (only through CI like Travis). |
It seems like the official CMake buildsystem (http://www.netlib.org/clapack/clapack-3.2.1-CMAKE.tgz) sets NO_LONG_LONG on set_target_properties(arithchk PROPERTIES COMPILE_DEFINITIONS
"NO_FPINIT;NO_LONG_LONG")
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h
COMMAND arithchk > ${CMAKE_CURRENT_BINARY_DIR}/arith.h
DEPENDS arithchk
)
#ifndef NO_LONG_LONG
if (sizeof(long long) < 8)
#endif
fprintf(f, "#define NO_LONG_LONG\n"); It looks like the Makefile first tries to compile without it, then falls back to defining it? arith.h: arithchk.c
$(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
$(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
./a.out >arith.h
rm -f a.out arithchk.o The only use of |
b19e0bf
to
ce08bfb
Compare
That explains it. We didn't use the clapack distribution you link to in igraph. Instead, we re-translated LAPACK 3.5.0 with f2c according to the instructions there. I did not do this myself though so I do not know the details. I think the translation may not have succeeded for more recent versions (??). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Thanks robert |
As part of host dependencies, I moved
arithchk
to be built for the host and executed for the target. Unfortunately that's not howarithchk
works.arithchk
must be built for the target platform, because the detected information is fundamentally baked in at compile time.I've lifted the pre-generated files from #17311 to handle all our official targets, plus added an triplet extension point "CLAPACK_ARITH_PATH" which will allow cross-compiling users to supply their own custom
arith.h
based on their system information. The logic is:arithchk
.arith.h
arithchk
. This is likely to fail in the case of android, but it would succeed for "minor variants" likearm64-linux-dynamic
.As a bonus, this significantly improves compile times for
clapack
, since it no longer requires the host build.@Neumann-A @cenit @szhorvat I'd appreciate any input you could provide as users of numeric libraries.