MacOS build Sage libcurl error for R

110 views
Skip to first unread message

Emily R

unread,
Jun 2, 2019, 3:30:07 PM6/2/19
to sage-devel
Hi, I am having trouble installing Sage 8.7. I am running MacOS 10.12.6. I think this is the problem section.

[r-3.6.0] checking for curl-config... /Users/Emily/anaconda3/bin/curl-config
[r-3.6.0] checking libcurl version ... 7.60.0
[r-3.6.0] checking curl/curl.h usability... yes
[r-3.6.0] checking curl/curl.h presence... yes
[r-3.6.0] checking for curl/curl.h... yes
[r-3.6.0] checking if libcurl is version 7 and >= 7.22.0... no
[r-3.6.0] configure: error: libcurl >= 7.22.0 library and headers are required
[r-3.6.0] Error configuring R.

I found a similar problem https://groups.google.com/forum/#!msg/sage-devel/aOK-ZtyH_Z8/hvcR1LXwCgAJ which recommends deactivating anaconda, but I am not sure how to do this. Any help would be appreciated.

Dima Pasechnik

unread,
Jun 2, 2019, 3:41:27 PM6/2/19
to sage-devel
Probably it suffices to make sure that your PATH does not contain
anything that starts with
/Users/Emily/anaconda3/

In principle your PATH only needs to contain
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

That is,
before starting to build Sage, do

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Hopefully you can run this command and then run make, and everything will be OK
else you'd need to start from scratch, i.e. run "make distclean"
as Anaconda could have gotten into other Sage places it should not.

HTH.

One day we shoud make it possible to build Sage under Anaconda...






> Any help would be appreciated.
>
> --
> 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 post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/f285dddb-2418-444a-bdcd-061821a23edc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

darwin doppelganger

unread,
Jun 2, 2019, 5:45:44 PM6/2/19
to sage-devel
I responded to a similar posting with a link to directions for removing anaconda. It seems to have worked just fine, but Dima's suggestion sounds easier.

E. Madison Bray

unread,
Jun 3, 2019, 2:20:39 AM6/3/19
to sage-devel
On Sun, Jun 2, 2019 at 11:46 PM darwin doppelganger <dan...@gmail.com> wrote:
>
> I responded to a similar posting with a link to directions for removing anaconda. It seems to have worked just fine, but Dima's suggestion sounds easier.

One thing I've noticed a lot of Anaconda users don't realize or
understand, especially on OSX, is that when you install Anaconda it
gives you the option (enabled by default I think), to automatically
add Anaconda's bin/ to their PATH. It does this by actually editing
their .profile (I believe) and adding some lines to manipulate the
PATH. Most people when they install Anaconda don't realize it's doing
this.

I have no problem with that in principle, as it's certainly a
convenience if you plan on making Anaconda your primary Python
distribution. But I feel like more of than not it creates confusion,
as users often have multiple Python distributions (including Homebrew)
on their systems and get confused about which one the should be using.
This extends beyond Python too, now that Anaconda has become a more
generic packaging solution.

I think the key here is not "remove Anaconda" itself, but just not
allow it to add itself to your PATH if you don't plan on using it
every day, and instead only manually activate the Anaconda environment
when you do explicitly plan to use it.

Samuel Lelievre

unread,
Jun 3, 2019, 1:15:28 PM6/3/19
to sage-devel

Mon 2019-06-01 06:20:39 UTC, E. Madison Bray:
>
> On Sun, Jun 2, 2019 at 11:46 PM darwin doppelganger:

> >
> > I responded to a similar posting with a link to directions
> > for removing anaconda. It seems to have worked just fine,
> > but Dima's suggestion sounds easier.
>
> One thing I've noticed a lot of Anaconda users don't realize or
> understand, especially on OSX, is that when you install Anaconda it
> gives you the option (enabled by default I think), to automatically
> add Anaconda's bin/ to their PATH.  It does this by actually editing
> their .profile (I believe)

It edits people's ~/.bash_profile adding a line to tweak the PATH
by *prepending* Anaconda to it.

 
> and adding some lines to manipulate the
> PATH.  Most people when they install Anaconda don't realize it's doing
> this.
>
> I have no problem with that in principle, as it's certainly a
> convenience if you plan on making Anaconda your primary Python
> distribution.  But I feel like more of than not it creates confusion,
> as users often have multiple Python distributions (including Homebrew)
> on their systems and get confused about which one the should be using.
> This extends beyond Python too, now that Anaconda has become a more
> generic packaging solution.
>
> I think the key here is not "remove Anaconda" itself, but just not
> allow it to add itself to your PATH if you don't plan on using it
> every day, and instead only manually activate the Anaconda environment
> when you do explicitly plan to use it.

Would it make sense to mitigate this frequent source of problems
for Sage users by detecting the presence of Anaconda and issuing
a helpful message indicating Anaconda was detected and it being
in the PATH is likely to prevent sage from running or from building,
and offering hints on how to undo Anaconda's PATH-tweaking?

I opened a ticket for that but I'm not sure how that would go exactly:

- Sage Trac ticket 27699: Detect Anaconda
  https://trac.sagemath.org/ticket/27699

darwin doppelganger

unread,
Jun 3, 2019, 6:45:34 PM6/3/19
to sage-devel


On Monday, June 3, 2019 at 12:15:28 PM UTC-5, Samuel Lelievre wrote: 
...

Would it make sense to mitigate this frequent source of problems
for Sage users by detecting the presence of Anaconda and issuing
a helpful message indicating Anaconda was detected and it being
in the PATH is likely to prevent sage from running or from building,
and offering hints on how to undo Anaconda's PATH-tweaking?

I opened a ticket for that but I'm not sure how that would go exactly:

- Sage Trac ticket 27699: Detect Anaconda
  https://trac.sagemath.org/ticket/27699

The real problem here is not anaconda, per se, but some code in the Sage build script that tests for a current version of libcurl. The version here is 7.60.0, but somehow it fails the test for version >= 7.22.0:

[r-3.6.0] checking for curl-config... /Users/Emily/anaconda3/bin/curl-config
[r-3.6.0] checking libcurl version ... 7.60.0
[r-3.6.0] checking curl/curl.h usability... yes
[r-3.6.0] checking curl/curl.h presence... yes
[r-3.6.0] checking for curl/curl.h... yes
[r-3.6.0] checking if libcurl is version 7 and >= 7.22.0... no
[r-3.6.0] configure: error: libcurl >= 7.22.0 library and headers are required
[r-3.6.0] Error configuring R.

I don't know if this is easy to fix, or if the code is somehow automatically generated. In an earlier post, I noted that:
This only became a problem with  sage-8.8.beta1 and sage-8.8.beta2. I had earlier compiled sage-8.8.beta0 with no problems despite having anaconda installed.

By the way, why are we seeing Mac users compiling Sage for themselves rather than just downloading an executable? Is it anything to do with the double-clickable Mac application problem that appeared on Mac OSX 10.4 (Mojave)?

Samuel Lelièvre

unread,
Jun 3, 2019, 7:31:30 PM6/3/19
to Sage-devel
Mon 2019-06-03 22:45 UTC, darwin doppelganger:
>
> By the way, why are we seeing Mac users compiling Sage
> for themselves rather than just downloading an executable?
> Is it anything to do with the double-clickable Mac application
> problem that appeared on Mac OSX 10.4 (Mojave)?

One might want to compile Sage for oneself on macOS
in particular if one wants to

- get a Python 3 based Sage
- install extra packages (the macOS binaries don't ship openssl
so they don't allow "sage --pip install package_name" out of the
box, one first needs to "sage -i openssl" and "sage -f python2"
and "sage -f python3" and "make")
- get involved in SageMath development

Emily R

unread,
Jun 4, 2019, 9:14:41 PM6/4/19
to sage-devel
Thanks Dima, the command worked perfectly for me.

Matthias Koeppe

unread,
Jun 6, 2019, 4:49:06 PM6/6/19
to sage-devel
I have opened https://trac.sagemath.org/ticket/27941 for this.
Reply all
Reply to author
Forward
0 new messages