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

Installation on MacOS #150

Open
holmes1412 opened this issue Nov 11, 2020 · 10 comments
Open

Installation on MacOS #150

holmes1412 opened this issue Nov 11, 2020 · 10 comments
Labels
documentation Improvements or additions to documentation

Comments

@holmes1412
Copy link
Contributor

holmes1412 commented Nov 11, 2020

Workflow需要依赖OpenSSL(推荐1.1及以上版本)和Cmake(要求3.6以上版本),以下为安装步骤:

  • 安装 OpenSSL

    brew install openssl
    
  • 安装 CMake

    brew install cmake
    
  • 指定 OpenSSL 环境变量
    由于MacOS下默认有LibreSSL,因此在brew安装后,并不会自动建软链,我们需要手动把执行路径、编译路径、cmake时的find_package路径都配置到bash的环境变量中。用户可以执行brew info openssl查看相关信息,也可以如下配置:

    echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
    echo 'export LDFLAGS="-L/usr/local/opt/[email protected]/lib"' >> ~/.bash_profile
    echo 'export CPPFLAGS="-I/usr/local/opt/[email protected]/include"' >> ~/.bash_profile
    echo 'export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"' >> ~/.bash_profile
    echo 'export OPENSSL_ROOT_DIR=/usr/local/opt/openssl' >> ~/.bash_profile
    echo 'export OPENSSL_LIBRARIES=/usr/local/opt/openssl/lib' >> ~/.bash_profile
    

    如果使用zsh,则还需要以下一步,把bash的配置加载一下:

    echo 'test -f ~/.bash_profile  && source ~/.bash_profile' >> ~/.zshrc
    source ~/.zshrc
    
@Barenboim Barenboim added the documentation Improvements or additions to documentation label Nov 11, 2020
@wangh09
Copy link

wangh09 commented Dec 20, 2020

Hi. 建议维护一个conan repo

@holmes1412 holmes1412 reopened this May 30, 2021
@wqw547243068
Copy link

按照以上步骤执行,还是报错

  • ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64
[ 98%] Linking CXX shared library ../../_lib/libworkflow.dylib
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../_lib/libworkflow.dylib] Error 1
make[2]: *** [src/CMakeFiles/workflow-shared.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

@holmes1412
Copy link
Contributor Author

你好,我们昨天对cmake有一些改动,为了兼容更多系统,所以改动略大,今天在持续修复中。
麻烦先使用前两天的版本,或者release 0.9.9~这两天会整天完成cmake的改动,整体改完我再at你看看~非常感谢小伙伴!

@Barenboim
Copy link
Contributor

更新了master,可以再试一下。
@wqw547243068

@wqw547243068
Copy link

mac编译通过,谢谢!

@wuleying
Copy link

wuleying commented Jan 30, 2022

更新了master,可以再试一下。 @wqw547243068

使用master碰到一样的问题

[ 98%] Linking CXX shared library ../../_lib/libworkflow.dylib
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../_lib/libworkflow.dylib] Error 1
make[2]: *** [src/CMakeFiles/workflow-shared.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

@Barenboim
Copy link
Contributor

更新了master,可以再试一下。 @wqw547243068

使用master碰到一样的问题

[ 98%] Linking CXX shared library ../../_lib/libworkflow.dylib
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../_lib/libworkflow.dylib] Error 1
make[2]: *** [src/CMakeFiles/workflow-shared.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

目前最新master或0.9.10的release有这个问题?你可以改一下cmake,先把动态库的编译先去了。在src/CMakeLists.txt里。

@aquilius2022
Copy link

你好:
这是我今天编译遇到的错误。麻烦能不能说一下怎么修改cmake?
十分感谢。
mkdir -p build.cmake
rm -rf build.cmake/CMakeCache.txt
cd build.cmake && cmake -D KAFKA= -D MYSQL= -D REDIS= /Users/jiehou/Downloads/workflow-0.9.9/tutorial
-- The C compiler identification is AppleClang 12.0.5.12050022
-- The CXX compiler identification is AppleClang 12.0.5.12050022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/local/opt/openssl/lib/libcrypto.dylib (found version "1.1.1l")

CMake Error at CMakeLists.txt:13 (find_package):
Could not find a package configuration file provided by "workflow" with any
of the following names:

workflowConfig.cmake
workflow-config.cmake

Add the installation prefix of "workflow" to CMAKE_PREFIX_PATH or set
"workflow_DIR" to a directory containing one of the above files. If
"workflow" provides a separate development package or SDK, be sure it has
been installed.

-- Configuring incomplete, errors occurred!
See also "/Users/jiehou/Downloads/workflow-0.9.9/tutorial/build.cmake/CMakeFiles/CMakeOutput.log".
See also "/Users/jiehou/Downloads/workflow-0.9.9/tutorial/build.cmake/CMakeFiles/CMakeError.log".
make: *** [all] Error 1

@Barenboim
Copy link
Contributor

Barenboim commented Feb 4, 2022

@aquilius2022
你是要编译tutorial吗?直接到tutorial目录里,输入make就可以了。按下面几个命令:

git clone https://github.com/sogou/workflow
cd workflow
make
cd tutorial
make

@aquilius2022
Copy link

@Barenboim,
great. it can be compiled well. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

6 participants