ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 19 Mar 2021 00:01:11 +0100How to make Sage use OpenSSL installed in /opt/local/{bin, lib,include}https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/MacOS Catalina 10.15.7. Seemingly no way to get Sage binary to recognize installed OpenSSL (I'm not taking about the screwed-up version of LibreSSL that MacOS is coming with now).
I have Python3{7,8,9} installed in /opt/local via Macports. OpenSSL-1.1.1i installed the same way (/opt/local). Everything works fine.
How do I get Sage to **use** the packages already installed, instead of, e.g., downloading its own copy of Python?
Barring that, what do I need to download to build Sage.app from sources, so it can link with a normal OpenSSL, and maybe use a normal Python?Mon, 21 Dec 2020 03:04:33 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/Answer by slelievre for <p>MacOS Catalina 10.15.7. Seemingly no way to get Sage binary to recognize installed OpenSSL (I'm not taking about the screwed-up version of LibreSSL that MacOS is coming with now).</p>
<p>I have Python3{7,8,9} installed in /opt/local via Macports. OpenSSL-1.1.1i installed the same way (/opt/local). Everything works fine.</p>
<p>How do I get Sage to <strong>use</strong> the packages already installed, instead of, e.g., downloading its own copy of Python?</p>
<p>Barring that, what do I need to download to build Sage.app from sources, so it can link with a normal OpenSSL, and maybe use a normal Python?</p>
https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?answer=54793#post-id-54793This situation with OpenSSL is frustrating for you and for many Sage users
on macOS and the developers are equally frustrated. Things will hopefully
improve dramatically with the release of OpenSSL 3.0 which comes under
an Apache license compatible with the GPL, so that Sage will be able to
distribute it. Currently OpenSSL 3.0.0alpha9 is out... Progress on this front
is tracked on the Sage side at
- [Sage Trac ticket 29555: Upgrade: OpenSSL 3.0, make it a standard package](https://trac.sagemath.org/ticket/29555)
In the meanwhile, here are some possible ways forward.
The best is if you can fix Sage's Python in place by sticking in
the appropriate SSL capability for it using the
- [fix_mac_sage script](https://github.com/3-manifolds/fix_mac_sage/)
That script is currently provided to fix Python 3.7, which will work
with Sage 9.0 and 9.1; not yet with 9.2 which is based on Python 3.8.
Otherwise, I would either install Sage via Conda or build it from source,
and then in your existing app, rename the sage executable (allowing
to restore it later if needed), and put a symbolic link to an SSL-enabled
Sage (either installed via Conda or built from source) in its place.
To install Sage on macOS is via Conda, follow this guide:
- [Install Sage via Conda](https://doc.sagemath.org/html/en/installation/conda.html)
or make your own mix of that guide and the hints on the
- [Conda page on the Sage wiki](https://wiki.sagemath.org/Conda)
To install from source, get the sources from the
- [SageMath source download page](https://www.sagemath.org/download-source.html).
Once you have extracted the source tarball, prepare as follows:
- place the extracted folder where you want it (Sage stops
working if moved after using it, so better put it
where you want it before building; if you move Sage
afterwards, you need to build it again)
- open a terminal and change to the extracted Sage folder
Then, if you also have Homebrew, run the following:
source .homebrew-build-env
(There has been a lot of effort to make Sage use as many as possible
of Homebrew's packages to save building many components.
Not sure to what extent MacPort packages can be used.)
Decide on how many jobs to run in parallel while building, for example
to run 1, 4, 8 or 16 jobs in parallel while building, use
MAKE='make -j1'
MAKE='make -j4'
MAKE='make -j8'
MAKE='make -j16'
Then configure:
make configure
./configure
Once you have run the configure step, check in the file `config.log`
what it says on what it has decided regarding Python: build its own,
use the one from MacPorts, use a different one?
Possibly you can tell it exactly which Python to use, using something like:
./configure --with-python=...
(someone else would have to confirm).
If it looks like it is going to use the Python you want, great.
Otherwise, run configure again enabling openssl.
./configure --enable-openssl
Check in `config.log` if it detected your existing openssl;
otherwise build OpenSSL first to make sure an SSL-enabled
Python will be built.
make -s V=0 openssl
Then build the rest of Sage:
make -s V=0
-----
**Edit** to address original poster's comment after the answer above.
The Sage build system, despite all its quirks, works in a lot of situations,
which is no small feat.
Improvements have always been welcome. Along the years, tremendous effort
has gone into streamlining the build process, making it more modular,
packaging Sage for various distributions.
There was a time when the Sage build system could not handle Fink or MacPorts
or Homebrew being around; users had to tweak their PATH or rename
their `/opt/local` or `/usr/local` while building Sage.
To make life easier, the build system was made to ignore the Fink and MacPorts
directories itself. This lives on, as you found out.
Support for using Homebrew packages was added.
It would be nice to allow Sage's build system to use MacPorts
in the same way it can use Homebrew. This is tracked at:
- [Sage Trac ticket 30504: Support getting system packages from MacPorts](https://trac.sagemath.org/ticket/30504)
Contributions are welcome!
-----
### Update (2021-03-21)
There is recent progress on several fronts.
- A new SageMath macOS app, including OpenSSL, signed and notarized, is in beta testing.
- [Sage_macOS home](https://github.com/3-manifolds/Sage_macOS)
- [Sage_macOS releases](https://github.com/3-manifolds/Sage_macOS/releases)
- Building SageMath from source using installed MacPorts packages is becoming possible:
- [Sage Trac ticket 30504](https://trac.sagemath.org/ticket/30504)
was merged, adding MacPorts package information.
- [Sage Trac ticket 31505](https://trac.sagemath.org/ticket/31505)
allows building Sage using MacPorts packages. It needs review.Mon, 21 Dec 2020 06:26:41 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?answer=54793#post-id-54793Comment by slelievre for <p>This situation with OpenSSL is frustrating for you and for many Sage users
on macOS and the developers are equally frustrated. Things will hopefully
improve dramatically with the release of OpenSSL 3.0 which comes under
an Apache license compatible with the GPL, so that Sage will be able to
distribute it. Currently OpenSSL 3.0.0alpha9 is out... Progress on this front
is tracked on the Sage side at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29555">Sage Trac ticket 29555: Upgrade: OpenSSL 3.0, make it a standard package</a></li>
</ul>
<p>In the meanwhile, here are some possible ways forward.</p>
<p>The best is if you can fix Sage's Python in place by sticking in
the appropriate SSL capability for it using the</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage/">fix_mac_sage script</a></li>
</ul>
<p>That script is currently provided to fix Python 3.7, which will work
with Sage 9.0 and 9.1; not yet with 9.2 which is based on Python 3.8.</p>
<p>Otherwise, I would either install Sage via Conda or build it from source,
and then in your existing app, rename the sage executable (allowing
to restore it later if needed), and put a symbolic link to an SSL-enabled
Sage (either installed via Conda or built from source) in its place.</p>
<p>To install Sage on macOS is via Conda, follow this guide:</p>
<ul>
<li><a href="https://doc.sagemath.org/html/en/installation/conda.html">Install Sage via Conda</a></li>
</ul>
<p>or make your own mix of that guide and the hints on the</p>
<ul>
<li><a href="https://wiki.sagemath.org/Conda">Conda page on the Sage wiki</a></li>
</ul>
<p>To install from source, get the sources from the</p>
<ul>
<li><a href="https://www.sagemath.org/download-source.html">SageMath source download page</a>.</li>
</ul>
<p>Once you have extracted the source tarball, prepare as follows:</p>
<ul>
<li><p>place the extracted folder where you want it (Sage stops
working if moved after using it, so better put it
where you want it before building; if you move Sage
afterwards, you need to build it again)</p></li>
<li><p>open a terminal and change to the extracted Sage folder</p></li>
</ul>
<p>Then, if you also have Homebrew, run the following:</p>
<pre><code>source .homebrew-build-env
</code></pre>
<p>(There has been a lot of effort to make Sage use as many as possible
of Homebrew's packages to save building many components.
Not sure to what extent MacPort packages can be used.)</p>
<p>Decide on how many jobs to run in parallel while building, for example
to run 1, 4, 8 or 16 jobs in parallel while building, use</p>
<pre><code>MAKE='make -j1'
MAKE='make -j4'
MAKE='make -j8'
MAKE='make -j16'
</code></pre>
<p>Then configure:</p>
<pre><code>make configure
./configure
</code></pre>
<p>Once you have run the configure step, check in the file <code>config.log</code>
what it says on what it has decided regarding Python: build its own,
use the one from MacPorts, use a different one?</p>
<p>Possibly you can tell it exactly which Python to use, using something like:</p>
<pre><code>./configure --with-python=...
</code></pre>
<p>(someone else would have to confirm).</p>
<p>If it looks like it is going to use the Python you want, great.</p>
<p>Otherwise, run configure again enabling openssl.</p>
<pre><code>./configure --enable-openssl
</code></pre>
<p>Check in <code>config.log</code> if it detected your existing openssl;
otherwise build OpenSSL first to make sure an SSL-enabled
Python will be built.</p>
<pre><code>make -s V=0 openssl
</code></pre>
<p>Then build the rest of Sage:</p>
<pre><code>make -s V=0
</code></pre>
<hr>
<p><strong>Edit</strong> to address original poster's comment after the answer above.</p>
<p>The Sage build system, despite all its quirks, works in a lot of situations,
which is no small feat.</p>
<p>Improvements have always been welcome. Along the years, tremendous effort
has gone into streamlining the build process, making it more modular,
packaging Sage for various distributions.</p>
<p>There was a time when the Sage build system could not handle Fink or MacPorts
or Homebrew being around; users had to tweak their PATH or rename
their <code>/opt/local</code> or <code>/usr/local</code> while building Sage.</p>
<p>To make life easier, the build system was made to ignore the Fink and MacPorts
directories itself. This lives on, as you found out.</p>
<p>Support for using Homebrew packages was added.</p>
<p>It would be nice to allow Sage's build system to use MacPorts
in the same way it can use Homebrew. This is tracked at:</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504: Support getting system packages from MacPorts</a></li>
</ul>
<p>Contributions are welcome!</p>
<hr>
<h3>Update (2021-03-21)</h3>
<p>There is recent progress on several fronts.</p>
<ul>
<li>A new SageMath macOS app, including OpenSSL, signed and notarized, is in beta testing.
<ul>
<li><a href="https://github.com/3-manifolds/Sage_macOS">Sage_macOS home</a></li>
<li><a href="https://github.com/3-manifolds/Sage_macOS/releases">Sage_macOS releases</a></li>
</ul></li>
<li>Building SageMath from source using installed MacPorts packages is becoming possible:
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504</a>
was merged, adding MacPorts package information.</li>
<li><a href="https://trac.sagemath.org/ticket/31505">Sage Trac ticket 31505</a>
allows building Sage using MacPorts packages. It needs review.</li>
</ul></li>
</ul>
https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=56237#post-id-56237Support for building Sage using packages provided by MacPorts is coming.
MacPorts package information was filled in and positively reviewed at
- [Sage Trac ticket 30504](https://trac.sagemath.org/ticket/30504)
Enabling to build Sage using MacPorts packages needs review at:
- [Sage Trac ticket 31505](https://trac.sagemath.org/ticket/31505)Fri, 19 Mar 2021 00:01:11 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=56237#post-id-56237Comment by Mouse for <p>This situation with OpenSSL is frustrating for you and for many Sage users
on macOS and the developers are equally frustrated. Things will hopefully
improve dramatically with the release of OpenSSL 3.0 which comes under
an Apache license compatible with the GPL, so that Sage will be able to
distribute it. Currently OpenSSL 3.0.0alpha9 is out... Progress on this front
is tracked on the Sage side at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29555">Sage Trac ticket 29555: Upgrade: OpenSSL 3.0, make it a standard package</a></li>
</ul>
<p>In the meanwhile, here are some possible ways forward.</p>
<p>The best is if you can fix Sage's Python in place by sticking in
the appropriate SSL capability for it using the</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage/">fix_mac_sage script</a></li>
</ul>
<p>That script is currently provided to fix Python 3.7, which will work
with Sage 9.0 and 9.1; not yet with 9.2 which is based on Python 3.8.</p>
<p>Otherwise, I would either install Sage via Conda or build it from source,
and then in your existing app, rename the sage executable (allowing
to restore it later if needed), and put a symbolic link to an SSL-enabled
Sage (either installed via Conda or built from source) in its place.</p>
<p>To install Sage on macOS is via Conda, follow this guide:</p>
<ul>
<li><a href="https://doc.sagemath.org/html/en/installation/conda.html">Install Sage via Conda</a></li>
</ul>
<p>or make your own mix of that guide and the hints on the</p>
<ul>
<li><a href="https://wiki.sagemath.org/Conda">Conda page on the Sage wiki</a></li>
</ul>
<p>To install from source, get the sources from the</p>
<ul>
<li><a href="https://www.sagemath.org/download-source.html">SageMath source download page</a>.</li>
</ul>
<p>Once you have extracted the source tarball, prepare as follows:</p>
<ul>
<li><p>place the extracted folder where you want it (Sage stops
working if moved after using it, so better put it
where you want it before building; if you move Sage
afterwards, you need to build it again)</p></li>
<li><p>open a terminal and change to the extracted Sage folder</p></li>
</ul>
<p>Then, if you also have Homebrew, run the following:</p>
<pre><code>source .homebrew-build-env
</code></pre>
<p>(There has been a lot of effort to make Sage use as many as possible
of Homebrew's packages to save building many components.
Not sure to what extent MacPort packages can be used.)</p>
<p>Decide on how many jobs to run in parallel while building, for example
to run 1, 4, 8 or 16 jobs in parallel while building, use</p>
<pre><code>MAKE='make -j1'
MAKE='make -j4'
MAKE='make -j8'
MAKE='make -j16'
</code></pre>
<p>Then configure:</p>
<pre><code>make configure
./configure
</code></pre>
<p>Once you have run the configure step, check in the file <code>config.log</code>
what it says on what it has decided regarding Python: build its own,
use the one from MacPorts, use a different one?</p>
<p>Possibly you can tell it exactly which Python to use, using something like:</p>
<pre><code>./configure --with-python=...
</code></pre>
<p>(someone else would have to confirm).</p>
<p>If it looks like it is going to use the Python you want, great.</p>
<p>Otherwise, run configure again enabling openssl.</p>
<pre><code>./configure --enable-openssl
</code></pre>
<p>Check in <code>config.log</code> if it detected your existing openssl;
otherwise build OpenSSL first to make sure an SSL-enabled
Python will be built.</p>
<pre><code>make -s V=0 openssl
</code></pre>
<p>Then build the rest of Sage:</p>
<pre><code>make -s V=0
</code></pre>
<hr>
<p><strong>Edit</strong> to address original poster's comment after the answer above.</p>
<p>The Sage build system, despite all its quirks, works in a lot of situations,
which is no small feat.</p>
<p>Improvements have always been welcome. Along the years, tremendous effort
has gone into streamlining the build process, making it more modular,
packaging Sage for various distributions.</p>
<p>There was a time when the Sage build system could not handle Fink or MacPorts
or Homebrew being around; users had to tweak their PATH or rename
their <code>/opt/local</code> or <code>/usr/local</code> while building Sage.</p>
<p>To make life easier, the build system was made to ignore the Fink and MacPorts
directories itself. This lives on, as you found out.</p>
<p>Support for using Homebrew packages was added.</p>
<p>It would be nice to allow Sage's build system to use MacPorts
in the same way it can use Homebrew. This is tracked at:</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504: Support getting system packages from MacPorts</a></li>
</ul>
<p>Contributions are welcome!</p>
<hr>
<h3>Update (2021-03-21)</h3>
<p>There is recent progress on several fronts.</p>
<ul>
<li>A new SageMath macOS app, including OpenSSL, signed and notarized, is in beta testing.
<ul>
<li><a href="https://github.com/3-manifolds/Sage_macOS">Sage_macOS home</a></li>
<li><a href="https://github.com/3-manifolds/Sage_macOS/releases">Sage_macOS releases</a></li>
</ul></li>
<li>Building SageMath from source using installed MacPorts packages is becoming possible:
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504</a>
was merged, adding MacPorts package information.</li>
<li><a href="https://trac.sagemath.org/ticket/31505">Sage Trac ticket 31505</a>
allows building Sage using MacPorts packages. It needs review.</li>
</ul></li>
</ul>
https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54798#post-id-54798Great reply, thank you!
Unfortunately, I do not run Homebrew, for convenience and security reasons. On the other hand, the difference between finding Homebrew- and Macports-installed packages should be only in where to look for them. Thus, "re-targeting" to Macports (or enabling Macports *in addition to Homebrew*) should be just the matter of adding more locations to the search functions that look for stuff.
Trying `sage -f python3` - it *figures* that Macports is installed, **and asks to make it "invisible" for the build to proceed?!**
Then, building `pplpy`, the stupid thing tries to compile `.cpp` files with `clang` instead of `clang++`, and then complains about C flags that aren't valid for C++.Mon, 21 Dec 2020 16:58:00 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54798#post-id-54798Comment by slelievre for <p>This situation with OpenSSL is frustrating for you and for many Sage users
on macOS and the developers are equally frustrated. Things will hopefully
improve dramatically with the release of OpenSSL 3.0 which comes under
an Apache license compatible with the GPL, so that Sage will be able to
distribute it. Currently OpenSSL 3.0.0alpha9 is out... Progress on this front
is tracked on the Sage side at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29555">Sage Trac ticket 29555: Upgrade: OpenSSL 3.0, make it a standard package</a></li>
</ul>
<p>In the meanwhile, here are some possible ways forward.</p>
<p>The best is if you can fix Sage's Python in place by sticking in
the appropriate SSL capability for it using the</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage/">fix_mac_sage script</a></li>
</ul>
<p>That script is currently provided to fix Python 3.7, which will work
with Sage 9.0 and 9.1; not yet with 9.2 which is based on Python 3.8.</p>
<p>Otherwise, I would either install Sage via Conda or build it from source,
and then in your existing app, rename the sage executable (allowing
to restore it later if needed), and put a symbolic link to an SSL-enabled
Sage (either installed via Conda or built from source) in its place.</p>
<p>To install Sage on macOS is via Conda, follow this guide:</p>
<ul>
<li><a href="https://doc.sagemath.org/html/en/installation/conda.html">Install Sage via Conda</a></li>
</ul>
<p>or make your own mix of that guide and the hints on the</p>
<ul>
<li><a href="https://wiki.sagemath.org/Conda">Conda page on the Sage wiki</a></li>
</ul>
<p>To install from source, get the sources from the</p>
<ul>
<li><a href="https://www.sagemath.org/download-source.html">SageMath source download page</a>.</li>
</ul>
<p>Once you have extracted the source tarball, prepare as follows:</p>
<ul>
<li><p>place the extracted folder where you want it (Sage stops
working if moved after using it, so better put it
where you want it before building; if you move Sage
afterwards, you need to build it again)</p></li>
<li><p>open a terminal and change to the extracted Sage folder</p></li>
</ul>
<p>Then, if you also have Homebrew, run the following:</p>
<pre><code>source .homebrew-build-env
</code></pre>
<p>(There has been a lot of effort to make Sage use as many as possible
of Homebrew's packages to save building many components.
Not sure to what extent MacPort packages can be used.)</p>
<p>Decide on how many jobs to run in parallel while building, for example
to run 1, 4, 8 or 16 jobs in parallel while building, use</p>
<pre><code>MAKE='make -j1'
MAKE='make -j4'
MAKE='make -j8'
MAKE='make -j16'
</code></pre>
<p>Then configure:</p>
<pre><code>make configure
./configure
</code></pre>
<p>Once you have run the configure step, check in the file <code>config.log</code>
what it says on what it has decided regarding Python: build its own,
use the one from MacPorts, use a different one?</p>
<p>Possibly you can tell it exactly which Python to use, using something like:</p>
<pre><code>./configure --with-python=...
</code></pre>
<p>(someone else would have to confirm).</p>
<p>If it looks like it is going to use the Python you want, great.</p>
<p>Otherwise, run configure again enabling openssl.</p>
<pre><code>./configure --enable-openssl
</code></pre>
<p>Check in <code>config.log</code> if it detected your existing openssl;
otherwise build OpenSSL first to make sure an SSL-enabled
Python will be built.</p>
<pre><code>make -s V=0 openssl
</code></pre>
<p>Then build the rest of Sage:</p>
<pre><code>make -s V=0
</code></pre>
<hr>
<p><strong>Edit</strong> to address original poster's comment after the answer above.</p>
<p>The Sage build system, despite all its quirks, works in a lot of situations,
which is no small feat.</p>
<p>Improvements have always been welcome. Along the years, tremendous effort
has gone into streamlining the build process, making it more modular,
packaging Sage for various distributions.</p>
<p>There was a time when the Sage build system could not handle Fink or MacPorts
or Homebrew being around; users had to tweak their PATH or rename
their <code>/opt/local</code> or <code>/usr/local</code> while building Sage.</p>
<p>To make life easier, the build system was made to ignore the Fink and MacPorts
directories itself. This lives on, as you found out.</p>
<p>Support for using Homebrew packages was added.</p>
<p>It would be nice to allow Sage's build system to use MacPorts
in the same way it can use Homebrew. This is tracked at:</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504: Support getting system packages from MacPorts</a></li>
</ul>
<p>Contributions are welcome!</p>
<hr>
<h3>Update (2021-03-21)</h3>
<p>There is recent progress on several fronts.</p>
<ul>
<li>A new SageMath macOS app, including OpenSSL, signed and notarized, is in beta testing.
<ul>
<li><a href="https://github.com/3-manifolds/Sage_macOS">Sage_macOS home</a></li>
<li><a href="https://github.com/3-manifolds/Sage_macOS/releases">Sage_macOS releases</a></li>
</ul></li>
<li>Building SageMath from source using installed MacPorts packages is becoming possible:
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504</a>
was merged, adding MacPorts package information.</li>
<li><a href="https://trac.sagemath.org/ticket/31505">Sage Trac ticket 31505</a>
allows building Sage using MacPorts packages. It needs review.</li>
</ul></li>
</ul>
https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54802#post-id-54802Edited answer to link to ticket tracking support for MacPorts.
No work has started on that yet. Please contribute if you know how to achieve that!
Bugs are often stupid, sometimes due to an oversight, sometimes for historical reasons, ...
Constructive and informative bug reports are always welcome.
So are code contributions fixing them or documenting workarounds.
What version of Sage are you building? Latest stable? Latest develop?
What version of pplpy is giving trouble?
Do you have Apple's command-line tools only or the full Xcode with its command-line tools?
Try setting environment variables `CC=clang CXX=clang++` before building `pplpy`?
Or can you locate where the bug lies that makes it use `clang` instead of `clang++`?Mon, 21 Dec 2020 21:04:24 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54802#post-id-54802Comment by Mouse for <p>This situation with OpenSSL is frustrating for you and for many Sage users
on macOS and the developers are equally frustrated. Things will hopefully
improve dramatically with the release of OpenSSL 3.0 which comes under
an Apache license compatible with the GPL, so that Sage will be able to
distribute it. Currently OpenSSL 3.0.0alpha9 is out... Progress on this front
is tracked on the Sage side at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29555">Sage Trac ticket 29555: Upgrade: OpenSSL 3.0, make it a standard package</a></li>
</ul>
<p>In the meanwhile, here are some possible ways forward.</p>
<p>The best is if you can fix Sage's Python in place by sticking in
the appropriate SSL capability for it using the</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage/">fix_mac_sage script</a></li>
</ul>
<p>That script is currently provided to fix Python 3.7, which will work
with Sage 9.0 and 9.1; not yet with 9.2 which is based on Python 3.8.</p>
<p>Otherwise, I would either install Sage via Conda or build it from source,
and then in your existing app, rename the sage executable (allowing
to restore it later if needed), and put a symbolic link to an SSL-enabled
Sage (either installed via Conda or built from source) in its place.</p>
<p>To install Sage on macOS is via Conda, follow this guide:</p>
<ul>
<li><a href="https://doc.sagemath.org/html/en/installation/conda.html">Install Sage via Conda</a></li>
</ul>
<p>or make your own mix of that guide and the hints on the</p>
<ul>
<li><a href="https://wiki.sagemath.org/Conda">Conda page on the Sage wiki</a></li>
</ul>
<p>To install from source, get the sources from the</p>
<ul>
<li><a href="https://www.sagemath.org/download-source.html">SageMath source download page</a>.</li>
</ul>
<p>Once you have extracted the source tarball, prepare as follows:</p>
<ul>
<li><p>place the extracted folder where you want it (Sage stops
working if moved after using it, so better put it
where you want it before building; if you move Sage
afterwards, you need to build it again)</p></li>
<li><p>open a terminal and change to the extracted Sage folder</p></li>
</ul>
<p>Then, if you also have Homebrew, run the following:</p>
<pre><code>source .homebrew-build-env
</code></pre>
<p>(There has been a lot of effort to make Sage use as many as possible
of Homebrew's packages to save building many components.
Not sure to what extent MacPort packages can be used.)</p>
<p>Decide on how many jobs to run in parallel while building, for example
to run 1, 4, 8 or 16 jobs in parallel while building, use</p>
<pre><code>MAKE='make -j1'
MAKE='make -j4'
MAKE='make -j8'
MAKE='make -j16'
</code></pre>
<p>Then configure:</p>
<pre><code>make configure
./configure
</code></pre>
<p>Once you have run the configure step, check in the file <code>config.log</code>
what it says on what it has decided regarding Python: build its own,
use the one from MacPorts, use a different one?</p>
<p>Possibly you can tell it exactly which Python to use, using something like:</p>
<pre><code>./configure --with-python=...
</code></pre>
<p>(someone else would have to confirm).</p>
<p>If it looks like it is going to use the Python you want, great.</p>
<p>Otherwise, run configure again enabling openssl.</p>
<pre><code>./configure --enable-openssl
</code></pre>
<p>Check in <code>config.log</code> if it detected your existing openssl;
otherwise build OpenSSL first to make sure an SSL-enabled
Python will be built.</p>
<pre><code>make -s V=0 openssl
</code></pre>
<p>Then build the rest of Sage:</p>
<pre><code>make -s V=0
</code></pre>
<hr>
<p><strong>Edit</strong> to address original poster's comment after the answer above.</p>
<p>The Sage build system, despite all its quirks, works in a lot of situations,
which is no small feat.</p>
<p>Improvements have always been welcome. Along the years, tremendous effort
has gone into streamlining the build process, making it more modular,
packaging Sage for various distributions.</p>
<p>There was a time when the Sage build system could not handle Fink or MacPorts
or Homebrew being around; users had to tweak their PATH or rename
their <code>/opt/local</code> or <code>/usr/local</code> while building Sage.</p>
<p>To make life easier, the build system was made to ignore the Fink and MacPorts
directories itself. This lives on, as you found out.</p>
<p>Support for using Homebrew packages was added.</p>
<p>It would be nice to allow Sage's build system to use MacPorts
in the same way it can use Homebrew. This is tracked at:</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504: Support getting system packages from MacPorts</a></li>
</ul>
<p>Contributions are welcome!</p>
<hr>
<h3>Update (2021-03-21)</h3>
<p>There is recent progress on several fronts.</p>
<ul>
<li>A new SageMath macOS app, including OpenSSL, signed and notarized, is in beta testing.
<ul>
<li><a href="https://github.com/3-manifolds/Sage_macOS">Sage_macOS home</a></li>
<li><a href="https://github.com/3-manifolds/Sage_macOS/releases">Sage_macOS releases</a></li>
</ul></li>
<li>Building SageMath from source using installed MacPorts packages is becoming possible:
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504</a>
was merged, adding MacPorts package information.</li>
<li><a href="https://trac.sagemath.org/ticket/31505">Sage Trac ticket 31505</a>
allows building Sage using MacPorts packages. It needs review.</li>
</ul></li>
</ul>
https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54816#post-id-54816> What version of Sage are you building?
Latest stable, 9.2.
> What version of pplpy is giving trouble?
Whatever's coming with that Sage version. The report says pplpy-0.8.4.
> Do you have Apple's command-line tools only or the full Xcode with its command-line tools?
Xcode with it's command-line tools, *and* CLT installed separately. Both v12.3. `CC=clang` and `CXX=clang++` is already set - that's my env default.
> can you locate where the bug lies that makes it use clang instead of clang++?
I wish. :-(
I have log files that might be useful for somebody who understands Sage and pplpy, bot don't know where to send them.Tue, 22 Dec 2020 04:17:46 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54816#post-id-54816Comment by slelievre for <p>This situation with OpenSSL is frustrating for you and for many Sage users
on macOS and the developers are equally frustrated. Things will hopefully
improve dramatically with the release of OpenSSL 3.0 which comes under
an Apache license compatible with the GPL, so that Sage will be able to
distribute it. Currently OpenSSL 3.0.0alpha9 is out... Progress on this front
is tracked on the Sage side at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29555">Sage Trac ticket 29555: Upgrade: OpenSSL 3.0, make it a standard package</a></li>
</ul>
<p>In the meanwhile, here are some possible ways forward.</p>
<p>The best is if you can fix Sage's Python in place by sticking in
the appropriate SSL capability for it using the</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage/">fix_mac_sage script</a></li>
</ul>
<p>That script is currently provided to fix Python 3.7, which will work
with Sage 9.0 and 9.1; not yet with 9.2 which is based on Python 3.8.</p>
<p>Otherwise, I would either install Sage via Conda or build it from source,
and then in your existing app, rename the sage executable (allowing
to restore it later if needed), and put a symbolic link to an SSL-enabled
Sage (either installed via Conda or built from source) in its place.</p>
<p>To install Sage on macOS is via Conda, follow this guide:</p>
<ul>
<li><a href="https://doc.sagemath.org/html/en/installation/conda.html">Install Sage via Conda</a></li>
</ul>
<p>or make your own mix of that guide and the hints on the</p>
<ul>
<li><a href="https://wiki.sagemath.org/Conda">Conda page on the Sage wiki</a></li>
</ul>
<p>To install from source, get the sources from the</p>
<ul>
<li><a href="https://www.sagemath.org/download-source.html">SageMath source download page</a>.</li>
</ul>
<p>Once you have extracted the source tarball, prepare as follows:</p>
<ul>
<li><p>place the extracted folder where you want it (Sage stops
working if moved after using it, so better put it
where you want it before building; if you move Sage
afterwards, you need to build it again)</p></li>
<li><p>open a terminal and change to the extracted Sage folder</p></li>
</ul>
<p>Then, if you also have Homebrew, run the following:</p>
<pre><code>source .homebrew-build-env
</code></pre>
<p>(There has been a lot of effort to make Sage use as many as possible
of Homebrew's packages to save building many components.
Not sure to what extent MacPort packages can be used.)</p>
<p>Decide on how many jobs to run in parallel while building, for example
to run 1, 4, 8 or 16 jobs in parallel while building, use</p>
<pre><code>MAKE='make -j1'
MAKE='make -j4'
MAKE='make -j8'
MAKE='make -j16'
</code></pre>
<p>Then configure:</p>
<pre><code>make configure
./configure
</code></pre>
<p>Once you have run the configure step, check in the file <code>config.log</code>
what it says on what it has decided regarding Python: build its own,
use the one from MacPorts, use a different one?</p>
<p>Possibly you can tell it exactly which Python to use, using something like:</p>
<pre><code>./configure --with-python=...
</code></pre>
<p>(someone else would have to confirm).</p>
<p>If it looks like it is going to use the Python you want, great.</p>
<p>Otherwise, run configure again enabling openssl.</p>
<pre><code>./configure --enable-openssl
</code></pre>
<p>Check in <code>config.log</code> if it detected your existing openssl;
otherwise build OpenSSL first to make sure an SSL-enabled
Python will be built.</p>
<pre><code>make -s V=0 openssl
</code></pre>
<p>Then build the rest of Sage:</p>
<pre><code>make -s V=0
</code></pre>
<hr>
<p><strong>Edit</strong> to address original poster's comment after the answer above.</p>
<p>The Sage build system, despite all its quirks, works in a lot of situations,
which is no small feat.</p>
<p>Improvements have always been welcome. Along the years, tremendous effort
has gone into streamlining the build process, making it more modular,
packaging Sage for various distributions.</p>
<p>There was a time when the Sage build system could not handle Fink or MacPorts
or Homebrew being around; users had to tweak their PATH or rename
their <code>/opt/local</code> or <code>/usr/local</code> while building Sage.</p>
<p>To make life easier, the build system was made to ignore the Fink and MacPorts
directories itself. This lives on, as you found out.</p>
<p>Support for using Homebrew packages was added.</p>
<p>It would be nice to allow Sage's build system to use MacPorts
in the same way it can use Homebrew. This is tracked at:</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504: Support getting system packages from MacPorts</a></li>
</ul>
<p>Contributions are welcome!</p>
<hr>
<h3>Update (2021-03-21)</h3>
<p>There is recent progress on several fronts.</p>
<ul>
<li>A new SageMath macOS app, including OpenSSL, signed and notarized, is in beta testing.
<ul>
<li><a href="https://github.com/3-manifolds/Sage_macOS">Sage_macOS home</a></li>
<li><a href="https://github.com/3-manifolds/Sage_macOS/releases">Sage_macOS releases</a></li>
</ul></li>
<li>Building SageMath from source using installed MacPorts packages is becoming possible:
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504</a>
was merged, adding MacPorts package information.</li>
<li><a href="https://trac.sagemath.org/ticket/31505">Sage Trac ticket 31505</a>
allows building Sage using MacPorts packages. It needs review.</li>
</ul></li>
</ul>
https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54819#post-id-54819You could write to the [sage-support mailing list](https://groups.google.com/g/sage-support) or the [sage-devel mailing list](https://groups.google.com/g/sage-devel) describing the problem and attaching (or linking to) your config.log.Tue, 22 Dec 2020 06:30:52 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54819#post-id-54819Comment by Mouse for <p>This situation with OpenSSL is frustrating for you and for many Sage users
on macOS and the developers are equally frustrated. Things will hopefully
improve dramatically with the release of OpenSSL 3.0 which comes under
an Apache license compatible with the GPL, so that Sage will be able to
distribute it. Currently OpenSSL 3.0.0alpha9 is out... Progress on this front
is tracked on the Sage side at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29555">Sage Trac ticket 29555: Upgrade: OpenSSL 3.0, make it a standard package</a></li>
</ul>
<p>In the meanwhile, here are some possible ways forward.</p>
<p>The best is if you can fix Sage's Python in place by sticking in
the appropriate SSL capability for it using the</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage/">fix_mac_sage script</a></li>
</ul>
<p>That script is currently provided to fix Python 3.7, which will work
with Sage 9.0 and 9.1; not yet with 9.2 which is based on Python 3.8.</p>
<p>Otherwise, I would either install Sage via Conda or build it from source,
and then in your existing app, rename the sage executable (allowing
to restore it later if needed), and put a symbolic link to an SSL-enabled
Sage (either installed via Conda or built from source) in its place.</p>
<p>To install Sage on macOS is via Conda, follow this guide:</p>
<ul>
<li><a href="https://doc.sagemath.org/html/en/installation/conda.html">Install Sage via Conda</a></li>
</ul>
<p>or make your own mix of that guide and the hints on the</p>
<ul>
<li><a href="https://wiki.sagemath.org/Conda">Conda page on the Sage wiki</a></li>
</ul>
<p>To install from source, get the sources from the</p>
<ul>
<li><a href="https://www.sagemath.org/download-source.html">SageMath source download page</a>.</li>
</ul>
<p>Once you have extracted the source tarball, prepare as follows:</p>
<ul>
<li><p>place the extracted folder where you want it (Sage stops
working if moved after using it, so better put it
where you want it before building; if you move Sage
afterwards, you need to build it again)</p></li>
<li><p>open a terminal and change to the extracted Sage folder</p></li>
</ul>
<p>Then, if you also have Homebrew, run the following:</p>
<pre><code>source .homebrew-build-env
</code></pre>
<p>(There has been a lot of effort to make Sage use as many as possible
of Homebrew's packages to save building many components.
Not sure to what extent MacPort packages can be used.)</p>
<p>Decide on how many jobs to run in parallel while building, for example
to run 1, 4, 8 or 16 jobs in parallel while building, use</p>
<pre><code>MAKE='make -j1'
MAKE='make -j4'
MAKE='make -j8'
MAKE='make -j16'
</code></pre>
<p>Then configure:</p>
<pre><code>make configure
./configure
</code></pre>
<p>Once you have run the configure step, check in the file <code>config.log</code>
what it says on what it has decided regarding Python: build its own,
use the one from MacPorts, use a different one?</p>
<p>Possibly you can tell it exactly which Python to use, using something like:</p>
<pre><code>./configure --with-python=...
</code></pre>
<p>(someone else would have to confirm).</p>
<p>If it looks like it is going to use the Python you want, great.</p>
<p>Otherwise, run configure again enabling openssl.</p>
<pre><code>./configure --enable-openssl
</code></pre>
<p>Check in <code>config.log</code> if it detected your existing openssl;
otherwise build OpenSSL first to make sure an SSL-enabled
Python will be built.</p>
<pre><code>make -s V=0 openssl
</code></pre>
<p>Then build the rest of Sage:</p>
<pre><code>make -s V=0
</code></pre>
<hr>
<p><strong>Edit</strong> to address original poster's comment after the answer above.</p>
<p>The Sage build system, despite all its quirks, works in a lot of situations,
which is no small feat.</p>
<p>Improvements have always been welcome. Along the years, tremendous effort
has gone into streamlining the build process, making it more modular,
packaging Sage for various distributions.</p>
<p>There was a time when the Sage build system could not handle Fink or MacPorts
or Homebrew being around; users had to tweak their PATH or rename
their <code>/opt/local</code> or <code>/usr/local</code> while building Sage.</p>
<p>To make life easier, the build system was made to ignore the Fink and MacPorts
directories itself. This lives on, as you found out.</p>
<p>Support for using Homebrew packages was added.</p>
<p>It would be nice to allow Sage's build system to use MacPorts
in the same way it can use Homebrew. This is tracked at:</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504: Support getting system packages from MacPorts</a></li>
</ul>
<p>Contributions are welcome!</p>
<hr>
<h3>Update (2021-03-21)</h3>
<p>There is recent progress on several fronts.</p>
<ul>
<li>A new SageMath macOS app, including OpenSSL, signed and notarized, is in beta testing.
<ul>
<li><a href="https://github.com/3-manifolds/Sage_macOS">Sage_macOS home</a></li>
<li><a href="https://github.com/3-manifolds/Sage_macOS/releases">Sage_macOS releases</a></li>
</ul></li>
<li>Building SageMath from source using installed MacPorts packages is becoming possible:
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504</a>
was merged, adding MacPorts package information.</li>
<li><a href="https://trac.sagemath.org/ticket/31505">Sage Trac ticket 31505</a>
allows building Sage using MacPorts packages. It needs review.</li>
</ul></li>
</ul>
https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54839#post-id-54839Those lists seem to require joining the group...?Tue, 22 Dec 2020 13:57:46 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54839#post-id-54839Comment by slelievre for <p>This situation with OpenSSL is frustrating for you and for many Sage users
on macOS and the developers are equally frustrated. Things will hopefully
improve dramatically with the release of OpenSSL 3.0 which comes under
an Apache license compatible with the GPL, so that Sage will be able to
distribute it. Currently OpenSSL 3.0.0alpha9 is out... Progress on this front
is tracked on the Sage side at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29555">Sage Trac ticket 29555: Upgrade: OpenSSL 3.0, make it a standard package</a></li>
</ul>
<p>In the meanwhile, here are some possible ways forward.</p>
<p>The best is if you can fix Sage's Python in place by sticking in
the appropriate SSL capability for it using the</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage/">fix_mac_sage script</a></li>
</ul>
<p>That script is currently provided to fix Python 3.7, which will work
with Sage 9.0 and 9.1; not yet with 9.2 which is based on Python 3.8.</p>
<p>Otherwise, I would either install Sage via Conda or build it from source,
and then in your existing app, rename the sage executable (allowing
to restore it later if needed), and put a symbolic link to an SSL-enabled
Sage (either installed via Conda or built from source) in its place.</p>
<p>To install Sage on macOS is via Conda, follow this guide:</p>
<ul>
<li><a href="https://doc.sagemath.org/html/en/installation/conda.html">Install Sage via Conda</a></li>
</ul>
<p>or make your own mix of that guide and the hints on the</p>
<ul>
<li><a href="https://wiki.sagemath.org/Conda">Conda page on the Sage wiki</a></li>
</ul>
<p>To install from source, get the sources from the</p>
<ul>
<li><a href="https://www.sagemath.org/download-source.html">SageMath source download page</a>.</li>
</ul>
<p>Once you have extracted the source tarball, prepare as follows:</p>
<ul>
<li><p>place the extracted folder where you want it (Sage stops
working if moved after using it, so better put it
where you want it before building; if you move Sage
afterwards, you need to build it again)</p></li>
<li><p>open a terminal and change to the extracted Sage folder</p></li>
</ul>
<p>Then, if you also have Homebrew, run the following:</p>
<pre><code>source .homebrew-build-env
</code></pre>
<p>(There has been a lot of effort to make Sage use as many as possible
of Homebrew's packages to save building many components.
Not sure to what extent MacPort packages can be used.)</p>
<p>Decide on how many jobs to run in parallel while building, for example
to run 1, 4, 8 or 16 jobs in parallel while building, use</p>
<pre><code>MAKE='make -j1'
MAKE='make -j4'
MAKE='make -j8'
MAKE='make -j16'
</code></pre>
<p>Then configure:</p>
<pre><code>make configure
./configure
</code></pre>
<p>Once you have run the configure step, check in the file <code>config.log</code>
what it says on what it has decided regarding Python: build its own,
use the one from MacPorts, use a different one?</p>
<p>Possibly you can tell it exactly which Python to use, using something like:</p>
<pre><code>./configure --with-python=...
</code></pre>
<p>(someone else would have to confirm).</p>
<p>If it looks like it is going to use the Python you want, great.</p>
<p>Otherwise, run configure again enabling openssl.</p>
<pre><code>./configure --enable-openssl
</code></pre>
<p>Check in <code>config.log</code> if it detected your existing openssl;
otherwise build OpenSSL first to make sure an SSL-enabled
Python will be built.</p>
<pre><code>make -s V=0 openssl
</code></pre>
<p>Then build the rest of Sage:</p>
<pre><code>make -s V=0
</code></pre>
<hr>
<p><strong>Edit</strong> to address original poster's comment after the answer above.</p>
<p>The Sage build system, despite all its quirks, works in a lot of situations,
which is no small feat.</p>
<p>Improvements have always been welcome. Along the years, tremendous effort
has gone into streamlining the build process, making it more modular,
packaging Sage for various distributions.</p>
<p>There was a time when the Sage build system could not handle Fink or MacPorts
or Homebrew being around; users had to tweak their PATH or rename
their <code>/opt/local</code> or <code>/usr/local</code> while building Sage.</p>
<p>To make life easier, the build system was made to ignore the Fink and MacPorts
directories itself. This lives on, as you found out.</p>
<p>Support for using Homebrew packages was added.</p>
<p>It would be nice to allow Sage's build system to use MacPorts
in the same way it can use Homebrew. This is tracked at:</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504: Support getting system packages from MacPorts</a></li>
</ul>
<p>Contributions are welcome!</p>
<hr>
<h3>Update (2021-03-21)</h3>
<p>There is recent progress on several fronts.</p>
<ul>
<li>A new SageMath macOS app, including OpenSSL, signed and notarized, is in beta testing.
<ul>
<li><a href="https://github.com/3-manifolds/Sage_macOS">Sage_macOS home</a></li>
<li><a href="https://github.com/3-manifolds/Sage_macOS/releases">Sage_macOS releases</a></li>
</ul></li>
<li>Building SageMath from source using installed MacPorts packages is becoming possible:
<ul>
<li><a href="https://trac.sagemath.org/ticket/30504">Sage Trac ticket 30504</a>
was merged, adding MacPorts package information.</li>
<li><a href="https://trac.sagemath.org/ticket/31505">Sage Trac ticket 31505</a>
allows building Sage using MacPorts packages. It needs review.</li>
</ul></li>
</ul>
https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54857#post-id-54857Send an email to sage-support@googlegroups.com
or sage-devel@googlegroups.com and it should be posted to the list,
possibly after moderation, without requiring to "join".Wed, 23 Dec 2020 00:18:52 +0100https://ask.sagemath.org/question/54790/how-to-make-sage-use-openssl-installed-in-optlocalbin-libinclude/?comment=54857#post-id-54857