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

Build bcu under Mac OS (M1 silicon) #16

Open
muddog opened this issue Jan 19, 2024 · 0 comments
Open

Build bcu under Mac OS (M1 silicon) #16

muddog opened this issue Jan 19, 2024 · 0 comments

Comments

@muddog
Copy link

muddog commented Jan 19, 2024

If you failed to build bcu under Mac M1, then you probably meet OpenSSL version issue. Normally brew use OpenSSL@3 as default, but bcu requires 1.1. To fix this:

brew install openssl@1.1
export PKG_CONFIG_PATH=/opt/Cellar/openssl\@1.1/1.1.1q/lib/pkgconfig
export LIBOPENSSL_PREFIX=/opt/Cellar/openssl\@1.1/1.1.1q

Remove the libssh2 and curl executable boot from CMakelist of libcurl:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a1333397..c04e44264 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,7 +73,7 @@ include_directories(${CURL_SOURCE_DIR}/include)

 option(CURL_WERROR "Turn compiler warnings into errors" OFF)
 option(PICKY_COMPILER "Enable picky compiler options" ON)
-option(BUILD_CURL_EXE "Set to ON to build curl executable." ON)
+option(BUILD_CURL_EXE "Set to ON to build curl executable." OFF)
 option(BUILD_SHARED_LIBS "Build shared libraries" ON)
 option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
 if(WIN32)
@@ -639,7 +639,7 @@ if(CURL_BROTLI)
 endif()

 #libSSH2
-option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON)
+option(CMAKE_USE_LIBSSH2 "Use libSSH2" OFF)
 mark_as_advanced(CMAKE_USE_LIBSSH2)
 set(USE_LIBSSH2 OFF)
 set(HAVE_LIBSSH2 OFF)

After that, do:

cmake .
./build_libs_mac.sh
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant