M2
M2 copied to clipboard
Flint 3.0.0 build issue
Attempting to build the latest release version on Arch fails at NCAlgebras:
CXX NCAlgebras/NCF4.cpp
In file included from ./aring-translate.hpp:16,
from ./aring-glue.hpp:7,
from ./VectorArithmetic.hpp:9,
from ./NCAlgebras/NCF4.hpp:14,
from NCAlgebras/NCF4.cpp:1:
./aring-zz-flint.hpp: In member function ‘unsigned int M2::ARingZZ::computeHashValue(const ElementType&) const’:
./aring-zz-flint.hpp:46:38: error: ‘fmpz_get_ui’ was not declared in this scope; did you mean ‘mpz_get_ui’?
46 | return static_cast<unsigned int>(fmpz_get_ui(&a));
| ^~~~~~~~~~~
| mpz_get_ui
This is the same issue as #2972. I was able to successfully build the development branch, but would it be possible to push this fix to master?
What's the fix? (Including "fmpz.h" doesn't work.)
Building the development
branch should work. (git checkout development
after cloning)
Yeah thanks. I was building 1.22. Dev branch is building fine (so far).
I ran into this problem (and #2849) when building from source via make
on Arch Linux according to the instructions in INSTALL
, which recommend changing to the latest release branch (release-1.22-branch
for me).
Is there something that can be done to ensure the instructions in INSTALL
result in a successful build? The fact that the "official" instructions result in a failed build seems problematic. Perhaps a new release, a general warning to try development
in INSTALL, etc.?
I just proposed a couple changes to INSTALL
hopefully clarifying things a bit -- see #3141.
The problem with building at the release-*
tags is that they may have been created before newer versions of some dependencies may have been released. That's the problem here. FLINT 3 was released this fall, months after M2 1.22 was released. M2 1.23 (which should be released soon) will be the first release to support FLINT 3, and building at any release-*
tags on a system with FLINT 3 will definitely fail.
The problem with building at the release-* tags is that they may have been created before newer versions of some dependencies may have been released.
Right. Perhaps one could try checking the versions of said dependencies before starting the build? I suppose this comes with its own problems, like "failed" builds when newer versions of dependencies would actually build successfully.
Just food for thought, but for now the edits to the instructions are very helpful, thanks!
Yeah, I'd be very hesitant to require older versions of dependencies. Usually, newer versions are backwards compatible. FLINT 3 was a relatively rare exception.
M2 doesn't compile with most recent version of flint:
/tmp/macaulay2-20240304-13320-pqsrxl/M2-release-1.23-rc1/M2/Macaulay2/e/mat-linalg.hpp:867:15: fatal error: no matching function for call to 'fq_nmod_mat_rref'
long rank = fq_nmod_mat_rref(A1.fq_nmod_mat(), A.ring().flintContext());
^~~~~~~~~~~~~~~~
I'm assuming that doing the same thing that factory did (https://github.com/Singular/Singular/pull/1209) would work. The fix should probably go in before the release.
This was fixed in #2973 and #3152.