-
Notifications
You must be signed in to change notification settings - Fork 173
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
Fix: Fix pkgconfig detection, and multiple subsequent build for Android #833
Fix: Fix pkgconfig detection, and multiple subsequent build for Android #833
Conversation
try to confuse cmake , see navit-gps#833
Hi, and indeed, it goes wrong on circleci too, so it is not just some local issue in your setup
However, the solution you propose might work (did not test that), but it removes some flexibility by hardcoding some choices. context of the remark : for quite a while I build for windows in 2 flavors, classic with glib from support or I build a dll for glib first and then cmake detects it and skips the stuff from support. Just now I wanted to start to port that dual system over to android, but with your solution cmake won't ever detect a prebuilt glib for android and keep building the stuff from support, at least it is what I think will happen. |
Hi, adding maybe we could add If you build smth. for linux again on your box you will have to reinitialize those paths I don't know enough about cmake to find the actual cause, maybe somone else can. |
Hi @jandegr, I tried your proposal and it does the trick for me: |
@jandegr, I have implemented your proposal, as it works wellfor my setup and it would be a good thing that this is done automatically during build. |
Oops, there was still code on CMakeLists.txt changes in this PR (these diffs were not needed anymore, the implementation has been done another way in the build_android.sh script). |
…id (#833) * Fixing lib detection based on build host for Android builds * Fixing workaround according to jandegr's proposal * Fixing subsequent Android builds (where rename fails because of pre-existing renamed files)
…id (navit-gps#833) * Fixing lib detection based on build host for Android builds * Fixing workaround according to jandegr's proposal * Fixing subsequent Android builds (where rename fails because of pre-existing renamed files)
This PR brings 2 changes for the build for Android platforms:
It fixes rename of the filenames (have to be lowercase on Android) so builds work even if it is run multiple times (today, only the first build works, further builds fail because rename itself fails, as renamed lowercase files still exist in the previous build working directories)
It changes the way the build process uses pkgconfig.
Indeed glib and ezxml dependencies are checked by default against the build host, not against the toolchain Android libs.
It seems that this started from 4e5b35a.
This issue does not seem to occur on CircleCI builds, but seem to occur when manually building on a host where glib, gmodule, dbusglib and/or ezxml headers are present.
Symptom of the wrong libs picked up is an error during compilation:
The source can then be spotted inside the -I options of the compiler's command line.
During compilation for ../../../../../support/wordexp/wordexp.c, the compiler is called with
-I/usr/include/glib-2.0
, which uses the locally installed glib. The issue is fixed if this argument is replaced by:-I../../../../../support/glib