Compile Sage 8.9 on Opensuse Tumbleweed:Error building gfortran-7.4.0

60 views
Skip to first unread message

Shing Hing Man

unread,
Dec 21, 2019, 4:12:48 AM12/21/19
to sage-support
Hi,
  When I compile Sage 8.9 on Opensuse Tumbleweed, there is a problem building   gfortran-7.4.0 :
static library.  */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > ./libgcc_s.so
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching for -lc
/usr/bin/ld: i386 architecture of input file `/usr/lib/../lib/crti.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/usr/lib/../lib/crtn.o' is incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status
make[6]: *** [Makefile:982: libgcc_s.so] Error 1
make[6]: Leaving directory '/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build/x86_64-pc-linux-gnu/libgcc'
make[5]: *** [Makefile:11907: all-target-libgcc] Error 2
make[5]: Leaving directory '/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build'
make[4]: *** [Makefile:878: all] Error 2
make[4]: Leaving directory '/home/matmsh/installed/sages/sage-8.9/local/var/tmp/sage/build/gfortran-7.4.0/gcc-build'
********************************************************************************
Error building gfortran-7.4.0
********************************************************************************

I ran
  ./configure
  MAKE='make -12' make

Thanks in advance for any assistance !
Shing

Dima Pasechnik

unread,
Dec 21, 2019, 5:28:44 AM12/21/19
to sage-support
Do you have a 32-bit system?

Anyway, if you could install system's gfortran package it would be a way out of this.
It seems your system should have gfortran version 7,  the package is called gcc-fortran.

HTH
Dmitrii

--
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/4f8bac3b-7301-449b-af36-8cdf22569b32%40googlegroups.com.

Shing Hing Man

unread,
Dec 21, 2019, 6:59:22 AM12/21/19
to sage-support
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.

Thank you for your assistance !

Shing
To unsubscribe from this group and stop receiving emails from it, send an email to sage-s...@googlegroups.com.

Dima Pasechnik

unread,
Dec 21, 2019, 8:59:12 AM12/21/19
to sage-support
On Sat, Dec 21, 2019 at 7:59 PM 'Shing Hing Man' via sage-support
<sage-s...@googlegroups.com> 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.
> 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/eefa66a3-e921-4c4b-9b75-5e790c48ac4d%40googlegroups.com.

Shing Hing Man

unread,
Dec 25, 2019, 9:13:37 AM12/25/19
to 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

Dima Pasechnik

unread,
Dec 25, 2019, 12:25:03 PM12/25/19
to sage-support
On Wed, Dec 25, 2019 at 10:13 PM 'Shing Hing Man' via sage-support
<sage-s...@googlegroups.com> 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
> 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/58a911f4-36d2-4c8c-8265-17866f70be9c%40googlegroups.com.

Shing Hing Man

unread,
Dec 26, 2019, 4:58:37 AM12/26/19
to sage-support
Hi,
   You are correct that  in my config.log,  there is message saying "gcc- ... will not be installed" :

matmsh@euler:~/installed/sages/sage-8.9> grep gcc config.log  | grep install
configure:7665: === checking whether to install the gcc SPKG ===
configure:19813: result:     gcc-7.4.0 will not be installed (configure check)
matmsh@euler:~/installed/sages/sage-8.9>


I have done a rebuilt:
> make distclean && ./configure
> make

After the rebuilt,  the config.log still contains

matmsh@euler:~/installed/sages/sage-8.9> grep gfortran config.log  | grep install

configure:13595: === checking whether to install the gfortran SPKG ===
configure:19813: result:     gfortran-7.4.0 will not be installed (configure check)
matmsh@euler:~/installed/sages/sage-8.9> grep gcc config.log  | grep install
configure:7665: === checking whether to install the gcc SPKG ===
configure:19813: result:     gcc-7.4.0 will not be installed (configure check)


Below are intalled Fortran related rpm packages.
matmsh@euler:~/installed/sages/sage-8.9> rpm -qa | grep fortran
libgfortran4-7.5.0+r278197-1.1.x86_64
gcc9-fortran-32bit-9.2.1+r275327-1.3.x86_64
libgfortran5-9.2.1+r275327-1.3.x86_64
gcc-fortran-32bit-9-1.6.x86_64
libgfortran5-32bit-9.2.1+r275327-1.3.x86_64
gcc9-fortran-9.2.1+r275327-1.3.x86_64
gcc-fortran-9-1.6.x86_64
matmsh@euler:~/installed/sages/sage-8.9>



As Sage is working on my PC, I will leave it as it.
Thanks for your comments !

Shing

Morgen Waine

unread,
Dec 27, 2019, 10:44:20 PM12/27/19
to sage-s...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages