Re: SIZEOF_LONG undefined when cross-compiling for iOS
Date: Fri, 17 May 2019 10:21:27 +0200 (CEST)
On Fri, 17 May 2019, Jonas Vautherin via curl-library wrote:
> I have been trying to cross-compile curl for iOS, using leetal's toolchain
> [1] (and another, similar one that has the same issue).
>
> When building for the "Xcode" cmake generator (cmake -G Xcode <...>), curl
> build successfully. But when building for the "Unix Makefiles" generator, I
> get an error saying that SIZEOF_LONG is undefined.
Seems lame. The curl cmake file has always checked that size since the first
day we had one. Although I don't know how good cmake is at doing that for
cross-compiles...
> I see that SIZEOF_LONG is defined in curl_config.h.cmake [2], but I don't
> really get where it comes from.
In cmake builds, here:
https://github.com/curl/curl/blob/f3e0f071b14fcb46a453f69bdf4e062bcaacf362/CMakeLists.txt#L798
(and obviouly similarly by configure, but that's not the topic here)
> Should I set it somewhere manually?
You should at least set it somewhere. Exactly what the best way is for you to
set it, I leave to you.
> And if yes, it is always right to say that it should be "8" on 64-bits
> archs, and "4" on 32-bits archs (as described here [3])?
All 64 bit iOS targets will have it at 8 as far as I know, yes.
-- / daniel.haxx.se | Get the best commercial curl support there is - from me | Private help, bug fixes, support, ports, new features | https://www.wolfssl.com/contact/ ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2019-05-17