Skip to content

Increase CMake build portability and improve support for FreeBSD#10724

Merged
mehrdada merged 1 commit intogrpc:masterfrom
mehrdada:freebsd-support
Apr 20, 2017
Merged

Increase CMake build portability and improve support for FreeBSD#10724
mehrdada merged 1 commit intogrpc:masterfrom
mehrdada:freebsd-support

Conversation

@mehrdada
Copy link
Copy Markdown
Contributor

@mehrdada mehrdada commented Apr 19, 2017

  • Update CMakeLists.txt (and its template) to prevent trying to link dl library on all UNIX platforms, causing build to fail on FreeBSD (or other similar platforms) where such library is non-existent. Instead, rely on the portable CMake variable ${CMAKE_DL_LIBS}.
  • On macOS, don't link against librt which is unavailable.
  • Add a config_freebsd directory containing the header file generated by the configure script for ares library.

Works toward fixing #9721

@mehrdada mehrdada requested a review from jtattermusch April 19, 2017 09:10
@mehrdada mehrdada changed the title Build support for FreeBSD Increase CMake build portability and support FreeBSD Apr 19, 2017
@grpc-kokoro
Copy link
Copy Markdown
Collaborator

No significant performance differences

3 similar comments
@grpc-kokoro
Copy link
Copy Markdown
Collaborator

No significant performance differences

@grpc-kokoro
Copy link
Copy Markdown
Collaborator

No significant performance differences

@grpc-kokoro
Copy link
Copy Markdown
Collaborator

No significant performance differences

@mehrdada mehrdada changed the title Increase CMake build portability and support FreeBSD Increase CMake build portability and improve support for FreeBSD Apr 19, 2017
Copy link
Copy Markdown
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I see some tests failing, so please doublecheck before merging.

- Update CMakeLists.txt (original template and generated code)
  to prevent forcefully linking `dl` on all UNIX platforms,
  and rely on `${CMAKE_DL_LIBS}` portable variable instead.
- Do not try linking against `librt` on macOS.
- Add a `config_freebsd` directory containing the header file
  generated by the `configure` script for the `ares` library.
@mehrdada mehrdada merged commit 79ec0ff into grpc:master Apr 20, 2017
@mehrdada
Copy link
Copy Markdown
Contributor Author

Test failures:

Basic Tests Linux: #10142
Basic Tests Mac: #10643, #10202
Basic Tests Windows: #9954
Bazel Full Build & Tests: Not yet in effect
Interop Tests: #10766
Performance Tests: #10773

@mehrdada mehrdada deleted the freebsd-support branch April 20, 2017 21:33
mitsutaka-takeda pushed a commit to mitsutaka-takeda/grpc that referenced this pull request Jun 30, 2017
Caused by errorneous cmake scripts.

This pull request fixed the issued and merged into the master.

grpc#10724
@mehrdada mehrdada mentioned this pull request Sep 1, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants