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

Minor tweaks to fix setup on macOS #107

Merged
merged 4 commits into from
Mar 17, 2023
Merged

Conversation

All-less
Copy link
Contributor

@All-less All-less commented Mar 2, 2023

References

None.

Description

Hey there, I've added several tweaks to fix errors when building clp-core on macOS.

Validation performed

Tested on macOS.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@@ -130,7 +130,13 @@ else()
endif()

# Find and setup msgpack
find_package(msgpackc-cxx 5.0.0 REQUIRED)
if(APPLE)
execute_process(COMMAND brew --prefix msgpack-cxx OUTPUT_VARIABLE PREFIX_MSGPACK_CXX)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

msgpack-cxx installed through brew does not come with the pkg-config file, so it cannot be automatically detected.

Copy link
Member

Choose a reason for hiding this comment

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

Based on our offline discussion, do you think this is necessary if we add msgpack to our macOS dependencies?

Copy link
Contributor Author

@All-less All-less Mar 8, 2023

Choose a reason for hiding this comment

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

I've done a bit of searching and it seems like a name mix-up on the msgpack side (msgpack#974). They are aware of the issue and they are actively fixing it (see msgpack#1043, only closed last week). They released the fix in a higher version, i.e., 6.0.0. But unfortunately, msgpack-cxx v6.0.0 still does not have a .pc file.

Therefore, I would recommend brew --prefix approach for now instead of the error-prone co-existence of both c and cxx library.

string(STRIP "${PREFIX_MSGPACK_CXX}" PREFIX_MSGPACK_CXX)
endif()
find_package(msgpackc-cxx 5.0.0 REQUIRED
HINTS ${PREFIX_MSGPACK_CXX}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For other systems, PREFIX_MSGPACK_CXX would just be blank, which will not harm the search process.

@kirkrodrigues kirkrodrigues self-requested a review March 4, 2023 01:15
@@ -130,7 +130,13 @@ else()
endif()

# Find and setup msgpack
find_package(msgpackc-cxx 5.0.0 REQUIRED)
if(APPLE)
execute_process(COMMAND brew --prefix msgpack-cxx OUTPUT_VARIABLE PREFIX_MSGPACK_CXX)
Copy link
Member

Choose a reason for hiding this comment

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

Based on our offline discussion, do you think this is necessary if we add msgpack to our macOS dependencies?

All-less added 2 commits March 8, 2023 12:01

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@kirkrodrigues kirkrodrigues merged commit 3ad6a10 into y-scope:main Mar 17, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants