-
Notifications
You must be signed in to change notification settings - Fork 954
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
Failed to cross compile with CLANG #1957
Comments
Please post the Thanks, |
No CFLAGS were set. Here are 2 files, as you metioned: |
Thanks! An important observation is the compiler accepts the NEON flag, but issues a warning on it:
Ideally, it would have failed this test. I'll have to gain access to a suitable machine and see what I can do. Best regards, |
I have committed a change that forces Clang to not report success for this test. However, I was using a very, very old version of Clang. Unfortunately, it went on to report other errors. Therefore, this patch may or may not completely fix the reported issue. FWIW: On the other hand, it is known that GCC compiles this all just fine. |
But GCC is deprecated in Android NDK: |
First see if the change makes a difference, if not we'll figure out the next step. |
FWIW: here is a hack to run foreign architectures on x86. Basically, it registers QEMU as the handler when it sees a matching binary file. One caveat is that it will have to be statically linked (since naturally you won't be able to load the foreign libs at runtime) |
Hi! Building on device works on arm but not aarch64, the aarch64 build fails with the same error as when cross compiling, I would guess that Applying the patch in 1e5daa4 silences the configure warnings but it doesn't seem to give a different result. Here's the logs from configure from aarch64, from arm and from cross-compiling targeting aarch64 (with 1e5daa4 applied): |
1.2 probably works because the crypto engine stuff isn't there. These particular lines come from JtR and it looks like this issue has been hit before: |
I now know why this code does not compile; however, I do not have an idea on how to "quickly" fix it. The snippet complaining is:
These NEON instructions are a variant that require constant values for certain parameters; due to them being directly encoded in the output opcode. While this is not the real problem, the problem is Clang is "compiling" both side of the test expression. In turn, the failing side fails to compile because it's math on the constant parameter DOES exceed the permitted value. However, every other compiler simply takes the working expression side and discards the other. Therefore, there is no easy fix currently, and this honestly is a variation in Clang - which means it might very well be a compiler bug. While having them fix this would be certainly useful, it does not fix the immediate needs of those wishing to use the Android NDK. Thoughts, suggestions, and ideas are welcomed, |
|
One idea for a fix is to create each of these intrinsic instructions as inline static functions; whereby, the inner logic of each function is a giant switch statement for all numbers from 0-31 and 1-32. In doing so, a similar, but different macro using these new functions would not complain. Yucky! |
Some testing shows this idea sort of works, but requires a lot of "work-around" functions. It also severely impacts overall performance. I recommend using the generic + static aircrack-ng build, for now. Thanks, |
@jbenden the issue on bugs.llvm.org is still open and someone is commenting on it |
@etmatrix There are CLANG bugs that prevent this, right now... |
I tried to compile version 1.5.2 on debian 7 wheezy, I got the same issue. Debian 7 use gcc 4.6. So is not a clang bug but a missing feature. Feature introduced in an unknow version of gcc.
My scope is running aircrack-ng on an old nokia n900 and smartphone with android 8, and the only way is debian chroot. |
For AppleSilicon look at John the Ripper. |
The equivalent fix was committed to aircrack-ng in a4cdb89 and is included in version 1.7. |
I am trying to cross compile for android AARCH64.
make:
Any ideas?
The text was updated successfully, but these errors were encountered: