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

Updates to the Meson build to fix portability issues and warnings #1737

Merged
merged 7 commits into from Apr 27, 2024

Conversation

rgommers
Copy link
Contributor

Each commit has a commit message with more context. This reduces the build warnings to a small amount, only the ones that may need inspection or are perhaps better fixed rather than silenced (things like -Wunused-variable are safe to silence though).

The changes to compiler flag handling are necessary for portability. The symbol visibility one avoids re-exporting ~2,000 private symbols in the shared libraries that link against a static libhighs.a. It also reduced binary size, by ~300 kb on macOS in a release build.

@jajhall jajhall changed the base branch from master to latest April 26, 2024 19:59
@jajhall jajhall requested a review from galabovaa April 26, 2024 20:00
@rgommers
Copy link
Contributor Author

Argh, missed that PRs are not supposed to go to the default branch. Closing - will rebase and resubmit.

@rgommers rgommers closed this Apr 26, 2024
@rgommers rgommers reopened this Apr 26, 2024
@rgommers
Copy link
Contributor Author

And then that you already re-targeted, thanks @jajhall. Let me retest locally and fix the merge conflict.

C is a required language it looks like, so just declare it normally
in the `project()` call.

The warning was:
```
meson.build:16: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.
```

Also clean up a stylistic issue and wrong comments for the threads
dependency - it is no longer required.
There was only one entry in `_linkto`, namely `highslib`. So the
extra variable was not needed, removing it makes it clearer what
is actually happening.
This is both safer and reduces the binary size of the Python extension
modules that link against `libhighs.a`.
The hardcoding may not work, and the flags were not used on any platform
other than Linux. This caused a lot of warnings when building on macOS.
@jajhall
Copy link
Sponsor Member

jajhall commented Apr 26, 2024

Rather a lot of CI failures: are they expected @galabovaa ?

@rgommers
Copy link
Contributor Author

The reason CI jobs on macOS are failing is because the macos-latest runner image changed from macOS 12 (x86-64) to macOS 14 (arm64) in the last couple of days. This is probably best addressed in a separate PR. Changing from macos-latest to macos-13 is perhaps the easiest short-term fix?

@galabovaa
Copy link
Contributor

Looks good to me, particularly since the changes only affect meson build code. The failures are due to different iteration counts on macOS arm64 and are not concerning. I can look at those if they still appear once this is merged in latest.

@jajhall jajhall merged commit 27b1fee into ERGO-Code:latest Apr 27, 2024
82 of 92 checks passed
@rgommers rgommers deleted the meson-fixes branch April 28, 2024 08:59
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

3 participants