-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 error on Android targets other than arm64-v8a #5586
Comments
Based on this:
It seems that when you're building for this particular target, z3 ends-up At the top-level build folder (i.e., where you ran
This should (roughly) allow us to see what chain of includes leads to |
Hi @andrewvaughanj, and thanks for taking a look. I get the following output:
Which grepping for
So I'd guess your hunch is right re: Any pointers on what I can do to investigate further / fix? I'm definitely out of my depth here so all help appreciated :-) |
Issue Z3Prover#5586 reported that Android builds (targetting, e.g., x86) failed to compile due to a conflict between: * `struct user` in `sys/user.h`; and * `namespace user` in z3's `user_solver.h` This issue is resolved by renaming `namespace user` to `namespace user_solver` (matching the header name) to avoid this conflict. Reported-by: Jamie Collinson <[email protected]> Signed-off-by: Andrew V. Jones <[email protected]>
Issue Z3Prover#5586 reported that Android builds (targetting, e.g., x86) failed to compile due to a conflict between: * `struct user` in `sys/user.h`; and * `namespace user` in z3's `user_solver.h` This issue is resolved by renaming `namespace user` to `namespace user_solver` (matching the header name) to avoid this conflict. Reported-by: Jamie Collinson <[email protected]> Signed-off-by: Andrew V. Jones <[email protected]>
So, a brief look at this suggests that I opened #5587 to try and fix this for you. |
Issue Z3Prover#5586 reported that Android builds (targetting, e.g., x86) failed to compile due to a conflict between: * `struct user` in `sys/user.h`; and * `namespace user` in z3's `user_solver.h` This issue is resolved by renaming `namespace user` to `namespace user_solver` (matching the header name) to avoid this conflict. Reported-by: Jamie Collinson <[email protected]> Signed-off-by: Andrew V. Jones <[email protected]>
Issue #5586 reported that Android builds (targetting, e.g., x86) failed to compile due to a conflict between: * `struct user` in `sys/user.h`; and * `namespace user` in z3's `user_solver.h` This issue is resolved by renaming `namespace user` to `namespace user_solver` (matching the header name) to avoid this conflict. Reported-by: Jamie Collinson <[email protected]> Signed-off-by: Andrew V. Jones <[email protected]>
Worked perfectly, and I've built all my desired targets ( Thanks - assistance much appreciated and if there's anything else Android related I can do to help the project let me know. |
For catching any regressions at build time you are invited to add pipeline definitions to either our GitHub Actions or CI/Nightly Azure pipelines. |
@NikolajBjorner I was thinking about doing that, as it wouldn't be a big step from the build script I've created (linked in first post). What would be best, I'm guessing Azure pipelines since that's where the other binary builds are happening? |
I just looked at the script. It looks like it is mainly about ensuring that the VM has pulls the right SDK (apt-get). Azure pipelines have more features but are heavier to dance with. Github action are more modular and can be run on every build. How about creating a github action and I can take it from there? |
It is something like
where you have to replace $androidAPI with something like with
Of course it takes up some time to write and test this script. |
Leave it with me and I'll take a look. I know Azure pipelines have an instance with NDK already installed (not sure if Github actions do) but I'll start with GitHub actions as I've more experience with them. |
See Z3Prover/z3#5586. libafl with `cmin` feature cannot be builded for Android.
See Z3Prover/z3#5586. libafl with `cmin` feature cannot be built for Android.
See Z3Prover/z3#5586. libafl with `cmin` feature cannot be built for Android.
I'm trying to build Z3 with java bindings for use in an Android project. I've successfully compiled for
arm64-v8a
with the cmake config in this script, but when I try for other targets (I'd ideally likearmeabi-v7a
,x86
andx86_64
so that I can build the project for all common Android devices) I get the following errors, apologies for long log, thought it would probably be helpful:I'm very rusty on C++ so was hoping someone might have some pointers - should I just be tweaking the
CMAKE_CXX_FLAGS
to change-Werror
config, or is this something more problematic I'm missing?The text was updated successfully, but these errors were encountered: