-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Add a note about OpenSSL for macOS developers. #331
Comments
Now that I overcame this hurdle, and the one listed here #313, I was greeted with
but sub-projects are a mess:
Creating the main project as an external project seems highly fragile to me. linker error
|
All this because Bear 4.0 is not available on brew. |
Hey @z-aki , thanks for this report. Yeah, the sub-project might still have bugs, but it's still the best way to handle 3rd-party-dependencies (to my best knowledge and according to the book i've read on the subject)... I was only deal with the CXX compiler, because there are no C source files in the project. But that might be still used in cases when the C linking is explicitly requested. I'll update that part. About using CMake files or PkgConfig to find gRPC: not all distro install the CMake files, but all install the PkgConfig files. (eg.: Fedora has only PkgConfig files in the package.) I'm happy to get a PR where it looks for the CMake file first and falls back to PkgConfig. :) Yes, brew does not yet have the latest Bear. (My experience with brew got painful, specially the gRPC dependency gets broken every 3 months. I think it's still in a broken state now.) I'm happy to get PRs for this platform, since I do not own macOS machine. |
I have zero experience with GCC. I can probably make it work with Apple clang and LLVM clang if the |
Why shall the |
To clarify, |
Since AppleClang introduced LLVMClang compiles and runs code with |
Yes, but only for third party projects. For the main project (Bear), I'm having a difficult time adding (experimenting with -stdlib=libc++) /removing ( I hope it would be welcome if we trade-off the ease of a single |
I'm not sure if the external project is the biggest enemy in this build. :) What is the pain point to add/remove flags in an external project? |
I didn't realise that I had to add flags, definitions in the
In the ideal world, Cmake configures once, and then we get straight to the C++ code. |
https://pasteall.org/b1O2/slim This is what got me over all the linking errors. Though I admit I had to issue a
Do you happen to know why ? |
There you need to list all targets (not only And also look for the |
@z-aki what is the trick to downgrade the abseil dependency? Can you pass what command to run for that? (I would like to see the build passing on CI again.) |
About the external project... I'm not using XCode, but CLion. And instead of opening the project If you can't have all dependencies from packages, but the parent project has to build it, then you need to pass a few flags in the settings. I am not saying this is ideal, but might help to work with the current CMake setup. |
If that doesn't work right away, download the abseil tarball from an old brew formula (ruby file of abseil) and put it in Cellar/abseil/ and run the switch again. I think better fix would be to remove the link flag using Cmake if that library is now merged in some other flag. I decided to drop the idea of removing subproject for Bear reluctantly. It's a bigger change, connected with tests and stuff. Here's a probable filesystem fix: https://pasteall.org/UHVa/slim I'll open a PR once I test a few things. |
Hmm, didn't think of that. Thanks. Changing the source dir is better. I get some false positives by
Anyway, pull request here: #334 |
Thanks @z-aki for your time and efforts. I did the rewrite (of Bear) mostly to satisfy macOS users. (The concept of using compiler wrappers were to address the macOS static To my best understanding the current problems with this platform are:
|
Describe the bug
Since the "build after push" workflow uses this hack, it makes sense to add something that works for macOS users to the build docs.
echo "PKG_CONFIG_PATH=$(brew --prefix)/opt/[email protected]/lib/pkgconfig" >> $GITHUB_ENV
I saw that
pkg_check_modules
is being used for finding grpc. If CMake's modules were used, I could specifyOPENSSL_ROOT_DIR
and make it work.To Reproduce
Run
cmake -DENABLE_UNIT_TESTS=OFF -DENABLE_FUNC_TESTS=OFF ../Bear/
And see
Expected behavior
Find the keg only OpenSSL using some environment variable or cmake variable.
Environment:
The text was updated successfully, but these errors were encountered: