On Wed, Apr 24, 2024 at 4:45 AM Marc Culler <marc.cul...@gmail.com> wrote: > > That was it! > > Thank you Gonzalo; indeed, it helps a lot. And your workaround is fine, > since we don't support the -i option,
running Cython in sage prompt or in Sage Jupyter notebook has nothing to do with -i option. One can call cythonize in a regular Sage session (see, it builds a .so in /tmp): sage: from sage.misc.cython import compile_and_load sage: module = compile_and_load("def f(int n):\n return n*n") sage: module.f(10) 100 sage: module <module '_tmp_tmpbw1f5mpb_tmp_ys4atzvl_pyx_0' from '/tmp/tmp6ce3su_y/spyx/_tmp_tmpbw1f5mpb_tmp_ys4atzvl_pyx/_tmp_tmpbw1f5mpb_tmp_ys4atzvl_pyx_0.cpython-311-x86_64-linux-gnu.so'> > Even if we did, the default names for as, ld and ar are correct whenever the > command line tools are installed. So that block of code is completely > irrelevant for the macOS platform. This solves the problem. Anyway, instead of calling these all the time (this was done in https://github.com/sagemath/sage/issues/14296) we can let ./configure to fill in @AS@, @LD@, etc templates in build/bin/sage-build-env-config.in, and having the corresponding env. vars. initialised in build/bin/sage-build-env-config(.in). Dima > > - Marc > > > > On Tuesday, April 23, 2024 at 8:59:12 PM UTC-5 Gonzalo Tornaría wrote: >> >> https://github.com/sagemath/sage/blob/develop/src/bin/sage-env#L482 and L494 >> >> See: https://github.com/sagemath/sage/issues/14296 and >> https://github.com/sagemath/sage/commit/69213d74ead4e93687cf61f214b0d96dd3f9885a >> >> Maybe you can workaround this by setting AS=as and LD=ld in sage-env-config. >> >> HTH, >> Gonzalo >> >> >> On Tuesday, April 23, 2024 at 3:48:18 PM UTC-3 Marc Culler wrote: >>> >>> I discovered, by installing the Sage_macOS app on a pristine macOS system, >>> that somehow, somewhere, in Sage's startup sequence there is a call to gcc. >>> This is true whether Sage is being started from a command line or a >>> notebook. >>> >>> On such a macOS system /usr/bin/gcc exists, but calling it causes a dialog >>> to be posted which asks whether to download and install the Xcode "command >>> line tools". >>> >>> There is no need for a user to install, or be prompted to install, a C >>> compiler in order to run Sage. If we want to verify whether a C compiler >>> is installed on the host system then we should check the return value of >>> xcode-select -p rather than calling /usr/bin/gcc. >>> >>> I am unable to find where this call occurs. Do any of the Sage developers >>> know which component of Sage could be calling /usr/bin/gcc on start up? >>> >>> - Marc > > -- > 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/1fe1fca2-f228-45eb-9f43-a1d1be5d5895n%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/CAAWYfq2mdRtbkp4FKPob2eKn-tXku0AV99mLPNvtD31Lg-0JHw%40mail.gmail.com.