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
android cross compile autoconf header check #222
Comments
Thanks @polmr. Please bear with me due to my Autotools ignorance. I'm guessing the pain point is
I'm guessing the culprit is STLport, and
If the defines are completely missing, then I would venture a guess:
For item (1) and Crypto++ procedures, our setenv-android.sh script uses STLport by default, but allows selection of GNU. I don't know how to convert it to Autotools. For item (2), I'm guessing a C++ compiler is all that's needed. Or maybe add For item (3), you might be able to "force include" a header like |
Thanks again @polmr. Here's what a typical compile looks like using our Android procedures and our setenv-android.sh script. It may help guide you when back fitting Autotools. Notice we always need a You should also have a look at our wiki page with the procedures at Android (Command_Line). The page provides the
If you want ARMv7a and GNU STL, then something like the following will probably do:
|
I should probably comment on this:
Crypto++'s When cross compiling with Autotools (always a treat), the user typically specifies the triplet that includes host and target:
Keep in mind you still must get the STL header inserted into
Autotools is not for the feint of heart when cross-compiling for Android. Also see Convey C++ STL library for Android?, How To Configure for Android? and How To Configure for Android? (Redux for x86_64) on the Autoconf mailing list. I know about them because I already suffered them :) |
@polmr, Is there anything else we can do for you here? Also, the user group is located at Crypto++ Users Group. |
Hi @noloader, thank you for your support! STLport defines _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT at host.h but it might be undef later on. The thing is that... I don't have any problem compiling is just the header check in configure. Adding |
I've found out that the problem is not Changing In the end std:uncaught_exception exists in c++98. Maybe it should also check that c++ < c++17 since uncaught_exception is supposed to be deprecated for the upcoming c++17 (http://en.cppreference.com/w/cpp/error/uncaught_exception) |
@polmr, I might be missing something, but I think there's something not quite right about the Autotools test. Below,
If I am parsing things correctly, that only inverts the test. It make failures appear to succeed, and successes appear to fail. I think the real issue is Autotools does not have an STL library available when it performs its tests. The Autotools folks need to say how to specify a C++ STL library with the header check. If I knew how to do it, then I would tell you. Unfortunately, I don't know how to do it, so I depend on the Autotools folks like you.
Thank you very much. We need to account for that. it looks like that value is in flux at the moment (If I am parsing LLVM's patch correctly):
|
We added the C++17 guard on the We are actively testing C++17 with both |
@polmr, I tested with
I think your best bet is to liaise with the Autotools folks to determine how to specify the STL library under Android. Is there anything else we can try to assist with? |
@polmr, despite my sincerest efforts to work with the Autoconf folks to find a solution, I can't come up with one. The Autoconf folks seem a bit unwilling to help us with the issue. Please work directly with the Autoconf folks on this issue. If you develop a patch that addresses the failure without degrading the existing tests for existing clients, then please supply a pull request. I'd be happy to incorporate it. I'll even write a wiki page for you pointing to your work for folks who want to use Autoconf rather than GNUmakefile. |
In the end it was the _STLPORT_VERSION value: in my case when cross-compiling is defined and valuated as: Therefore the check at config.h ( using latest release cryptopp563 or cryptopp562) evaluates as true: I've seen it is "solved" in 1e17620, |
Trying to check for crytopp headers, I have this on configure.ac:
AC_CHECK_HEADERS(cryptopp/cryptlib.h,, AC_MSG_ERROR([cryptopp/cryptlib.h header not found or not usable]) )
Configure reports error:
Checking the log, it leads to config.h:
Here are some related environment variables:
ARCH=arm
CXX=.../bin/arm-linux-androideabi-g++
The text was updated successfully, but these errors were encountered: