Skip to content
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

Unable to compile the CppAD on universal windows platform #65

Closed
GiulioRomualdi opened this issue Aug 4, 2020 · 4 comments
Closed

Unable to compile the CppAD on universal windows platform #65

GiulioRomualdi opened this issue Aug 4, 2020 · 4 comments

Comments

@GiulioRomualdi
Copy link
Contributor

I'm trying to port CppAD on vckg. The compilation on universal windows platform fails with the following error

Make Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
   cppad_has_signed_long_long_EXITCODE (advanced)
   cppad_has_signed_long_long_EXITCODE__TRYRUN_OUTPUT (advanced)
For details see D:/buildtrees/cppad/x64-uwp-dbg/TryRunResults.cmake
-- Performing Test cppad_has_signed_long_long - Failed
-- cppad_has_signed_long_long = 1
-- Performing Test cppad_has_rvalue
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
   cppad_has_rvalue_EXITCODE (advanced)
   cppad_has_rvalue_EXITCODE__TRYRUN_OUTPUT (advanced)
For details see D:/buildtrees/cppad/x64-uwp-dbg/TryRunResults.cmake
-- Performing Test cppad_has_rvalue - Failed
-- cppad_has_rvalue = 1
-- Performing Test cppad_has_nullptr
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
   cppad_has_nullptr_EXITCODE (advanced)
   cppad_has_nullptr_EXITCODE__TRYRUN_OUTPUT (advanced)
For details see D:/buildtrees/cppad/x64-uwp-dbg/TryRunResults.cmake
-- Performing Test cppad_has_nullptr - Failed
-- cppad_has_nullptr = 1
-- Performing Test cppad_has_long_long
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
   cppad_has_long_long_EXITCODE (advanced)
   cppad_has_long_long_EXITCODE__TRYRUN_OUTPUT (advanced)

Here the related comment written by @NancyLi1013: microsoft/vcpkg#12560 (comment)

@bradbell
Copy link
Contributor

bradbell commented Aug 4, 2020

This message is during a check to see if C++11 is available; see
https://en.cppreference.com/w/cpp/language/types

If these tests fail, CPPAD_USE_CPLUSPLUS_2011 will be zero, see
https://coin-or.github.io/CppAD/doc/preprocessor.htm#Documented%20Here.CPPAD_USE_CPLUSPLUS_2011

which will be defined in include/cppad/configure.hpp after cmake is run.

@bradbell
Copy link
Contributor

bradbell commented Aug 4, 2020

As a post script here, I am considering requiring C++11 since the standard is over 10 years old.

@bradbell
Copy link
Contributor

bradbell commented Dec 4, 2020

I have converted CppAD to require c++11; see the heading 12-03 on
https://coin-or.github.io/CppAD/doc/whats_new_20.htm

Please see what the state of this issue is with the current master.

@traversaro
Copy link

Thanks a lot @bradbell ! To clarify a bit the context in which @GiulioRomualdi opened the issue, the problem arised when adding CppAD to vcpkg (https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=msvc-160), and it was reported by vcpkg's CI system, and it may be tricky to try to replicate it. I general, if try_run is not used anymore, I think it is ok to close the issue, and once a new release of CppAD is ready we will update the vcpkg port and check if now it compiles fine on uwp in vcpkg's CI system.

@bradbell bradbell closed this as completed Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants