-
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
Multiple Issues when Building from Scratch #1257
Comments
These two are related. The choice of gmp vs mpir is up to the person building it. I don't think it's any more unpleasant than having two build systems. The install guide tells you how to switch if you would like. On some systems, using the installed googletest lead to issues. I can look into it again, but it's a low priority for me since googletest is very small and I'm more interested in switching to catch2 instead.
Until a couple of months ago they were working on releasing 2.5.3, then they switched to 2.6.0. CMake build already switched to 2.6.0, see #1242 for autotools build.
What fails exactly? Have you tried the docker builds in
I'd like this to be the case, but unfortunately the system can't handle not having gfan at the moment. See #1201.
Binary means the executable. Core means the barebone Macaulay2 top level (i.e. without packages). You need M2-binary to even parse the barebones top level scripts. In Julia they call this "Base" instead of "Core", probably the same for any other interpreted language.
I used to agree, but I think it's natural for a project to develop at least one solid editor interface, then the community can add support for their editors of choice (vim, vscode, and atom support already exist). It's just convenience. In #1255 I'm trying to make this more democratic so you can write grammar files for other editors easily.
Hmm, maybe make a new issue on this. I've confirmed that this works at least on Catalina. |
thanks for the response and clarification, @mahrud!
|
If the build systems did the exact same thing, what would be the point of having two?
Don't take my word for it. Feel free to send a PR :)
The CMake build does inform the user of this :)
And if they're incompatible (which happens when linking two libraries that are linked with different MP libraries), you get to see which libraries will be built one or two lines after that.
I didn't invent the names "core" or "binary". The content of
Looks like 4ti2 and normaliz failed on Catalina (search for "failed" in the logs), but on Ubuntu M2 built okay and got a segmentation fault .. I'm guessing it's because the workflow doesn't install the correct libraries (e.g. openblas is missing). See INSTALL-CMake.md :) I would suggest trying to get |
OK, I really don't want to spend too much time in coffee-table conversations, but
I'll take care of the carbon footprint :) of the actions scripts and resubmit. |
That should be fixed. And the same versions of everything should be used.
The autotools build uses a recent flint snapshot, and will soon be updated to 2.6.0, as mentioned in #1242
No. Would you find one useful? |
Sorry for the confusion, I meant OpenBLAS is missing on Ubuntu. On mac we always use Accelerate (though it may not be the best idea).
That wasn't my goal from the beginning. The goal was to produce a better build system. Plenty of build options for both M2 and libraries and programs are improved. Build processes for some libraries are very different. As I mentioned, the prerequisites are different as well. For instance, the reason Normaliz is failing on Catalina currently is that I want to get Normaliz properly linked with OpenMP. If that means the build fails for now, that's okay, I'll fix it. But the end results will not be the same either way.
That message is a guarantee that you won't get a linking conflict and the headache goes with it. As I said, mpfr and ntl are rebuilt because I forced them to be rebuilt with mpir. If you disable that in |
My advice is to make sure the build system works first and replicates what the This issue is about the 3 points below. If you (@mahrud @DanGrayson @mikestillman) disagree, just close the ticket. It's easy as that.
Ignore my other comments — they are minor and I wouldn't have mentioned them if the build succeeded. |
As far as I can tell from the last build, currently all ubuntu builds succeed and only the mac ones fail due to an error in When you fix it, be sure to pull from the
That's tracked in a separate issue (#1243).
This already exists. For instance:
Or in the event that there's a conflict you'll see a message like this:
And later you'll see:
Printing exactly which libraries have conflicts is not easy, but in my experience libraries linking with |
You're looking at the latest build off my I am going to wait for your patch to make it to M2's |
Looks like Also, I think it would be good to set the |
The problem with setting |
@mahrud, I get the exact same ( |
@radoslavraynov Can you send me (or place here) the contents of the .errors file that shows the failure? |
Hmm, @radoslavraynov when you say "building from scratch locally", what do you mean exactly? I still can't replicate it on either Catalina or Ubuntu. It looks like the virtual environment is missing some directories, but I can't tell what exactly:
and
But then it sometimes exists, in other examples .. I'm rather confused. |
What do you think I mean? :) |
When you find an error, it's useful to provide more information so others can reproduce it; e.g. what brew packages you had installed, what compiler you used, or anything else that makes your build special. |
Are you building in a virtual machine? docker image? os? gcc version? I'll look at this: perhaps somehow the package is deleting the directory by accident? Seems unlikely, but so is that error message! |
@mikestillman I don't think anything makes my setup special. It's — again — a several days-old installation of Catalina with @mahrud, to be fair, you haven't been able to reproduce any of the other build failures so far, so why should this be any different? In fact, I set up the Actions job precisely because you countered me with "It works for me." |
@radoslavraynov I reproduced and fixed both the 4ti2 and normaliz issues, thanks to your Actions workflow, so I don't think that's fair at all. |
@mahrud, It's just an expression :D I don't think "fair" or "unfair" are at all relevant in the context of building Macaulay2. |
could it be just a permissions issue? |
@mikestillman I got a similar error from Normaliz locally:
I'm not sure why it happened, and on a second run it didn't fail again, but it makes me wonder if this is an issue with two packages creating the same temporary directory, then one of them deleting it and breaking the other package. In other words, a bug with installing packages in parallel. |
The temporary filenames we create contain the pid, so two M2 processes aren't using the same one:
|
Well, something is definitely going wrong, because I was able to reproduce the error with:
Aha! Found it: afda220 cc: @d-torrance |
Reverting that commit fixed the issue locally. I'll make a PR to see if it makes github happy 👯♂️ |
See Macaulay2#1257 (comment) This reverts commit afda220.
Yikes! That commit was merely to remove some build paths that were appearing in the documentation. As I was working on it, I wondered if there was a reason we were doing everything in a temporary directory, and it appears that there is! I definitely didn't want to break anything, so revert away! I'm currently working on replacing the canned examples that were included in that same PR, and when that's complete, it should be able to solve the same problem that afda220 was trying to solve. |
@d-torrance no worries, and thanks for taking care of finding a different way! |
For the record, I prefer using the build directory (or the |
great, thanks @mahrud! |
What is left in this issue? |
@mahrud, here's another issue I ran into. The
Running |
Why is it bad? It's only making sure that the submodules are checked out at the specified commit hash. If you rerun cmake it won't change it again.
This is, in fact, exactly what CMake does for you: M2/M2/cmake/build-libraries.cmake Lines 113 to 124 in 9358203
I don't know how this error occurred:
Could you elaborate a bit? Did you have the repository open in gitk or git-gui or something like that? I prefer CMake taking care of this to be honest, so unless it's causing widespread issues or making development harder, you can try passing in |
It's up to you, obviously, and but I personally prefer once I check out some code for it to remain static I don't know how exactly the error occurred — and tbh didn't spend much time on it. I tried
Now any and all building fails with the above error, with or without that submodule hash change. But that's fine — just wanted to flag it here in case it happens again. I won't be online for the next few days, so don't wait for my input on closing this, etc. |
The reason I added it there was precisely to make switching from one branch
to another easier, so I didn't need to update the submodules after every
branch change.
If it's currently failing, can you give me the output of `git status --
M2/submodules`? Is any content inside the submodules changed?
In general, I prefer issues with specific goals rather than open ended
ones, so I'll close this for now, but please open new issues as they arise.
…On Wed, Jun 17, 2020 at 3:15 PM Radoslav Raynov ***@***.***> wrote:
It's up to you, obviously, and but I personally prefer once I check out
some code for it to remain static git-wise.
I don't know how exactly the error occurred — and tbh didn't spend much
time on it. I tried git submodule update --init --recursive, it didn't
work, so I just commented out the problematic block. The issue must have
occurred roughly like so:
1. working on branch A; git status is clean
2. switch to branch pr/actions tracking upstream/development; git pull
3. make changes; git push
4. git checkout A; notice a change in the submodules hashes and
naively ignore it :D
Now any and all building fails with the above error, with or without that
submodule hash change. But that's fine — just wanted to flag it here in
case it happens again.
I won't be online for the next few days, so don't wait for my input on
closing this, etc.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1257 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYAPRWJ6GF2ZKLJMQTUAGTRXEP67ANCNFSM4NZ4EHHQ>
.
|
It should be possible to make it static by setting an option. For the autotools build system, I skip the submodule update if We handle downloads the other way: we download tarfiles only with the user's permission. Maybe opting out is not enough and we should reconcile these two approaches: experienced computer users don't like it when build system download files from the internet without permission! |
@DanGrayson if you read my comment above you would see:
Or if you take a look under build flags in INSTALL-CMake.md you would find:
As I've said before, there are differences between the build systems. I've designed the CMake system with many factors in mind, and unless there is a bug that is causing an issue for you I'm against changing it. If there's any issues left with building from scratch, please mention them, otherwise please close this issue. |
I am creating this ticket to track multiple issues I have had building Macaulay2 from source. Having pushed the GitHub actions PR #1256, one finally has a way to demonstrate those issues. Most but not all have to do with the
cmake
build. All are onmacOS
. Thanks in advance!cc @mahrud, @DanGrayson
In no particular order,
googletest
,mpfr
,ntl
. Previously, the same thing was happening even formpir
.autotools
build usesGMP
by default, while thecmake
one usesmpir
. This introduces an unpleasant inconsistency.Flint
's required version2.5.3
looks off. Its website lists versions2.5.2
and2.6.0
. If that's a hack to use a patched variant, another approach is needed.build-programs
has never succeeded for me. It doesn't succeed on github actions either.build-programs
or letting it fail should be OK for a very capable M2 binary, so that's what I did.)M2-core
afterM2-binary
, but that's a personal preference. The way I look at it,M2-core
should refer to a core part andM2-binary
to the end product.M2-emacs
is the default target. In my experience, one should make a software system as modular as possible or useful, (but not more), and systems where logically independent components are too entangled together are never well designed. My view is that Emacs is a front-end and should be kept as one.M2-core
(andM2-binary
), my interactive shell is missing history. For example, ⬆️ (up-key) doesn't bring back anything. I am guessingreadline
is not linked properly. In fact,otool -L M2-binary
does not listreadline
.gmake
step in theautotools
builds a whole lot. Is there a target that only builds the binary without performing any package installations and tests?Thanks! I am pasting my
cmake
configuration output for reference.The text was updated successfully, but these errors were encountered: