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

fix(macos): fix boost on macos #2733

Merged
merged 4 commits into from
Jun 21, 2024

Conversation

Hazer
Copy link
Member

@Hazer Hazer commented Jun 20, 2024

Description

macOS has some issues with Boost linking, this PR fixes the runtime error when statically linking boost, fixes the dynamic macOS build missing -licudata (icu4c) and improves brew installation options.

Checklist

  • Test macports installation
  • Test brew installation
  • Test Clion build and run

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

cmake/compile_definitions/common.cmake Outdated Show resolved Hide resolved
cmake/compile_definitions/macos.cmake Outdated Show resolved Hide resolved
packaging/sunshine.rb Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 8.89%. Comparing base (acd9ae6) to head (94afcef).
Report is 139 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #2733      +/-   ##
=========================================
- Coverage    8.96%   8.89%   -0.08%     
=========================================
  Files          94      94              
  Lines       17392   17385       -7     
  Branches     8270    8270              
=========================================
- Hits         1560    1546      -14     
- Misses      12967   12973       +6     
- Partials     2865    2866       +1     
Flag Coverage Δ
Linux 6.79% <ø> (ø)
Windows 4.16% <ø> (ø)
macOS-12 ?
macOS-13 ?
macOS-14 10.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 4 files with indirect coverage changes

@Hazer Hazer force-pushed the fix/macos-runtime-error branch from 68333dc to 0c67e74 Compare June 20, 2024 03:30
@Hazer Hazer requested a review from ReenigneArcher June 20, 2024 03:35
Comment on lines +18 to +22
if(APPLE)
option(BOOST_USE_STATIC "Use static boost libraries." OFF)
else()
option(BOOST_USE_STATIC "Use static boost libraries." ON)
endif()
Copy link
Member

Choose a reason for hiding this comment

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

Are you still getting issues with BOOST_USE_STATIC=ON? If not we should revert this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Without manually setting icu path, it won't build with ON, so to make easier to build locally for development, I think OFF is a good default for Clion starting setup. We could let be ON by default, but then we need to update the build docs with a step to set icu path and flags manually.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I'm fine with it as is if we must.

Before we have different defaults though, could you investigate finding the icu path with CMake functions, such as find_package?

Copy link
Member Author

@Hazer Hazer Jun 21, 2024

Choose a reason for hiding this comment

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

I've tried a bit, but had no success, as icu4c is a keg-only formula, it's not widely available in the system, I plan on finding a way to do that, but I'd rather fix the build first for most users, then improve it, since I don't know how long it will take me to do it and I won't be able to build the project for a few weeks, starting today.

cmake/compile_definitions/common.cmake Outdated Show resolved Hide resolved
@ReenigneArcher ReenigneArcher force-pushed the fix/macos-runtime-error branch from 6319441 to 94afcef Compare June 21, 2024 17:33
@ReenigneArcher ReenigneArcher enabled auto-merge (squash) June 21, 2024 17:38
@ReenigneArcher ReenigneArcher merged commit 13f94f1 into LizardByte:master Jun 21, 2024
49 checks passed
@Hazer Hazer deleted the fix/macos-runtime-error branch June 27, 2024 00:36
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Oct 9, 2024
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.

2 participants