-
Notifications
You must be signed in to change notification settings - Fork 102
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
Cross compile fails because of compile of print_stdc.c which is being used to determine __STDC_VERSION__ #319
Comments
Using the following temporary patch to compile and test.
|
Which build directory do you pass to cmake? Does it work if you use another, empty dir? |
For host builds we use For cross compiled target builds we use the following: for our build directories. As in the build host output - |
The problem is that the try_run command of CMake cannot do its job when a cross compiler is used because CMake cannot run programs on the target platform. The try_run command is used to set the value of JAS_STDC_VERSION. I have modified the CMakeLists.txt file so that a mechanism is provided that allows the value of JAS_STDC_VERSION to be set from the cmake command line when cross compiling (via -DJAS_STDC_VERSION=...). Can you try it out and let me know if it works for you? I do not have a cross-compiling environment on any of my machines so I cannot fully test this change. The relevant commit is b8ecbfb. |
Looks good - I'll test on the other cross compile targets.
Output
|
And a "negative test":- Also looks good
|
Thanks for confirming that my fix works for your environment. I have made a new patch release (i.e., version-3.0.2) that includes this fix. |
Confirmed all looks good with 3.0.2 👍 |
Cross compile error with Version 3.0.1
build host output
$ /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/jasper-3.0.1/.x86_64-libreelec-linux-gnu/CMakeFiles/cmTC_c032d-print_stdc_run_status
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/jasper-3.0.1/.x86_64-libreelec-linux-gnu/CMakeFiles/cmTC_c032d-print_stdc_run_status: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.34' not found (required by /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/jasper-3.0.1/.x86_64-libreelec-linux-gnu/CMakeFiles/cmTC_c032d-print_stdc_run_status)
target host output
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-11.0-devel/build/jasper-3.0.1/.x86_64-libreelec-linux-gnu/CMakeFiles/cmTC_c032d-print_stdc_run_status
201112L
The text was updated successfully, but these errors were encountered: