M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Flint 3.0.0 build issue

Open jmcdonough98 opened this issue 1 year ago • 9 comments

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?

jmcdonough98 avatar Nov 22 '23 19:11 jmcdonough98

What's the fix? (Including "fmpz.h" doesn't work.)

feynhat avatar Dec 05 '23 20:12 feynhat

Building the development branch should work. (git checkout development after cloning)

d-torrance avatar Dec 05 '23 20:12 d-torrance

Yeah thanks. I was building 1.22. Dev branch is building fine (so far).

feynhat avatar Dec 05 '23 21:12 feynhat

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.?

ghbrown avatar Feb 21 '24 22:02 ghbrown

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.

d-torrance avatar Feb 22 '24 02:02 d-torrance

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!

ghbrown avatar Feb 22 '24 16:02 ghbrown

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.

d-torrance avatar Feb 22 '24 19:02 d-torrance

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());
              ^~~~~~~~~~~~~~~~

mahrud avatar Mar 04 '24 23:03 mahrud

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.

d-torrance avatar Mar 05 '24 00:03 d-torrance

This was fixed in #2973 and #3152.

d-torrance avatar Aug 02 '24 12:08 d-torrance