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

Error when building curl on macOS #235

Closed
dunglas opened this issue Oct 17, 2023 · 2 comments · Fixed by #236
Closed

Error when building curl on macOS #235

dunglas opened this issue Oct 17, 2023 · 2 comments · Fixed by #236
Labels
bug Something isn't working kind/dependency Issues related to dependencies os/macos Things only for macOS

Comments

@dunglas
Copy link
Contributor

dunglas commented Oct 17, 2023

Building curl on macOS in GitHub Actions now fails with this error:

[20:01:57] [DEBU] Running command with direct output: cd '/Users/runner/work/frankenphp/frankenphp/static-php-cli/source/curl/build' && PKG_CONFIG='/Users/runner/work/frankenphp/frankenphp/static-php-cli/buildroot/bin/pkg-config' PKG_CONFIG_PATH='/Users/runner/work/frankenphp/frankenphp/static-php-cli/buildroot/lib/pkgconfig/' CC='clang' CXX='clang++' CFLAGS='--target=x86_64-apple-darwin -Wimplicit-function-declaration -Os' PATH='/Users/runner/work/frankenphp/frankenphp/static-php-cli/buildroot/bin:/Users/runner/go/bin:/Users/runner/hostedtoolcache/go/1.21.1/x64/bin:/usr/local/lib/ruby/gems/3.0.0/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/pipx_bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools:/Users/runner/.ghcup/bin:/Users/runner/hostedtoolcache/stack/2.11.1/x64' cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/frankenphp/frankenphp/static-php-cli/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_CURL_EXE=OFF -DCURL_USE_OPENSSL=ON -DCURL_BROTLI=OFF -DCURL_USE_LIBSSH2=OFF -DUSE_NGHTTP2=OFF -DCURL_DISABLE_LDAP=ON -DCURL_ZSTD=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF  ..
-- The C compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- curl version=[8.4.0]
-- Picky compiler options: -Wextra -Wall -pedantic -Wbad-function-cast -Wconversion -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-long-long -Wno-multichar -Wpointer-arith -Wshadow -Wsign-compare -Wundef -Wunused -Wwrite-strings -Wcast-align -Wdeclaration-after-statement -Wempty-body -Wendif-labels -Wfloat-equal -Wignored-qualifiers -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Wstrict-prototypes -Wtype-limits -Wvla -Wshift-sign-overflow -Wshorten-64-to-32 -Wdouble-promotion -Wenum-conversion -Wunused-const-variable -Wcomma -Wmissing-variable-declarations -Wassign-enum -Wextra-semi-stmt
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_ADDR
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_ADDR - Success
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - Success
-- Found Perl: /usr/local/bin/perl (found version "5.36.1") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for connect in socket;-framework SystemConfiguration
-- Looking for connect in socket;-framework SystemConfiguration - not found
-- Looking for gethostname
-- Looking for gethostname - found
CMake Error at CMakeLists.txt:469 (message):
  CoreServices framework not found

This looks related to curl/curl#11894: since curl 8.4.0, CoreServices are also required, because of a change in Mac Sonoma. I tried to add CoreServices in the framework section for curl in lib.json, but this doesn't fix the issue: main...dunglas:static-php-cli:fix/curl-mac

Reproducer and logs: dunglas/frankenphp#266

@crazywhalecc crazywhalecc added bug Something isn't working kind/dependency Issues related to dependencies os/macos Things only for macOS labels Oct 17, 2023
@crazywhalecc
Copy link
Owner

crazywhalecc commented Oct 17, 2023

At present, spc directly bypasses the check items of CMakeLists.txt, and finally adds the framework when linking php binary.

@dunglas
Copy link
Contributor Author

dunglas commented Oct 17, 2023

In figured that at the same time (last push in my branch) and I confirm that it works 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kind/dependency Issues related to dependencies os/macos Things only for macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants