`meson compile` cURL errors

  • trian-gles
    22nd Aug 2023 Member 0 Permalink

    Running OSX 10.15

     

    Handled the bzip2 issue, stuck here when I try to compile:

     

    powder.p/src_client_http_requestmanager_Libcurl.cpp.o 

    c++ -Ipowder.p -I. -I.. -Isrc -I../src -Iresources -I../resources -I/usr/local/Cellar/bzip2/1.0.8/include -I/usr/local/Cellar/libpng/1.6.40/include/libpng16 -I/usr/local/include -I/usr/local/include/SDL2 -I/usr/local/Cellar/luajit/2.1.0-beta3-20230813.2/include/luajit-2.1 -I/usr/local/Cellar/fftw/3.3.10_1/include -I/usr/local/Cellar/jsoncpp/1.9.5/include -fcolor-diagnostics -Wall -Winvalid-pch -std=c++17 -fno-rtti -O0 -g -D_THREAD_SAFE -Wno-invalid-offsetof -Wno-unused-result -Wno-missing-field-initializers -Wno-unused-parameter -MD -MQ powder.p/src_client_http_requestmanager_Libcurl.cpp.o -MF powder.p/src_client_http_requestmanager_Libcurl.cpp.o.d -o powder.p/src_client_http_requestmanager_Libcurl.cpp.o -c ../src/client/http/requestmanager/Libcurl.cpp

    ../src/client/http/requestmanager/Libcurl.cpp:179:19: error: use of undeclared identifier 'curl_multi_poll'; did you mean 'curl_multi_wait'?

                    HandleCURLMcode(curl_multi_poll(manager->curlMulti, NULL, 0, 1000, &dontcare));

                                    ^~~~~~~~~~~~~~~

                                    curl_multi_wait

    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/curl/multi.h:170:23: note: 'curl_multi_wait' declared here

    CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,

                          ^

    ../src/client/http/requestmanager/Libcurl.cpp:316:3: error: use of undeclared identifier 'curl_multi_wakeup'; did you mean 'curl_multi_cleanup'?

                    curl_multi_wakeup(manager->curlMulti);

                    ^~~~~~~~~~~~~~~~~

                    curl_multi_cleanup

    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/curl/multi.h:205:23: note: 'curl_multi_cleanup' declared here

    CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);

                          ^

    ../src/client/http/requestmanager/Libcurl.cpp:326:3: error: use of undeclared identifier 'curl_multi_wakeup'; did you mean 'curl_multi_cleanup'?

                    curl_multi_wakeup(manager->curlMulti);

                    ^~~~~~~~~~~~~~~~~

                    curl_multi_cleanup

    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/curl/multi.h:205:23: note: 'curl_multi_cleanup' declared here

    CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);

     

     

     

    Any tips?

  • minecraft-physics
    27th Aug 2023 Member 0 Permalink
    It looks like macOS 10.15's system install of curl is too old to have that function. Try installing Homebrew's version of curl (it will not be symlinked, so will hopefully not break your system), which has the required function:
    ````
    grep 'poll' < /opt/homebrew/opt/curl/include/curl/multi.h
    /* Based on poll(2) structure and values.
    * We don't use pollfd and POLL* constants explicitly
    * to cover platforms without poll(). */
    * poll() on. We want curl_multi_perform() called as soon as one of
    * Name: curl_multi_poll()
    CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle,
    * Desc: wakes up a sleeping curl_multi_poll call.
    ````
    Tell meson (pkgconfig) to use this dependency with
    `export PKG_CONFIG_PATH=/opt/homebrew/opt/curl:$PKG_CONFIG_PATH`
    or something similar, I can't test exactly.