Build failure on MacOS Sequoia 15.1.1 due to GMP

88 views
Skip to first unread message

Giacomo Pope

unread,
Dec 2, 2024, 5:44:46 PM12/2/24
to sage-devel
Workflow:

```
Jack: sage % source ./.homebrew-build-env  
Jack: sage % make configure
...
Jack: sage % ./configure
...
-----------------------------------------------------------------------------
Checking whether SageMath should install SPKG gmp...
checking for gmp.h... no
checking for gmpxx.h... no
checking if version of GMP is greater than 6.2.1... no
checking for library containing __gmpn_gcd_11... -lgmp
configure: no suitable system package found for SPKG gmp
-----------------------------------------------------------------------------
...
```

Just to double check, we can ensure that brew has what we want:

```
Jack: sage % brew search gmp
==> Formulae
gmp ✔            gmt              gvp              gpp              xmp              emp              amp

==> Casks
gimp
```

and my git log:

```
Jack: sage % git log
commit bf16199c92824caf46197468bea60f7d68f0809c (HEAD -> develop, tag: 10.5.rc2, upstream/develop, upstream/HEAD)
Author: Release Manager <rel...@sagemath.org>
Date:   Sat Nov 30 11:15:58 2024 +0100

    Updated SageMath version to 10.5.rc2

commit 68f446ad3f1abcea6e1a9b679a04242597f439f6
Merge: cb6ca569c15 7ce18777a7e
```

any ideas why it's not detecting brew installations?
config.log

Dima Pasechnik

unread,
Dec 2, 2024, 6:25:54 PM12/2/24
to sage-...@googlegroups.com
What does

brew install gmp

say?

When have you last updated Homebrew?

Also, the config.log you posted looks incomplete and weird...

Dima Pasechnik

unread,
Dec 2, 2024, 6:25:59 PM12/2/24
to sage-...@googlegroups.com, Giacomo Pope
Also, can you run

./bootstrap

instead of "make configure" ?


Giacomo Pope

unread,
Dec 3, 2024, 5:15:14 AM12/3/24
to sage-devel
Running brew install gmp:

Jack: sage % brew install gmp
Warning: gmp 6.3.0 is already installed and up-to-date.
To reinstall 6.3.0, run:
  brew reinstall gmp

I ran brew update and brew upgrade yesterday before attempting to install sage

Jack: sage % brew update
==> Updating Homebrew...
Updated 1 tap (homebrew/services).
No changes to formulae or casks.

Here's a new config log file after building with ./bootstrap instead of make configure (the same error occurs).

p.s.

Running find, I can see the gmp.h file:

Jack: sage % find /usr /opt -name "gmp.h"                                                
/usr/local/include/gmp.h
/usr/local/Cellar/gmp/6.3.0/include/gmp.h
config.log

Dima Pasechnik

unread,
Dec 3, 2024, 12:17:03 PM12/3/24
to sage-...@googlegroups.com, Giacomo Pope
On Tue, Dec 3, 2024 at 4:15 AM Giacomo Pope <giaco...@gmail.com> wrote:
>
> Running brew install gmp:
>
> Jack: sage % brew install gmp
> Warning: gmp 6.3.0 is already installed and up-to-date.
> To reinstall 6.3.0, run:
> brew reinstall gmp
>
> I ran brew update and brew upgrade yesterday before attempting to install sage
>
> Jack: sage % brew update
> ==> Updating Homebrew...
> Updated 1 tap (homebrew/services).
> No changes to formulae or casks.
>
> Here's a new config log file after building with ./bootstrap instead of make configure (the same error occurs).
>
> p.s.
>
> Running find, I can see the gmp.h file:
>
> Jack: sage % find /usr /opt -name "gmp.h"
> /usr/local/include/gmp.h
> /usr/local/Cellar/gmp/6.3.0/include/gmp.h

The 1st should be a link to the 2nd one. What's the output of

ls -l /usr/local/include/gmp.h
ls -l /usr/local/Cellar/gmp/6.3.0/include/gmp.h

(Homebrew does weird things if it finds already installed stuff in
/usr/local...)

Anyhow, your log shows that your C++ toolchain is broken.
I don't understand why it still passed C++ tests as OK.
What happens if you create a one-line file named x.cpp, containing just

#include <iosfwd>

and then run

clang++ -c x.cpp

You should get an error, it's basically also the error shown in the config.log
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/3118c678-58ca-43a2-93dd-bb39dd973b83n%40googlegroups.com.

Giacomo Pope

unread,
Dec 3, 2024, 12:21:46 PM12/3/24
to sage-devel
Thank you for your help, Dima.

For the first thing you are right:

Jack: ~ % ls -l /usr/local/include/gmp.h
lrwxr-xr-x  1 Jack  admin  33  2 Dec 19:47 /usr/local/include/gmp.h@ -> ../Cellar/gmp/6.3.0/include/gmp.h
Jack: ~ % ls -l /usr/local/Cellar/gmp/6.3.0/include/gmp.h
-rw-r--r--  1 Jack  admin  84307 29 Jul  2023 /usr/local/Cellar/gmp/6.3.0/include/gmp.h

Secondly, you are also right

Jack: test % clang++ -c x.cpp  
x.cpp:1:10: fatal error: 'iosfwd' file not found
    1 | #include <iosfwd>
      |          ^~~~~~~~
1 error generated.

Now I'm just not sure how to fix this, but I guess this is going a little too far away from Sage for it to be your problem! I'll see if I can fix this

Dima Pasechnik

unread,
Dec 3, 2024, 12:54:09 PM12/3/24
to sage-...@googlegroups.com, Giacomo Pope
On Tue, Dec 3, 2024 at 11:21 AM Giacomo Pope <giaco...@gmail.com> wrote:
>
> Thank you for your help, Dima.
>
> For the first thing you are right:
>
> Jack: ~ % ls -l /usr/local/include/gmp.h
> lrwxr-xr-x 1 Jack admin 33 2 Dec 19:47 /usr/local/include/gmp.h@ -> ../Cellar/gmp/6.3.0/include/gmp.h
> Jack: ~ % ls -l /usr/local/Cellar/gmp/6.3.0/include/gmp.h
> -rw-r--r-- 1 Jack admin 84307 29 Jul 2023 /usr/local/Cellar/gmp/6.3.0/include/gmp.h
>
> Secondly, you are also right
>
> Jack: test % clang++ -c x.cpp
> x.cpp:1:10: fatal error: 'iosfwd' file not found
> 1 | #include <iosfwd>
> | ^~~~~~~~
> 1 error generated.
>
> Now I'm just not sure how to fix this, but I guess this is going a little too far away from Sage for it to be your problem! I'll see if I can fix this

re-install XCode and/or XCode command line tools, I suppose.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/3112a4f5-0842-410a-b10d-c0c9a0660d10n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages