-
Notifications
You must be signed in to change notification settings - Fork 240
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
1.17 source build fails on macos #1767
Comments
If I downgrade brew flint to 2.6.0, the cmake build works until the linking of M2 step. Now I get the error (after the long line for linking M2):
This appears to be related to libboost (which also got updated to 1.75 when I did the |
The problem with flint 2.7.0 is that the new flint has a changed interface and the version of factory that we build is not yet compatible with it. We would need to build the new factory first, but given the complications that it will cause on various systems (e.g. if the flint is older than factory or factory is older than flint), it's probably just easier for you to do:
Not sure about the icudata .. why do you think it's related to boost? |
What is libicudata? I don't think I know it. |
update: with [email protected], autotools build makes it to the examples fine. The cmake build fails, since it can't find libicudata (but everything builds fine to that point, just fails at linking M2). When did we start linking with libicudata? Is it a mistake? |
Could you provide more information? The compiler or the output of the cmake maybe? |
Looked into it a bit. It's a known issue of the brew package for boost 1.75: Homebrew/homebrew-core#67615, it should be resolved soon. On my system, the packaged libboost_regex.so is dynamically linked with few libraries that deal with unicode (icu is International Components for Unicode):
In particular, they are requirements of libboost_regex. Could you run otool on your libboost_regex? Probably on your system you'd need to add the path for The reason you don't get the same issue with autotools is that it forces using static libraries, which in general isn't a good idea, as I explained in #1737. On the other hand, this means that for the short term there is an easy solution: use the same workaround as in #1737 to link with boost statically:
|
That's only if you make a dmg distribution file, which Mike is probably not doing. |
I tried this:
but get the same error (I am on appleclang 12.0.0, macos catalina):
|
Did you try installing Regardless, let's just wait for Homebrew/homebrew-core#67427 to be fixed. This is legitimately a problem with boost (see boostorg/boost_install#47), so I don't think we should do anything.
|
The only issue about waiting is I can't build M2 currently under cmake. I'll continue to look for workarounds. It appears that I cannot back off this version of boost in brew easily (well, it complained when I tried). |
I have a couple more things to try though. |
Did you try downgrading boost? I'm not sure about the command, but |
If you don't mind the compile time, you can use the patched version of boost at Homebrew/homebrew-core#67615. One way to do this might be
The You may wish to avoid unqualified That said, I've resolved the CI failure in the PR locally, so I'm hoping the patched version of boost should be on the master branch tomorrow. |
FYI, Homebrew/homebrew-core#67615 has been merged, so this should be fixed for Homebrew boost. |
Thanks very much! |
Does your build work fine now, @mikestillman? |
Yes, the cmake build on macos, using apple clang, now builds the executable correctly (with boost 1.75.0). I did have to uninstall flint on brew though, as it is a breaking change that causes factory to not compile, I believe. |
Great! I presume this issue can be closed then, since Macaulay2 is not compatible with flint 2.7.0 without a decent amount of changes, and that's for another issue. For the time being, you can pin 2.6.0:
|
Unfortunately, that method of installing it won't work, as there is no However, you can set one up in your own tap using the following:
That will build flint 2.6.3 from source. If you wish to build a bottle for it, you can have a look at https://brew.sh/2020/11/18/homebrew-tap-with-bottles-uploaded-to-github-releases/. This will allow you to build the formula from source on a GitHub runner instead.
|
Ah, I didn't realize that, but that trick is very helpful for when I get around to #1166 again. Thank you! |
Sure. In case you aren't able to get it into homebrew/core for some reason, you're also free to host your own tap for a Macaulay2 formula. That will allow you to set up formulae for your own custom dependencies (e.g. flint2.6, which isn't provided by Homebrew), but also use any dependencies already provided by Homebrew. (Caveat: relying on Homebrew for dependencies doesn't work too well if you need fine control over which version you use.) For example, you can create a repo owned by the Macaulay2 organisation called homebrew-M2 to host this tap. Then, your users can install Macaulay2 by doing
You can read the docs I linked above for instructions on how to build bottles (pre-built binaries) for your formulae. Feel free to ping me if you have any questions. |
On MacOS catalina, compiling with appleclang, I did a
brew upgrade
, and it installed flint 2.7.0. After that, a fresh autotools build failed (many errors related to fmpz...). This is on release-1.17 (with my pull request changes, but those changes are not relevant for this problem).(edit: the build failures occurred during building factory).
(edit2: same issue occurs on cmake build)
The text was updated successfully, but these errors were encountered: