compiling error for 8.8.beta6 on Red Hat 6.10

205 views
Skip to first unread message

Christian Stump

unread,
May 27, 2019, 12:51:50 PM5/27/19
to sage-devel
I am getting errors building

* package: gfan-0.6.2.p1
* package: ppl-1.2.p1

please see the attached logs.

For ppl

configure: error: Cannot find GMP version 4.1.3 or higher.

and for gfan

./gfan: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./gfan)
./gfan: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./gfan)
./gfan: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./gfan)
./gfan: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./gfan)
./gfan: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./gfan)

Help appreciated!

I do not have admin rights on that machine but the admin says that all prerequisites in


are fulfilled.


SAGE_FAT_BINARY=yes ./sage -f mpir

didn't seem to work...

Thanks,
Christian

Christian Stump

unread,
May 28, 2019, 12:53:31 AM5/28/19
to sage-devel
(only realizing now that the "attaching the logs" failed yesterday...)
ppl-1.2.p1.log
gfan-0.6.2.p1.log

Dima Pasechnik

unread,
May 28, 2019, 3:55:08 AM5/28/19
to sage-devel
could you attach Sage's config.log ?
I suspect that the system installation of GMP is a bit broken or incomplete, or perhaps there are more than one, and they clash. (and our recent GMP checking code fails to pick it up)

is it a fresh install, or an update?

------
anyhow, you can force the use of Sage's mpir by supplying an appropriate option to ./configure.





On Tue, 28 May 2019 06:53 Christian Stump, <christi...@gmail.com> wrote:
(only realizing now that the "attaching the logs" failed yesterday...)

--
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 post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/bdc55a6a-7077-481e-add5-e0fb53195b8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dima Pasechnik

unread,
May 28, 2019, 4:34:29 AM5/28/19
to sage-devel
I suspect you don't have libgmpxx installed. What is the output of

$ find /usr/ -name libgmpxx.so*

and of

$ find /usr/ -name libgmp.so*

Christian Stump

unread,
May 28, 2019, 7:50:46 AM5/28/19
to sage-devel
Thanks Dima! -- here is the requested information:

It's a fresh install, config.log is attached. In just this moment, the system admin told me that he was able to compile sage-8.6 using the standard gcc compiler by RHEL6 (this is copy-and-paste, I don't know what that means), while the error remains compiling sage-8.7.

$ find /usr/ -name libgmpxx.so*
find: `/usr/lib64/audit': Permission denied
/usr/lib64/libgmpxx.so
/usr/lib64/libgmpxx.so.4
/usr/lib64/libgmpxx.so.4.1.0

$  find /usr/ -name libgmp.so*
find: `/usr/lib64/audit': Permission denied
/usr/lib64/libgmp.so
/usr/lib64/libgmp.so.3.5.0
/usr/lib64/libgmp.so.3
/usr/lib64/openssl/engines/libgmp.so
config.log

Dima Pasechnik

unread,
May 28, 2019, 8:54:26 AM5/28/19
to sage-devel
your gmp looks old (or perhaps unmatched versions of gmp and gmpxx).
Can you ask for a recent GMP/GMPXX version (6.1, say) to be installed?

or indeed use Sage's mpir or gmp, by running

./configure --with-mp=mpir
make

(see the output of ./configure -h for more details)

The gfan problem looks unrelated to gmp, it's more about something
weird in LD_LIBRARY_PATH or something like this.




> --
> 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 post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/f3b98cae-0bf9-44ea-8a23-b8049e18986c%40googlegroups.com.

Christian Stump

unread,
May 28, 2019, 10:17:49 AM5/28/19
to sage-devel
> ./configure --with-mp=mpir
> make

This did not work -- but if I do not provide any gcc, sage compiles its own and this works for gcc-7.2.0 on sage-8.6 while it does not work for the same gcc-7.2.0 on sage-8.7. You find the log for the failing gcc-7.2.0 attached.
gcc-7.2.0.log.gz

Dima Pasechnik

unread,
May 28, 2019, 12:36:44 PM5/28/19
to sage-devel
well, building gcc 7 with a 7-years old complier (gcc version 4.4.7
20120313 (Red Hat 4.4.7-23), as the log says)
probably not possible.
Do they have something newer installed?
> --
> 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 post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/5f9d35b2-f5d3-4a66-ab67-bbd40f1ce30b%40googlegroups.com.

Christian Stump

unread,
May 28, 2019, 12:43:45 PM5/28/19
to sage-devel
> well, building gcc 7 with a 7-years old complier (gcc version 4.4.7
> 20120313 (Red Hat 4.4.7-23), as the log says)
> probably not possible.
> Do they have something newer installed?

They did install for me both gcc-7.2.0 (didn't work) and gcc-7.3.0 (didn't work either).

Let me emphasize again that their setup (with the old gcc 4.x.x) let me compile a fresh sage-8.6 without any trouble, only when trying sage-8.7, the error occurs. Doesn't that suggest that the issue is not the old compiler?

Dima Pasechnik

unread,
May 28, 2019, 1:15:08 PM5/28/19
to sage-devel
the final error in your gcc build log :

/lib/crti.o: could not read symbols: File in wrong format

suggests that something is messed up w.r.t. 32- vs 64-bit support.
It probably should have used /lib64/crti.o

So something is dodgy with the environment on your machine (gfan error
you posted looks of the same sort).
Probably it is assumed you must have something nontrivial in LDFLAGS or so.
(or maybe you do have something in LDFLAGS or other similar variable
that should not be there)
E.g. gfan did not link to the right libraries for no apparent reason whatsoever.

Since 8.6 there were several chnages in how Sage is built, e.g. in the
minimum C++ standard requied (gnu++11 now), some changes in how there
32- vs 64-bit issues are handled, etc., this might explian why 8.6
still works.


> --
> 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 post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/d41ea0d0-d463-4d93-8895-7a4a17802716%40googlegroups.com.

Christian Stump

unread,
May 29, 2019, 2:08:24 AM5/29/19
to sage-devel
Okay, thank you for checking -- I think that machine needs some upgrades!

In case anyone else runs into this issue, here is a partial fix: I first compiled 8.6 from scratch and then upgraded to 8.8.beta6 and this worked.

Unfortunately, my own code on top of 8.8.beta6 again does not build with the attached output.

(Btw: the reason for me to be depending on that machine is that it has 100 threads and 1tb memory.)
out.log

Dima Pasechnik

unread,
May 29, 2019, 5:33:03 AM5/29/19
to sage-devel
assembly errors - means either broken toolchain (old `as` picked up ?), or a failure to detect the correct architecture...

I guess sysadmins of this system see such errors every day, given how messy that setup is.

--
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 post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.

Matthias Koeppe

unread,
May 31, 2019, 2:44:20 PM5/31/19
to sage-devel
I've encountered similar, but different, problems on a different Linux system. Opened https://trac.sagemath.org/ticket/27907 for this. 
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.

Christian Stump

unread,
Jun 3, 2019, 3:43:10 AM6/3/19
to sage-devel
It appears that it is not an issue of this particular old system as Matthias pointed out. I would appreciate further help at https://trac.sagemath.org/ticket/27907 to figure out how to provide the correct version of

    [gcc-7.2.0] /usr/lib/../lib/crti.o: could not read symbols: File in wrong format

during the build of gcc-7.2.0 ?

Many thanks, Christian

Christian Stump

unread,
Jun 3, 2019, 4:21:08 AM6/3/19
to sage-devel
@Matthias, I attach the latest log based on your 73be6cf.
config.log

Christian Stump

unread,
Jun 4, 2019, 10:32:01 AM6/4/19
to sage-devel
I finally got

[gcc-7.2.0] Successfully installed gcc-7.2.0

using Matthias' solution. Unfortunately, then the next build of mpir-3.0.0 fails with "no compiler found" (with and without the --with-mp=mpir flag set), see the two attached logs.
config.log
mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868.p0.log

Matthias Koeppe

unread,
Jun 4, 2019, 2:00:16 PM6/4/19
to sage-devel
Could you post the config.log from the mpir build directory (/tmp/stumpcl2/sage/local/var/tmp/sage/build/mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868.p0/src/config.log)


 

Christian Stump

unread,
Jun 4, 2019, 2:12:01 PM6/4/19
to sage-devel
here comes

/tmp/stumpcl2/sage/local/var/tmp/sage/build/mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868.p0/src/config.log
config.log

Matthias Koeppe

unread,
Jun 4, 2019, 2:20:37 PM6/4/19
to sage-devel
What does 

ls -l local/lib/gcc/*/7.2.0/*crt*

say


On Tuesday, June 4, 2019 at 11:12:01 AM UTC-7, Christian Stump wrote:
here comes

/tmp/stumpcl2/sage/local/var/tmp/sage/build/mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868.p0/src/config.log

Christian Stump

unread,
Jun 4, 2019, 2:30:22 PM6/4/19
to sage-devel
[stumpcl2@dlp762 ~]$ cd progs/sage/
[stumpcl2@dlp762 sage]$ ls -l local/lib/gcc/*/7.2.0/*crt*
-rw-r--r-- 1 stumpcl2 15301 2896  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtbegin.o
-rw-r--r-- 1 stumpcl2 15301 3224  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtbeginS.o
-rw-r--r-- 1 stumpcl2 15301 3392  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtbeginT.o
-rw-r--r-- 1 stumpcl2 15301 1904  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtend.o
-rw-r--r-- 1 stumpcl2 15301 1904  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtendS.o
-rw-r--r-- 1 stumpcl2 15301 3752  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtfastmath.o
lrwxrwxrwx 1 stumpcl2 15301   23  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/*crt?.o -> @SAGE_CRTI_DIR@/*crt?.o
-rw-r--r-- 1 stumpcl2 15301 3368  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtprec32.o
-rw-r--r-- 1 stumpcl2 15301 3376  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtprec64.o
-rw-r--r-- 1 stumpcl2 15301 3368  4. Jun 16:22 local/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtprec80.o

Matthias Koeppe

unread,
Jun 5, 2019, 12:44:21 AM6/5/19
to sage-devel
Something went really wrong there with the symbolic linking script that I added in https://git.sagemath.org/sage.git/commit/?id=73be6cf53f30b53e5a8a3dedf8f30c2c9960475a

Matthias Koeppe

unread,
Jun 5, 2019, 12:49:30 AM6/5/19
to sage-devel
The bad symlink there was probably generated when you didn't regenerate "configure".
Could you check that this time  SAGE_CRTI_DIR has been correctly substituted in src/bin/sage-env-config (and local/bin/sage-env-config)?

Christian Stump

unread,
Jun 5, 2019, 1:06:07 AM6/5/19
to sage-devel
No, it hasn't. I just did "make distclean" and then "./configure" which recreated src/bin/sage-env-config, but it says

export SAGE_CRTI_DIR="@SAGE_CRTI_DIR@"

Christian Stump

unread,
Jun 5, 2019, 1:26:00 AM6/5/19
to sage-devel
Following the setting of SAGE_CRTI_DIR in "build/pkgs/gcc/spkg-configure.m4" seems to work:

(sage-sh) stumpcl2@dlp762:sage$ echo $CC
gcc
(sage-sh) stumpcl2@dlp762:sage$ echo $CRTI

(sage-sh) stumpcl2@dlp762:sage$ CRTI=`$CC -print-file-name=crti.o 2>/dev/null || true`
(sage-sh) stumpcl2@dlp762:sage$ echo $CRTI
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crti.o
(sage-sh) stumpcl2@dlp762:sage$ SAGE_CRTI_DIR=$(dirname -- "$CRTI")
(sage-sh) stumpcl2@dlp762:sage$ echo $SAGE_CRTI_DIR
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64

Christian Stump

unread,
Jun 5, 2019, 11:08:53 AM6/5/19
to sage-devel
Here is the latest updates:

1. After setting

# Location of system crti.o, in case we build our own gcc
export SAGE_CRTI_DIR="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64"

in src/bin/sage-env-config.in by hand, the compilation of 8.8.beta7 with #27907 merged now works. Many thanks to Matthias for fixing this (beside the very last tweak)!

The assembler errors I reported at https://groups.google.com/d/msg/sage-devel/ze5SzgXZAgk/_cc8UVbhAQAJ are still there, though. Additional thoughts how to tackle these?

Thanks
Christian

Christian Stump

unread,
Jun 5, 2019, 11:51:23 AM6/5/19
to sage-devel
> Additional thoughts how to tackle these?

Okay, I got this working too now -- thanks again, it works and I can try to get further with the research problem we look at!
Reply all
Reply to author
Forward
0 new messages