Building on Catalina

84 views
Skip to first unread message

David Einstein

unread,
Apr 8, 2020, 9:58:20 PM4/8/20
to sage-support
I am trying to build on OSX Catalina, and everything seems to go well until it builds sagelib, and I get a libpng not found.

Everything built nicely a few weeks ago.  I am tempted to blame the upgrade to catalina, but I also upgraded hombrew and XCode.

Any ideas?

Here is the final output from the terminal.

if [ -z "$SAGE_INSTALL_FETCH_ONLY" ]; then \

cd /Users/davideinstein/projects/sage/src && source bin/sage-env && source /Users/davideinstein/projects/sage/build/bin/sage-build-env-config && \

sage-logger -p 'time make sage' '/Users/davideinstein/projects/sage/logs/pkgs/sagelib-9.1.beta9.log'; \

fi

[sagelib-9.1.beta9] cd . && export                                    \

[sagelib-9.1.beta9]     SAGE_ROOT=/doesnotexist                               \

[sagelib-9.1.beta9]     SAGE_SRC=/doesnotexist                                \

[sagelib-9.1.beta9]     SAGE_SRC_ROOT=/doesnotexist                           \

[sagelib-9.1.beta9]     SAGE_DOC_SRC=/doesnotexist                            \

[sagelib-9.1.beta9]     SAGE_BUILD_DIR=/doesnotexist                          \

[sagelib-9.1.beta9]     SAGE_PKGS=/Users/davideinstein/projects/sage/build/pkgs                \

[sagelib-9.1.beta9] && sage-python -u setup.py --no-user-cfg build install

[sagelib-9.1.beta9] /Users/davideinstein/projects/sage/src/bin/sage-env: line 130: cd: /doesnotexist: No such file or directory

[sagelib-9.1.beta9] Warning: overwriting SAGE_ROOT environment variable:

[sagelib-9.1.beta9] Old SAGE_ROOT=/doesnotexist

[sagelib-9.1.beta9] New SAGE_ROOT=

[sagelib-9.1.beta9] ************************************************************************

[sagelib-9.1.beta9] Traceback (most recent call last):

[sagelib-9.1.beta9]   File "setup.py", line 72, in <module>

[sagelib-9.1.beta9]     from module_list import ext_modules, library_order

[sagelib-9.1.beta9]   File "/Users/davideinstein/projects/sage/src/module_list.py", line 36, in <module>

[sagelib-9.1.beta9]     png_pc = pkgconfig.parse('libpng')

[sagelib-9.1.beta9]   File "/Users/davideinstein/projects/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 248, in parse

[sagelib-9.1.beta9]     _raise_if_not_exists(package)

[sagelib-9.1.beta9]   File "/Users/davideinstein/projects/sage/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists

[sagelib-9.1.beta9]     raise PackageNotFoundError(package)

[sagelib-9.1.beta9] pkgconfig.pkgconfig.PackageNotFoundError: libpng not found

[sagelib-9.1.beta9] ************************************************************************

[sagelib-9.1.beta9] Error building the Sage library

[sagelib-9.1.beta9] ************************************************************************

[sagelib-9.1.beta9] Please email sage-devel (http://groups.google.com/group/sage-devel)

[sagelib-9.1.beta9] explaining the problem and including the relevant part of the log file

[sagelib-9.1.beta9]   /Users/davideinstein/projects/sage/logs/pkgs/sagelib-9.1.beta9.log

[sagelib-9.1.beta9] Describe your computer, operating system, etc.

[sagelib-9.1.beta9] ************************************************************************

[sagelib-9.1.beta9] make[4]: *** [sage] Error 1

[sagelib-9.1.beta9] 

[sagelib-9.1.beta9] real 0m0.612s

[sagelib-9.1.beta9] user 0m0.193s

[sagelib-9.1.beta9] sys 0m0.133s

make[3]: *** [sagelib] Error 2

make[2]: *** [all-start] Error 2


real 212m28.552s

user 151m29.195s

sys 26m1.334s

***************************************************************

Error building Sage.


The following package(s) may have failed to build (not necessarily

during this run of 'make all-start'):


* package:         sagelib-9.1.beta9

  last build time: Apr 8 21:23

  log file:        /Users/davideinstein/projects/sage/logs/pkgs/sagelib-9.1.beta9.log


It is safe to delete any log files and build directories, but they

contain information that is helpful for debugging build problems.

WARNING: If you now run 'make' again, the build directory of the

same version of the package will, by default, be deleted. Set the

environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.


make[1]: *** [all-start] Error 1

make: *** [all] Error 2

Dima Pasechnik

unread,
Apr 8, 2020, 10:32:51 PM4/8/20
to sage-support
Hi David,
It might help if you posted the top-level config.log, thanks.

Dima
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/d8e46d82-f201-4cbd-94ad-5bceccdc678c%40googlegroups.com.

David Einstein

unread,
Apr 8, 2020, 10:58:38 PM4/8/20
to sage-support
Here is the config.log.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-s...@googlegroups.com.
config.log

John H Palmieri

unread,
Apr 8, 2020, 11:04:27 PM4/8/20
to sage-support
When I have had problems with libpng, it has helped to do "brew install pkg-config". If you happened to start building Sage and then upgraded Homebrew and/or Xcode in the middle of that, or if you've installed any new Homebrew packages,  you should probably start over with "make distclean" followed by "make".

Dima Pasechnik

unread,
Apr 8, 2020, 11:29:09 PM4/8/20
to sage-support
Could you post the outputs of

pkg-config --modversion libpng
set | grep PKG

run at the terminal, and run at the Sage shell prompt (./sage -sh) ?
I really don't understand this error, as at configure time libpng is
found via pkg-config
Thanks
Dima
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/abe507f1-b55f-489c-99ee-4c41a97a09fd%40googlegroups.com.

David Einstein

unread,
Apr 9, 2020, 9:35:53 AM4/9/20
to sage-support
I did a brew install pkg-config and was notified that version 0.29.1 was already installed, but I could upgrade to 0.29.2, so I did so. Then did a `make distclean` and then make and got marginally further.  Now it dies starting to build sagelib

if [ -z "$SAGE_INSTALL_FETCH_ONLY" ]; then \

cd /Users/davideinstein/projects/sage/src && source bin/sage-env && source /Users/davideinstein/projects/sage/build/bin/sage-build-env-config && \

sage-logger -p 'time make sage' '/Users/davideinstein/projects/sage/logs/pkgs/sagelib-9.1.beta9.log'; \

fi

[sagelib-9.1.beta9] cd . && export                                    \

[sagelib-9.1.beta9]     SAGE_ROOT=/doesnotexist                               \

[sagelib-9.1.beta9]     SAGE_SRC=/doesnotexist                                \

[sagelib-9.1.beta9]     SAGE_SRC_ROOT=/doesnotexist                           \

[sagelib-9.1.beta9]     SAGE_DOC_SRC=/doesnotexist                            \

[sagelib-9.1.beta9]     SAGE_BUILD_DIR=/doesnotexist                          \

[sagelib-9.1.beta9]     SAGE_PKGS=/Users/davideinstein/projects/sage/build/pkgs                \

[sagelib-9.1.beta9] && sage-python -u setup.py --no-user-cfg build install

[sagelib-9.1.beta9] /Users/davideinstein/projects/sage/src/bin/sage-env: line 130: cd: /doesnotexist: No such file or directory

[sagelib-9.1.beta9] Warning: overwriting SAGE_ROOT environment variable:

[sagelib-9.1.beta9] Old SAGE_ROOT=/doesnotexist

[sagelib-9.1.beta9] New SAGE_ROOT=

[sagelib-9.1.beta9] Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1

[sagelib-9.1.beta9] Discovering Python/Cython source code....

[sagelib-9.1.beta9] Discovered Python/Cython sources, time: 0.07 seconds.

[sagelib-9.1.beta9] running build

[sagelib-9.1.beta9] Generating auto-generated sources

[sagelib-9.1.beta9] Building interpreters for fast_callable

[sagelib-9.1.beta9] -> First build of interpreters

[sagelib-9.1.beta9] running build_cython

[sagelib-9.1.beta9] Enabling Cython debugging support

[sagelib-9.1.beta9] error: parallel should be an integer

[sagelib-9.1.beta9] make[4]: *** [sage] Error 1

[sagelib-9.1.beta9] 

[sagelib-9.1.beta9] real 0m2.845s

[sagelib-9.1.beta9] user 0m1.574s

[sagelib-9.1.beta9] sys 0m0.468s

make[3]: *** [sagelib] Error 2

make[2]: *** [all-start] Error 2


real 146m19.171s

user 137m25.979s

sys 23m16.198s

***************************************************************

Error building Sage.

config.log

David Einstein

unread,
Apr 9, 2020, 9:37:56 AM4/9/20
to sage-support

davideinstein@Davids-MacBook-Pro-3 sage % pkg-config --modversion libpng

1.6.37

davideinstein@Davids-MacBook-Pro-3 sage % set | grep PKG

PKG_CONFIG_PATH=/Users/davideinstein/projects/sage/local/lib/pkgconfig

SAGE_PKGCONFIG=/Users/davideinstein/projects/sage/local/lib/pkgconfig

SAGE_PKG_CONFIG_PATH=/Users/davideinstein/projects/sage/local/lib/pkgconfig

SAGE_SPKG_INST=/Users/davideinstein/projects/sage/local/var/lib/sage/installed

SAGE_SPKG_SCRIPTS=/Users/davideinstein/projects/sage/local/var/lib/sage/scripts

davideinstein@Davids-MacBook-Pro-3 sage % 

David Einstein

unread,
Apr 9, 2020, 10:47:17 AM4/9/20
to sage-support
Apple just gave me a supplemental Catalina update, and now sagelib is building.  If this works, I'll attribute it to some Apple problem.

Matthias Koeppe

unread,
Apr 9, 2020, 12:16:56 PM4/9/20
to sage-support
On Thursday, April 9, 2020 at 6:35:53 AM UTC-7, David Einstein wrote:
I did a brew install pkg-config and was notified that version 0.29.1 was already installed, but I could upgrade to 0.29.2, so I did so. Then did a `make distclean` and then make and got marginally further.  Now it dies starting to build sagelib


From the config.log that you posted it seems that you are running configure from inside `sage -sh` or you have set PATH manually to include the following:
PATH: /Users/davideinstein/projects/sage/build/bin
PATH: /Users/davideinstein/projects/sage/src/bin
PATH: /Users/davideinstein/projects/sage/local/bin

This is not supported. configure should be run outside of `sage -sh` and without such PATH settings.
 

David Einstein

unread,
Apr 9, 2020, 5:23:17 PM4/9/20
to sage-support
Sorry, that was a side effect of me running one of the internal scripts from the command line in a vainglorious attempt to figure out what was going on.

After running the osx upgrade, everything built (even with the funky paths) and all the doctests worked (except a few padic_lattice_element tests that I assume are expected.)  I'll do a make distclean, and start a new shell and redo everything just to make sure, but I think I'm in good shape now.

I thank everyone for their help.

Dima Pasechnik

unread,
Apr 10, 2020, 12:07:09 AM4/10/20
to sage-support
On Fri, Apr 10, 2020 at 5:23 AM David Einstein <dei...@gmail.com> wrote:
>
> Sorry, that was a side effect of me running one of the internal scripts from the command line in a vainglorious attempt to figure out what was going on.
>
> After running the osx upgrade, everything built (even with the funky paths) and all the doctests worked (except a few padic_lattice_element tests that I assume are expected.) I'll do a make distclean, and start a new shell and redo everything just to make sure, but I think I'm in good shape now.

Thanks - could you tell us what MacOS and Xcode versions you are on now?

>
> I thank everyone for their help.
>
> On Thursday, April 9, 2020 at 12:16:56 PM UTC-4, Matthias Koeppe wrote:
>>
>> On Thursday, April 9, 2020 at 6:35:53 AM UTC-7, David Einstein wrote:
>>>
>>> I did a brew install pkg-config and was notified that version 0.29.1 was already installed, but I could upgrade to 0.29.2, so I did so. Then did a `make distclean` and then make and got marginally further. Now it dies starting to build sagelib
>>>>>>
>>>>>>
>>
>> From the config.log that you posted it seems that you are running configure from inside `sage -sh` or you have set PATH manually to include the following:
>> PATH: /Users/davideinstein/projects/sage/build/bin
>>
>> PATH: /Users/davideinstein/projects/sage/src/bin
>> PATH: /Users/davideinstein/projects/sage/local/bin
>>
>>
>> This is not supported. configure should be run outside of `sage -sh` and without such PATH settings.
>>
>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/cc58eb14-6846-44aa-8561-7cb7dde86c3d%40googlegroups.com.

David Einstein

unread,
Apr 10, 2020, 9:31:15 AM4/10/20
to sage-support
Mac OS 10.15.4
Xcode Version 11.3 beta (11C24b)
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-s...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages