leenjewel / openssl_for_ios_and_android

OpenSSL Library for iOS and Android
927 stars 318 forks source link

编译curl时32位架构都编译不出来 #24

Closed 39251474 closed 6 years ago

39251474 commented 6 years ago

netrc.c: In function 'Curl_parsenetrc': netrc.c:80:7: error: implicit declaration of function 'getpwuid_r' [-Werror=implicit-function-declaration] if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) ^ cc1: some warnings being treated as errors make[2]: *** [libcurl_la-netrc.lo] Error 1

同样的错误,似乎是pwd.h的头文件没有被引入,受HAVE_PWD_H宏控制,但是64位的都能过

lizhangqu commented 6 years ago

设置target >=21

39251474 commented 6 years ago

默认的设置就是21 ANDROID_API=${ANDROID_API:-21}

39251474 commented 6 years ago

已找到原因,如果在编译curl之前先编译了openssl,则在编译curl前需要删除对应架构的工具链副本让它重新生成对应的工具链