---------- Forwarded message --------- From: Dima Pasechnik <dimp...@gmail.com> Date: Thu, Sep 26, 2024 at 9:17 PM Subject: Re: [sage-devel] trouble installing sage To: <a...@math.ucdavis.edu>
Hi Anna, Oh no... Well, try unset LDFLAGS unset CPPFLAGS unset PKG_CONFIG_PATH brew uninstall openblas brew install openblas but I really don't know what kind of collateral damage "brew reinstall openblas --build-from-source" has done. It might be that you'd have to purge Homebrew (see https://github.com/homebrew/install#uninstall-homebrew) and reinstall it from scratch. It's still puzzling that it went into /usr/local, and not into /opt ? Do you have 2 installations of Homebrew, one in /opt, and another in /usr/local? The 2nd one must go... HTH Dima On Thu, Sep 26, 2024 at 8:44 PM Anne Schilling <a...@math.ucdavis.edu> wrote: > No, this is still the same machine, but somehow last night I also followed > Kyukwan's suggestion and did > > brew reinstall openblas --build-from-source > > And then following your advice of doing as Romans do in Rome was asked to do > > export LDFLAGS="-L/usr/local/opt/openblas/lib" > export CPPFLAGS="-I/usr/local/opt/openblas/include" > export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig" > > How do I undo this? > > Best, > > Anne > > On 9/26/24 12:17 PM, Dima Pasechnik wrote: > > Hi Anne, > > > > I am sorry, why all of a sudden you have Homebrew installed in > > /usr/local, even though in the previous iteration it was in /opt ? > > Do you have a wrong arch copy of Homebrew on your M1 machine? > > (and if so, why?) > > > > Or is it a different, x86_64, machine? > > > > Assuming you're on an arm64, your brew should be in /opt/, not on > > /usr/local, too. > > Wrong order of things in PATH? > > Please make sure that /opt things come before /usr/local things in your > > path, > > and re-run the whole things. > > > > Best > > Dima > > > > > > On Thu, Sep 26, 2024 at 7:58 PM Anne Schilling > > <anne1.schill...@gmail.com> wrote: > >> Hi Dima, > >> > >> I appreciate all your help! > >> > >> In a new terminal, I did > >> > >> source .homebrew-build-env > >> echo $PKG_CONFIG_PATH > >> /usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:/usr/local/lib/pkgconfig: > >> > >> ./configure > >> make > >> > >> ... > >> [openblas-0.3.26] /Users/anne/sage/sage/config.log > >> [openblas-0.3.26] Describe your computer, operating system, etc. > >> [openblas-0.3.26] If you want to try to fix the problem yourself, *don't* > >> just cd to > >> [openblas-0.3.26] > >> /Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26 and type > >> 'make' or whatever is appropriate. > >> [openblas-0.3.26] Instead, the following commands setup all environment > >> variables > >> [openblas-0.3.26] correctly and load a subshell for you to debug the error: > >> [openblas-0.3.26] (cd > >> '/Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26' && > >> '/Users/anne/sage/sage/sage' --buildsh) > >> [openblas-0.3.26] When you are done debugging, you can type "exit" to > >> leave the subshell. > >> [openblas-0.3.26] > >> ************************************************************************ > >> [openblas-0.3.26] real 4m38.340s user 3m6.887s sys 1m6.485s > >> make[4]: *** [openblas-SAGE_LOCAL-no-deps] Error 1 > >> make[3]: *** > >> [/Users/anne/sage/sage/local/var/lib/sage/installed/openblas-0.3.26] Error > >> 2 > >> make[2]: *** [all-start] Error 2 > >> *************************************************************** > >> Error building Sage. > >> > >> The following package(s) may have failed to build (not necessarily > >> during this run of 'make all-start'): > >> > >> * package: m4ri-20200125 > >> last build time: Sep 26 11:51 > >> log file: /Users/anne/sage/sage/logs/pkgs/m4ri-20200125.log > >> build directory: > >> /Users/anne/sage/sage/local/var/tmp/sage/build/m4ri-20200125 > >> > >> * package: openblas-0.3.26 > >> last build time: Sep 26 11:55 > >> log file: /Users/anne/sage/sage/logs/pkgs/openblas-0.3.26.log > >> build directory: > >> /Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26 > >> > >> 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. > >> > >> real 8m1.762s user 12m32.628s sys 5m29.871s > >> make[1]: *** [all-start] Error 1 > >> make: *** [all] Error 2 > >> > >> Best wishes, > >> > >> Anne > >> > >> On Thursday, September 26, 2024 at 1:10:39 AM UTC-7 dim...@gmail.com wrote: > >>> Hi Anne, > >>> sorry for this mess. > >>> This config.log (which you sent only to me) looks fine, openblas is > >>> detected. What's not fine is > >>> PKG_CONFIG_PATH value, which is over 4K characters long. > >>> That's insanely long, with lots and lots of repeated entries. > >>> It's actually not the only environment variable which grows with each > >>> sourcing. > >>> There are also LIBRARY_PATH, CPATH, PATH, etc (you can read > >>> .homebrew-build-environment for a complete list) > >>> :-( > >>> It could be that's they are so long that it breaks things. > >>> > >>> This came from repeated sourcing of .homebrew-build-env > >>> Our instructions say that "source .homebrew-build-env" should only be > >>> run once in given terminal session. > >>> That's obviously not well-aligned with repeatedly installing more and > >>> more homebrew packages, after which round > >>> values of PKG_CONFIG_PATH might need to be updated, and needs another > >>> round of "source .homebrew-build-env". > >>> > >>> Indeed, PKG_CONFIG_PATH grows after each sourcing, > >>> as you can check by repeatedly running > >>> > >>> source .homebrew-build-env > >>> echo $PKG_CONFIG_PATH > >>> > >>> I'll open a GitHub issue to deal with it. > >>> As a workaround, could you please open a new ternimal, run there > >>> "source .homebrew-build-env" followed by "./configure", and check > >>> that PKG_CONFIG_PATH > >>> is of reasonable length (by running "echo $PKG_CONFIG_PATH"), > >>> something like I see on our M1 machine: > >>> PKG_CONFIG_PATH='/opt/homebrew/opt/sqlite/lib/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconfig:/opt/homebrew/opt/openssl/lib/pkgconfig:/opt/homebrew/opt/openblas/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:' > >>> > >>> Then run "make", if it's OK. > >>> > >>> HTH > >>> Dima > >>> > >>> On Thursday, September 26, 2024 at 12:49:24 AM UTC+1 anne1.s...@gmail.com > >>> wrote: > >>>> Hi Dima, > >>>> > >>>> Yes, I have openblas installed via brew and just reinstalled it again > >>>> and get the same error message. > >>>> > >>>> Best wishes, > >>>> > >>>> Anne > >>>> > >>>> On Wednesday, September 25, 2024 at 1:41:01 PM UTC-7 dim...@gmail.com > >>>> wrote: > >>>>> On Wed, Sep 25, 2024 at 8:18 PM Anne Schilling > >>>>> <anne1.s...@gmail.com> wrote: > >>>>>> Thanks! I followed the instructions, then ran ./configure and make and > >>>>>> got the following: > >>>>> Do you have openblas installed via brew? > >>>>> This would be probably the easiest - otherwise we might need an > >>>>> upgrade of openblas > >>>>> (ours it probably too old for macOS 15.0) > >>>>> > >>>>> > >>>>> > >>>>>> ... > >>>>>> CNAME=\"\" -DNO_AFFINITY -I. -O2 -DMAX_STACK_ALLOC=2048 -Wall > >>>>>> -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=10 > >>>>>> -DMAX_PARALLEL_NUMBER=1 -DUSE_TLS -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 > >>>>>> -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.26\" -UASMNAME > >>>>>> -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=_samax_k > >>>>>> -DASMFNAME=_samax_k_ -DNAME=samax_k_ -DCNAME=samax_k > >>>>>> -DCHAR_NAME=\"samax_k_\" -DCHAR_CNAME=\"samax_k\" -DNO_AFFINITY -I.. > >>>>>> -UDOUBLE -UCOMPLEX -UCOMPLEX -UDOUBLE -DUSE_ABS -UUSE_MIN > >>>>>> ../kernel/arm64/amax.S -o samax_k.o > >>>>>> [openblas-0.3.26] [spkg-install] make[6]: *** No rule to make target > >>>>>> `../kernel/arm64/amin.S', needed by `samin_k.o'. Stop. > >>>>>> [openblas-0.3.26] [spkg-install] make[5]: *** [libs] Error 1 > >>>>>> [openblas-0.3.26] [spkg-install] > >>>>>> ******************************************************************************** > >>>>>> [openblas-0.3.26] [spkg-install] Error building openblas-0.3.26 > >>>>>> [openblas-0.3.26] [spkg-install] > >>>>>> ******************************************************************************** > >>>>>> [openblas-0.3.26] > >>>>>> ************************************************************************ > >>>>>> [openblas-0.3.26] Error installing package openblas-0.3.26 > >>>>>> [openblas-0.3.26] > >>>>>> ************************************************************************ > >>>>>> [openblas-0.3.26] Please email sage-devel > >>>>>> (http://groups.google.com/group/sage-devel) > >>>>>> [openblas-0.3.26] explaining the problem and including the log files > >>>>>> [openblas-0.3.26] /Users/anne/sage/sage/logs/pkgs/openblas-0.3.26.log > >>>>>> [openblas-0.3.26] and > >>>>>> [openblas-0.3.26] /Users/anne/sage/sage/config.log > >>>>>> [openblas-0.3.26] Describe your computer, operating system, etc. > >>>>>> [openblas-0.3.26] If you want to try to fix the problem yourself, > >>>>>> *don't* just cd to > >>>>>> [openblas-0.3.26] > >>>>>> /Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26 and > >>>>>> type 'make' or whatever is appropriate. > >>>>>> [openblas-0.3.26] Instead, the following commands setup all > >>>>>> environment variables > >>>>>> [openblas-0.3.26] correctly and load a subshell for you to debug the > >>>>>> error: > >>>>>> [openblas-0.3.26] (cd > >>>>>> '/Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26' && > >>>>>> '/Users/anne/sage/sage/sage' --buildsh) > >>>>>> [openblas-0.3.26] When you are done debugging, you can type "exit" to > >>>>>> leave the subshell. > >>>>>> [openblas-0.3.26] > >>>>>> ************************************************************************ > >>>>>> [openblas-0.3.26] real 4m31.252s user 3m3.040s sys 1m4.242s > >>>>>> make[4]: *** [openblas-SAGE_LOCAL-no-deps] Error 1 > >>>>>> make[3]: *** > >>>>>> [/Users/anne/sage/sage/local/var/lib/sage/installed/openblas-0.3.26] > >>>>>> Error 2 > >>>>>> make[2]: *** [all-start] Error 2 > >>>>>> *************************************************************** > >>>>>> Error building Sage. > >>>>>> > >>>>>> The following package(s) may have failed to build (not necessarily > >>>>>> during this run of 'make all-start'): > >>>>>> > >>>>>> * package: m4ri-20200125 > >>>>>> last build time: Sep 25 12:11 > >>>>>> log file: /Users/anne/sage/sage/logs/pkgs/m4ri-20200125.log > >>>>>> build directory: > >>>>>> /Users/anne/sage/sage/local/var/tmp/sage/build/m4ri-20200125 > >>>>>> > >>>>>> * package: openblas-0.3.26 > >>>>>> last build time: Sep 25 12:15 > >>>>>> log file: /Users/anne/sage/sage/logs/pkgs/openblas-0.3.26.log > >>>>>> build directory: > >>>>>> /Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26 > >>>>>> > >>>>>> 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. > >>>>>> > >>>>>> real 4m31.928s user 9m1.974s sys 2m44.265s > >>>>>> make[1]: *** [all-start] Error 1 > >>>>>> make: *** [all] Error 2 > >>>>>> > >>>>>> Best wishes, > >>>>>> > >>>>>> Anne > >>>>>> > >>>>>> On Wednesday, September 25, 2024 at 9:33:00 AM UTC-7 dim...@gmail.com > >>>>>> wrote: > >>>>>>> Well, while in Rome, do as Romans do? :-) > >>>>>>> From your log: > >>>>>>> > >>>>>>> hint: On your system (homebrew), you can install the required system > >>>>>>> packages as follows: > >>>>>>> > >>>>>>> $ brew install autoconf automake libtool pkg-config > >>>>>>> > >>>>>>> On Wed, Sep 25, 2024 at 4:45 PM Anne Schilling > >>>>>>> <anne1.s...@gmail.com> wrote: > >>>>>>>> Hi Dima and Kwankyu, > >>>>>>>> > >>>>>>>> Thank you so much for your help! > >>>>>>>> > >>>>>>>> Dima, I have > >>>>>>>> > >>>>>>>> export PATH=$PATH:/Users/anne/Library/ > >>>>>>>> > >>>>>>>> in my .bashrc file. But when I take out this line the command > >>>>>>>> > >>>>>>>> ./bootstrap > >>>>>>>> > >>>>>>>> gives a failure > >>>>>>>> > >>>>>>>> ... > >>>>>>>> /bootstrap:85: installing src/doc/en/reference/spkg/*.rst > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_environment/src/pyproject.toml > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_environment/src/requirements-editable.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_environment/src/requirements.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_mcqd/src/pyproject.toml > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_mcqd/src/requirements.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_meataxe/src/pyproject.toml > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_meataxe/src/requirements.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_objects/src/pyproject.toml > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_objects/src/requirements-editable.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_objects/src/requirements.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_repl/src/pyproject.toml > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_repl/src/requirements-editable.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_repl/src/requirements.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_sirocco/src/pyproject.toml > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_sirocco/src/requirements.txt > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_tdlib/src/pyproject.toml > >>>>>>>> ./bootstrap: installing > >>>>>>>> /Users/anne/sage/sage/build/pkgs/sagemath_tdlib/src/requirements.txt > >>>>>>>> ./bootstrap-conda:84: generate conda environment files > >>>>>>>> ./bootstrap: line 143: aclocal: command not found > >>>>>>>> Bootstrap failed. Either install autotools; or run bootstrap with > >>>>>>>> the -d option to download the auto-generated files instead. > >>>>>>>> > >>>>>>>> hint: On your system (homebrew), you can install the required system > >>>>>>>> packages as follows: > >>>>>>>> $ brew install autoconf automake libtool pkg-config > >>>>>>>> > >>>>>>>> Homebrew can issue suggestions regarding keg-only packages. > >>>>>>>> The following command is to automatically apply these suggestions > >>>>>>>> for packages relevant for Sage to make them available for the build. > >>>>>>>> Run it once to apply the suggestions for the current session. > >>>>>>>> Add it to your shell profile to apply them for all future sessions. > >>>>>>>> > >>>>>>>> $ source /Users/anne/sage/sage/.homebrew-build-env > >>>>>>>> > >>>>>>>> Best wishes, > >>>>>>>> > >>>>>>>> Anne > >>>>>>>> > >>>>>>>> On Wednesday, September 25, 2024 at 1:00:48 AM UTC-7 > >>>>>>>> dim...@gmail.com wrote: > >>>>>>>>> these PATH entries look very suspect. > >>>>>>>>> You don't want any of these Python things in your PATH. > >>>>>>>>> > >>>>>>>>> PATH: /Library/Frameworks/Python.framework/Versions/3.7/bin/ > >>>>>>>>> PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin/ > >>>>>>>>> PATH: /Library/Frameworks/Python.framework/Versions/Current/bin/ > >>>>>>>>> > >>>>>>>>> On Tue, Sep 24, 2024 at 11:32 PM Anne Schilling > >>>>>>>>> <anne1.s...@gmail.com> wrote: > >>>>>>>>>> Ok, sorry, here is the result after > >>>>>>>>>> > >>>>>>>>>> make distclean > >>>>>>>>>> source .homebrew-build-env > >>>>>>>>>> ./bootstrap > >>>>>>>>>> ./configure --enable-system-site-packages > >>>>>>>>>> > >>>>>>>>>> Best wishes, > >>>>>>>>>> > >>>>>>>>>> Anne > >>>>>>>>>> > >>>>>>>>>> On Tuesday, September 24, 2024 at 3:22:06 PM UTC-7 John H Palmieri > >>>>>>>>>> wrote: > >>>>>>>>>>> On Tuesday, September 24, 2024 at 3:19:07 PM UTC-7 > >>>>>>>>>>> dim...@gmail.com wrote: > >>>>>>>>>>> > >>>>>>>>>>> From the log: > >>>>>>>>>>> > >>>>>>>>>>> ./configure --enable-system-site-packagesls (SIC!) > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ## Checking whether SageMath should install SPKG scipy... ## > >>>>>>>>>>> ## ------------------------------------------------------ ## > >>>>>>>>>>> configure:90867: checking whether any of openblas is installed as > >>>>>>>>>>> or > >>>>>>>>>>> will be installed as SPKG > >>>>>>>>>>> configure:90877: result: no > >>>>>>>>>>> configure:90881: checking if --enable-system-site-packages was > >>>>>>>>>>> used > >>>>>>>>>>> configure:90939: result: no; skipping check > >>>>>>>>>>> configure:90976: no suitable system package found for SPKG scipy > >>>>>>>>>>> > >>>>>>>>>>> So please run > >>>>>>>>>>> > >>>>>>>>>>> ./configure --enable-system-site-packages > >>>>>>>>>>> > >>>>>>>>>>> without a typo. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> And it might not hurt to first run "make distclean" before doing > >>>>>>>>>>> everything else (in case you're not already doing this). > >>>>>>>>>>> > >>>>>>>>>>> -- > >>>>>>>>>>> John > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>> -- > >>>>>>>>>> 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 on the web visit > >>>>>>>>>> https://groups.google.com/d/msgid/sage-devel/51990537-59a2-4fce-9993-b322ada6c10fn%40googlegroups.com. > >>>>>>>> -- > >>>>>>>> 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 on the web visit > >>>>>>>> https://groups.google.com/d/msgid/sage-devel/da1e14fb-20a7-4e34-bc63-19016b03f588n%40googlegroups.com. > >>>>>> -- > >>>>>> 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 on the web visit > >>>>>> https://groups.google.com/d/msgid/sage-devel/fdbca53b-c231-496f-a2d5-36d5062a33ecn%40googlegroups.com. > >> -- > >> 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+unsubscr...@googlegroups.com. > >> To view this discussion on the web visit > >> https://groups.google.com/d/msgid/sage-devel/5668cf7f-387f-40e1-a87d-93ba0a910a7dn%40googlegroups.com. > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1i6wpjh2n1vvo_6Q1SBAhsuL2W%3DRzHpmpTz33R2q344A%40mail.gmail.com.