Re: [sage-support] Compile Sage 8.9 on Opensuse Tumbleweed:Error building gfortran-7.4.0

2019-12-25 Thread Dima Pasechnik
On Wed, Dec 25, 2019 at 10:13 PM 'Shing Hing Man' via sage-support
 wrote:
>
>
> Hi,
>   Below is a grep near a "neighbourbood" gfortran in my config.log.
>
Thanks. So one sees

configure:19813: result: gfortran-7.4.0 will not be installed
(configure check)

which means that Sage will not attempt to build its own gfortran.
I presume you also see

... result:   gcc-...   will not be installed (configure check)

Are you saying that despite this, an attempt is made to do so?
The only case this could happen is, I think, that you started a build
without gfortran installed, then
installed it, didn't

make distclean && ./configure

Dima
>
>
> matmsh@euler:~/installed/sage/logs/pkgs> grep -A 2 -B 2 gfortran  config.log
> configure:5920: checking dependency style of g++
> configure:6031: result: none
> configure:6099: checking for gfortran
> configure:6115: found /usr/bin/gfortran
> configure:6126: result: gfortran
> configure:6152: checking for Fortran compiler version
> configure:6161: gfortran --version >&5
> GNU Fortran (SUSE Linux) 9.2.1 20190903 [gcc-9-branch revision 275330]
> Copyright (C) 2019 Free Software Foundation, Inc.
> --
>
> configure:6172: $? = 0
> configure:6161: gfortran -v >&5
> Using built-in specs.
> COLLECT_GCC=gfortran
> COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/9/lto-wrapper
> OFFLOAD_TARGET_NAMES=hsa:nvptx-none
> --
> gcc version 9.2.1 20190903 [gcc-9-branch revision 275330] (SUSE Linux)
> configure:6172: $? = 0
> configure:6161: gfortran -V >&5
> gfortran: error: unrecognized command line option '-V'
> gfortran: fatal error: no input files
> compilation terminated.
> configure:6172: $? = 1
> configure:6161: gfortran -qversion >&5
> gfortran: error: unrecognized command line option '-qversion'; did you mean 
> '--version'?
> gfortran: fatal error: no input files
> compilation terminated.
> configure:6172: $? = 1
> configure:6181: checking whether we are using the GNU Fortran compiler
> configure:6194: gfortran -c   conftest.F >&5
> configure:6194: $? = 0
> configure:6203: result: yes
> configure:6209: checking whether gfortran accepts -g
> configure:6220: gfortran -c -g  conftest.f >&5
> configure:6220: $? = 0
> configure:6228: result: yes
> --
> configure:13454: result: no
> configure:13538: checking for Fortran flag needed to accept free-form source
> configure:13557: gfortran -c -g -O2  conftest.f >&5
> conftest.f:2:3:
>
> --
> |   'world.'
> |end
> configure:13557: gfortran -c -g -O2 -ffree-form  conftest.f >&5
> configure:13557: $? = 0
> configure:13566: result: -ffree-form
> configure:13595: === checking whether to install the gfortran SPKG ===
> configure:13682: === checking whether to install the git SPKG ===
> configure:13726: checking for git
> --
> configure:19809: result: gf2x-1.2.p0
> configure:19809: result: gfan-0.6.2.p1
> configure:19813: result: gfortran-7.4.0 will not be installed (configure 
> check)
> configure:19809: result: giac-1.5.0.63.p0
> configure:19809: result: giacpy_sage-0.6.7
> --
> ac_cv_prog_ac_ct_CC=gcc
> ac_cv_prog_ac_ct_CXX=g++
> ac_cv_prog_ac_ct_FC=gfortran
> ac_cv_prog_ac_ct_OBJC=gcc
> ac_cv_prog_ac_ct_OBJCXX=g++
> --
> gfan \
> gfan \
> gfortran \
> gfortran \
> giac \
> giac \
> --
> EGREP='/usr/bin/grep -E'
> EXEEXT=''
> FC='gfortran'
> FCFLAGS='-g -O2 -ffree-form'
> FREETYPE_CFLAGS=''
> --
> ac_ct_CC='gcc'
> ac_ct_CXX='g++'
> ac_ct_FC='gfortran'
> ac_ct_OBJC='gcc'
> ac_ct_OBJCXX='g++'
> --
> deps_appnope = $(PYTHON) | pip
> deps_arb = $(MP_LIBRARY) mpfr flint
> deps_atlas = gfortran | $(PYTHON)
> deps_autotools = ncurses git xz
> deps_awali = $(PYTHON) cmake cython nbconvert ncurses
> --
> deps_gf2x =
> deps_gfan = $(MP_LIBRARY) cddlib
> deps_gfortran = | $(MP_LIBRARY) mpfr mpc zlib xz
> deps_giac = readline libpng $(MP_LIBRARY) mpfr mpfi ntl gsl pari
> deps_giacpy_sage = $(PYTHON) cython giac cysignals | $(SAGERUNTIME) pip sympy 
> maxima
> --
> deps_notedown = $(PYTHON) setuptools | pip nbformat nbconvert six 
> pandoc_attributes
> deps_ntl = $(MP_LIBRARY) gf2x
> deps_numpy = $(PYTHON) $(BLAS) gfortran | setuptools pip pkgconfig cython
> deps_openblas = gfortran | $(PYTHON)
> deps_openssl =
> deps_ore_algebra = $(PYTHON) | setuptools pip
> --
> deps_qepcad = readline saclib
> deps_qhull = | cmake
> deps_r = $(BLAS) gfortran iconv readline bzip2 xz pcre curl | pkgconf
> deps_r_jupyter =  | $(STANDARD_PACKAGES)
> deps_ratpoints = $(MP_LIBRARY)
> --
> deps_scandir = $(PYTHON) | setuptools pip six
> deps_scipoptsuite = $(MP_LIBRARY) bliss readline | cmake
> deps_scipy = $(PYTHON) $(BLAS) gfortran numpy | pip
> deps_scons = $(PYTHON)
> deps_send2trash = $(PYTHON) | pip
> --
> vers_gf2x = 1.2.p0
> vers_gfan = 0.6.2.p1
> vers_gfortran = 7.4.0
> vers_giac = 1.5.0.63.p0
> vers_giacpy_sage = 0.6.7
> matmsh@euler:~/installed/sage/logs/pkgs>
>
> Shing
>
> On Saturday, December 21, 2019 at 1:59:12 PM UTC, Dima Pasechnik wrote:
>>
>> On Sat, Dec 21, 2019 at 7:59 PM 'Shing Hing Man' 

[sage-support] Re: Book with Sage (and Python 3)

2019-12-25 Thread Eric Gourgoulhon
Congratulations for the book. It looks very nice!

The switch to Python 3 shall take place in early January, with the release 
of SageMath 9.0.
You can see some details on https://wiki.sagemath.org/Python3-Switch.

As you say, your code examples are likely to work without any change, 
except for the print command, which must replaced by the print() function. 
A thing that certainly must be updated is the reference to Sage notebook in 
Sec. 1.8.1 (page 63): the default notebook is now Jupyter. It is launcher 
with
sage -n jupyter
not with notebook().
You can export your old Sage notebooks (*.sws) to the Jupyter format 
(*.ipynb) via the command
sage -n export

A big advantage of Jupyter notebooks is that it is very easy to share them 
online provided they are stored in some public repository, like github or 
gitlab: non-interactive versions are displayed with nbviewer.jupyter.org
while interactive ones are launched via  binder. 
You can see many examples here 
 (nbviewer) or here 
 
(binder).

Best wishes,

Eric.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/bae01e6d-4572-4c3e-ac5b-cf6bd50ee649%40googlegroups.com.


Re: [sage-support] Compile Sage 8.9 on Opensuse Tumbleweed:Error building gfortran-7.4.0

2019-12-25 Thread 'Shing Hing Man' via sage-support

Hi,
  Below is a grep near a "neighbourbood" gfortran in my config.log.



matmsh@euler:~/installed/sage/logs/pkgs> grep -A 2 -B 2 gfortran  
config.log   
configure:5920: checking dependency style of g++
configure:6031: result: none
configure:6099: checking for gfortran
configure:6115: found /usr/bin/gfortran
configure:6126: result: gfortran
configure:6152: checking for Fortran compiler version
configure:6161: gfortran --version >&5
GNU Fortran (SUSE Linux) 9.2.1 20190903 [gcc-9-branch revision 275330]
Copyright (C) 2019 Free Software Foundation, Inc.
--

configure:6172: $? = 0
configure:6161: gfortran -v >&5
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/9/lto-wrapper
OFFLOAD_TARGET_NAMES=hsa:nvptx-none
--
gcc version 9.2.1 20190903 [gcc-9-branch revision 275330] (SUSE Linux) 
configure:6172: $? = 0
configure:6161: gfortran -V >&5
gfortran: error: unrecognized command line option '-V'
gfortran: fatal error: no input files
compilation terminated.
configure:6172: $? = 1
configure:6161: gfortran -qversion >&5
gfortran: error: unrecognized command line option '-qversion'; did you mean 
'--version'?
gfortran: fatal error: no input files
compilation terminated.
configure:6172: $? = 1
configure:6181: checking whether we are using the GNU Fortran compiler
configure:6194: gfortran -c   conftest.F >&5
configure:6194: $? = 0
configure:6203: result: yes
configure:6209: checking whether gfortran accepts -g
configure:6220: gfortran -c -g  conftest.f >&5
configure:6220: $? = 0
configure:6228: result: yes
--
configure:13454: result: no
configure:13538: checking for Fortran flag needed to accept free-form source
configure:13557: gfortran -c -g -O2  conftest.f >&5
conftest.f:2:3:

--
|   'world.'
|end
configure:13557: gfortran -c -g -O2 -ffree-form  conftest.f >&5
configure:13557: $? = 0
configure:13566: result: -ffree-form
configure:13595: === checking whether to install the gfortran SPKG ===
configure:13682: === checking whether to install the git SPKG ===
configure:13726: checking for git
--
configure:19809: result: gf2x-1.2.p0
configure:19809: result: gfan-0.6.2.p1
configure:19813: result: gfortran-7.4.0 will not be installed 
(configure check)
configure:19809: result: giac-1.5.0.63.p0
configure:19809: result: giacpy_sage-0.6.7
--
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_ac_ct_FC=gfortran
ac_cv_prog_ac_ct_OBJC=gcc
ac_cv_prog_ac_ct_OBJCXX=g++
--
gfan \
gfan \
gfortran \
gfortran \
giac \
giac \
--
EGREP='/usr/bin/grep -E'
EXEEXT=''
FC='gfortran'
FCFLAGS='-g -O2 -ffree-form'
FREETYPE_CFLAGS=''
--
ac_ct_CC='gcc'
ac_ct_CXX='g++'
ac_ct_FC='gfortran'
ac_ct_OBJC='gcc'
ac_ct_OBJCXX='g++'
--
deps_appnope = $(PYTHON) | pip
deps_arb = $(MP_LIBRARY) mpfr flint
deps_atlas = gfortran | $(PYTHON)
deps_autotools = ncurses git xz
deps_awali = $(PYTHON) cmake cython nbconvert ncurses
--
deps_gf2x = 
deps_gfan = $(MP_LIBRARY) cddlib
deps_gfortran = | $(MP_LIBRARY) mpfr mpc zlib xz
deps_giac = readline libpng $(MP_LIBRARY) mpfr mpfi ntl gsl pari
deps_giacpy_sage = $(PYTHON) cython giac cysignals | $(SAGERUNTIME) pip 
sympy maxima
--
deps_notedown = $(PYTHON) setuptools | pip nbformat nbconvert six 
pandoc_attributes
deps_ntl = $(MP_LIBRARY) gf2x
deps_numpy = $(PYTHON) $(BLAS) gfortran | setuptools pip pkgconfig cython
deps_openblas = gfortran | $(PYTHON)
deps_openssl = 
deps_ore_algebra = $(PYTHON) | setuptools pip
--
deps_qepcad = readline saclib
deps_qhull = | cmake
deps_r = $(BLAS) gfortran iconv readline bzip2 xz pcre curl | pkgconf
deps_r_jupyter =  | $(STANDARD_PACKAGES)
deps_ratpoints = $(MP_LIBRARY)
--
deps_scandir = $(PYTHON) | setuptools pip six
deps_scipoptsuite = $(MP_LIBRARY) bliss readline | cmake
deps_scipy = $(PYTHON) $(BLAS) gfortran numpy | pip
deps_scons = $(PYTHON)
deps_send2trash = $(PYTHON) | pip
--
vers_gf2x = 1.2.p0
vers_gfan = 0.6.2.p1
vers_gfortran = 7.4.0
vers_giac = 1.5.0.63.p0
vers_giacpy_sage = 0.6.7
matmsh@euler:~/installed/sage/logs/pkgs> 

Shing

On Saturday, December 21, 2019 at 1:59:12 PM UTC, Dima Pasechnik wrote:
>
> On Sat, Dec 21, 2019 at 7:59 PM 'Shing Hing Man' via sage-support 
> > wrote: 
> > 
> > My CPU is AMD Ryzen 2700X, so it is 64bit. 
> > 
> > I already have gcc-fortran-9-1.6.x86_64 
> >   installed when I did the build earlier. 
> > 
> > After I install gcc-fortran-32bit-9-1.6.x86_64,  and then do a make (on 
> a new sage-8.9 folder) , the error on gfortran disappeared and  sage has 
> built. 
>
> but why do you need a 32-bit gfortran? Is something getting misconfigured? 
>
> Could you post the output of Sage's config.log if you use the "normal" 
> gfortran? 
>
> Thanks. 
>
> > 
> > Thank you for your assistance ! 
> > 
> > Shing 
> > 
> > 
> > 
> > On Saturday, December 21, 2019 at 10:28:44 AM UTC, Dima Pasechnik wrote: 
> >> 
> >> Do you have a 32-bit system? 
> >> 
> >> Anyway, if you could install system's gfortran package it would be a 
> way out of this.