-
Notifications
You must be signed in to change notification settings - Fork 16
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
Build failure on Linux ARM64 #67
Comments
Dear Martin, Thank you for your report. I had no doubt that char c can take a value in the range of -128 <= c <= 127, so the compiler error you reported is unexpected. As you suggested, the simplest way would be to change the data type of phs5 and phs3 in struct SGPT2 (codepot.h) from char to short or int. Alternatively, although I am entirely ignorant about Linux ARM64/aarch64, I wonder there might be a way for assigning a 8 byte constant(s) to initialize a char variable(s). Is cast like char(-2) ilegal? I am trying to port vectorized version of spaln from Intel to other architectures. However, the project is still on the way. Osamu, |
Dear Osamu, mgrigorov in 🌐 euler-arm-22 in spaln/src on master via C v10.3.1-gcc took 10s
❯ git diff
diff --git i/src/codepot.h w/src/codepot.h
index c2e7527..54bbb81 100644
--- i/src/codepot.h
+++ w/src/codepot.h
@@ -42,8 +42,8 @@ struct SGPT6 {
char phs3;
};
-static const SGPT2 ZeroSGPT2 = {0, 0, -2, -2};
-static const SGPT6 ZeroSGPT6 = {0, 0, 0, 0, 0, 0, -2, -2};
+static const SGPT2 ZeroSGPT2 = {0, 0, char(-2), char(-2)};
+static const SGPT6 ZeroSGPT6 = {0, 0, 0, 0, 0, 0, char(-2), char(-2)};
static const float rlmt_quant = 0.8;
indeed fixed the problem! But now it failed with several errors like:
I see that it is supposed to use |
For some reason the build also fails on my x86_64 dev machine:
|
With #68 I've added CI for testing the build on x86_64 and aarch64. |
Dear Martin, Thank you for your suggestions. By using sse2neon.h, I could successfully install and run spaln on my Mac Note Pro (actually, I am not a heavy user of Mac). By reviewing my codes of simd_functions.h, I found a few elementary errors. After fixing them, spaln now normally runs on my Mac without the help of sse2neon.h. The new version (version 3.05) has just been uploaded. Although I am not familiar with Linux ARM64/aarch64, I hope the new version may be good for the architecture, potentially after minor revisions. As the MacOS does not seem support zlib library by default, I manually installed it from the source. Likely, I could not figure out how to install GSL-dependent programs in Mac. Or more generally I want to know how to use GNU facilities on Mac or other OSs based on ARM64/aarch64 architecture. If you know something about this issue, please let me know. Osamu, |
Thanks for the update, @ogotoh ! |
Here are the errors I face with 3.0.5 on Linux ARM64:
|
As you can see I needed to make some changes to Makefile.in to fix issues like |
#68 introduces CI (i.e. automated testing) that could be used to verify changes on Linux x86_64 and Linux aarch64. I could add jobs for Mac x86_64 and arm64 too if you are interested! |
Dear Martin, Looking into the error messages you kindly sent me, all errors are likely to be derived from type mismatches. Although I tried to fix them, I cannot confirm the fixation by myself as clang++ on MacOS Pro doesn’t report type mismatches you reported. Could you examine the new version 3.0.5a on your system? I will consider your changes in Makefile.in later. Osamu, |
3.0.5a looks much better:
Good job! |
Dear Martin, Thank you very much for your quick response. It seems that the type mismatches in Ver.3.0.5 have been remedied. I have a few questions with regard to your suggestions on Makefile.in.
Osamu, |
Here you specify both the file names which act as Make targets and the linker flags. While explaining this I realize that I have a bug in my PR! |
Dear Martin, I have modified Makefile.in. If it is OK, I will rearrange tags, that are currently somewhat messy. Osamu, |
Looks very good to me ! 👍🏻 |
Dear Martin, I thank you so much for your kind cooperation!! Without you help, it would have taken much longer time to make spaln executable on Linux ARM64 and MacOS. Osamu, |
@ogotoh Could you please make a new release/tag with the latest improvements ? |
Dear Martin, As described in “Changes in version 3.0.5”, I manually installed libz.a from the source. At present, I have no idea how to atomize this procedure by the spaln installer. Osamu, |
Dear Osamu, In the PR that I suggested for testing on Ubuntu x86_64 and aarch64 I use So, in my opinion you don't need to do anything about it - spaln should just assume that libz is already provided by other means. |
Dear Martin, I see. Thank you again for your persistent efforts for easier installation of Spaln into various architectures. Osamu, |
Hello,
I am trying to build Spaln on Linux ARM64/aarch64 and it fails with:
The reason is that
char
type is unsigned for ARM64 architecture:spaln/src/codepot.h
Line 45 in db1f024
The simplest solution is to change
char
toint
for the fields which could have negative values.Other/better ideas ?
Thank you!
The text was updated successfully, but these errors were encountered: