aseprite / aseprite

Animated sprite editor & pixel art tool (Windows, macOS, Linux)
https://www.aseprite.org
29.67k stars 6.28k forks source link

Build erro #2570

Open pascalbros opened 4 years ago

pascalbros commented 4 years ago

Following the instructions in the README and compiling in Big Sur, ninja throws some errors related to curl:

FAILED: src/net/CMakeFiles/net-lib.dir/http_request.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DCMARK_STATIC_DEFINE -DCURL_STATICLIB -DENABLE_DATA_RECOVERY -DENABLE_NEWS -DENABLE_SAVE -DENABLE_SCRIPTING -DENABLE_UI -DENABLE_UPDATER -DHAVE_CONFIG_H -DLAF_SKIA -DNDEBUG -DPNG_NO_MMX_CODE -I../third_party/zlib -Ithird_party/zlib -I../third_party/libpng -Ithird_party/libpng -I../third_party/libwebp/src -I../third_party/tinyxml -I../third_party/pixman/pixman -I. -I../third_party/freetype2/include -I../third_party/harfbuzz/src -I../third_party/giflib/lib -I../third_party/jpeg -Ithird_party/cmark -I../third_party/curl/include -I../third_party/simpleini -I../src -I../src/observable -I../laf -Ilaf -I../laf/third_party/stringencoders/src -stdlib=libc++ -Wall -Wno-switch -O2 -g -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.9   -Wno-sign-compare -std=c++11 -MD -MT src/net/CMakeFiles/net-lib.dir/http_request.cpp.o -MF src/net/CMakeFiles/net-lib.dir/http_request.cpp.o.d -o src/net/CMakeFiles/net-lib.dir/http_request.cpp.o -c ../src/net/http_request.cpp
In file included from ../src/net/http_request.cpp:17:
In file included from ../third_party/curl/include/curl/curl.h:34:
../third_party/curl/include/curl/curlbuild.h:151:9: error: unknown type name 'socklen_t'; did you mean 'locale_t'?
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        locale_t
../third_party/curl/include/curl/curlbuild.h:138:36: note: expanded from macro 'CURL_TYPEOF_CURL_SOCKLEN_T'
#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
                                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_xlocale.h:30:28: note: 'locale_t' declared here
typedef struct _xlocale *               locale_t;
                                        ^
In file included from ../src/net/http_request.cpp:17:
In file included from ../third_party/curl/include/curl/curl.h:35:
../third_party/curl/include/curl/curlrules.h:173:6: error: '__curl_rule_04__' declared as an array with a negative size
    [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)];
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../third_party/curl/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
                          ^~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
[7/547] Building CXX object src/gen/CMakeFiles/gen.dir/ui_class.cpp.o
ninja: build stopped: subcommand failed.

Aseprite and System version

ryandesign commented 3 years ago

I would guess this is because you're using the very old version of curl bundled with aseprite, and that this is a bug that has been fixed in newer versions of curl. I do not see this problem when telling Aseprite to build using a newer separately-built curl (-DUSE_SHARED_CURL=YES). Aseprite's bundled version of curl should be updated (see https://github.com/aseprite/aseprite/issues/2451#issuecomment-706151618) or eliminated and the use of an external curl should be required (which is the opposite of #2843).