Error Building on Slackware 14.2

91 views
Skip to first unread message

Christopher Duston

unread,
Mar 17, 2020, 3:56:49 PM3/17/20
to sage-devel
I've got an error when compiling SageMath 9.0 from source on a Slackware 14.2 machine. I've done this without error on a different machine with an identical OS, so I am a little mystified. The message is


The following package(s) may have failed to build (not necessarily
during
this run of 'make all-build'):

* package: iml-1.0.4p1.p2
  log file
: /tmp/SBo/sage-9.0/logs/pkgs/iml-1.0.4p1.p2.log
  build directory
: /tmp/SBo/sage-9.0/local/var/tmp/sage/build/iml-1.0.4p1.p2



The relevant section of the log file (which is attached in full) is


/usr/bin/bash ../libtool --tag=CC   --mode=link gcc -I///usr/include -I/tmp/SBo/
sage
-9.0/local/include  -I. -O3 -g  -version-info 1:1:1  -L/tmp/SBo/sage-9.0/loc
al
/lib -Wl,-rpath,/tmp/SBo/sage-9.0/local/lib  -lm -o libiml.la -rpath /tmp/SBo/
sage
-9.0/local/lib libiml_la-basisop.lo libiml_la-certsolve.lo libiml_la-error.l
o libiml_la
-latreduce.lo libiml_la-memalloc.lo libiml_la-mtrans.lo libiml_la-non
sysolve
.lo libiml_la-padiclift.lo libiml_la-reconsolu.lo libiml_la-RNSop.lo libi
ml_la
-nullspace.lo -L///usr/lib -lgmp -L/tmp/SBo/sage-9.0/local/lib -lgmp -L/tmp
/SBo/sage-9.0/local/lib -L/tmp/SBo/sage-9.0/local/lib -lopenblas  
libtool
: link: gcc -shared  -fPIC -DPIC  .libs/libiml_la-basisop.o .libs/libiml_
la
-certsolve.o .libs/libiml_la-error.o .libs/libiml_la-latreduce.o .libs/libiml_
la
-memalloc.o .libs/libiml_la-mtrans.o .libs/libiml_la-nonsysolve.o .libs/libiml
_la
-padiclift.o .libs/libiml_la-reconsolu.o .libs/libiml_la-RNSop.o .libs/libiml
_la
-nullspace.o   -L/tmp/SBo/sage-9.0/local/lib -lm -L///usr/lib /usr/lib/libgmp
.so -lopenblas  -O3 -Wl,-rpath -Wl,/tmp/SBo/sage-9.0/local/lib   -Wl,-soname -Wl
,libiml.so.0 -o .libs/libiml.so.0.1.1
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../x86_64-slackware-linux/b
in/ld: skipping incompatible ///usr/lib/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../x86_64-slackware-linux/b
in/ld: skipping incompatible ///usr/lib/libm.a when searching for -lm
/usr/lib/libgmp.so: error adding symbols: File in wrong format
collect2
: error: ld returned 1 exit status
Makefile:373: recipe for target 'libiml.la' failed
make
[6]: *** [libiml.la] Error 1
make
[6]: Leaving directory '/tmp/SBo/sage-9.0/local/var/tmp/sage/build/iml-1.0.4
p1.p2/src/src'



Info about my machine:

$ uname -a
Linux Zonadar 4.4.14 #1 SMP Fri Jun 24 13:30:15 CDT 2016 x86_64 Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz GenuineIntel GNU/Linux


Any thoughts?
iml-1.0.4p1.p2.log

Matthias Koeppe

unread,
Mar 17, 2020, 4:10:57 PM3/17/20
to sage-devel
Please post the top-level config.log too

Christopher Duston

unread,
Mar 17, 2020, 4:19:53 PM3/17/20
to sage-...@googlegroups.com
Attached - sorry about that.

--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/WshDn3e_l3k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/0b7fb664-ac8a-47ba-89cb-2bbc8abeb34b%40googlegroups.com.
config.log

Matthias Koeppe

unread,
Mar 17, 2020, 5:15:20 PM3/17/20
to sage-devel
Thanks. And the output of "slackpkg generate-template" please if that works for you
To unsubscribe from this group and all its topics, send an email to sage-...@googlegroups.com.

Christopher Duston

unread,
Mar 17, 2020, 5:18:50 PM3/17/20
to sage-...@googlegroups.com
Of course:

# slackpkg generate-template
slackpkg - version 2.82.1

Usage:
slackpkg [OPTIONS] {install|remove|search|file-search|
   upgrade|reinstall|blacklist} {PATTERN|FILE}
slackpkg [OPTIONS] {generate-template|install-template|remove-template}
  TEMPLATENAME
slackpkg [OPTIONS] info PACKAGE
slackpkg [OPTIONS] update [gpg]
slackpkg [OPTIONS] {clean-system|upgrade-all|install-new}
slackpkg [OPTIONS] {new-config|check-updates|help}

If you need more information try to use 'slackpkg help' or look the
slackpkg's manpage.

Thanks for your attention.

To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/126a85d3-77ae-495f-b032-a2e2b4279075%40googlegroups.com.

Matthias Koeppe

unread,
Mar 17, 2020, 5:21:42 PM3/17/20
to sage-devel
OK, please try this:

slackpkg generate-template d; cat /etc/slackpkg/templates/d.template 

Matthias Koeppe

unread,
Mar 17, 2020, 5:53:03 PM3/17/20
to sage-devel
On Tuesday, March 17, 2020 at 3:56:49 PM UTC-4, Christopher Duston wrote:
I've got an error when compiling SageMath 9.0 from source on a Slackware 14.2 machine.

I have set up a test environment for Slackware (tox -e docker-slackware-14.2) at https://trac.sagemath.org/ticket/29354 

Christopher Duston

unread,
Mar 18, 2020, 4:16:59 PM3/18/20
to sage-...@googlegroups.com
I ran those two commands, and piped the output to a file, attached here.

Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/WshDn3e_l3k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/53f714b5-be91-4a06-9a4d-640363820e1d%40googlegroups.com.
packagelist.log

Matthias Koeppe

unread,
Mar 19, 2020, 11:37:06 PM3/19/20
to sage-devel
Thanks. I have recreated a similar configuration (slackware-14.2-standard - https://trac.sagemath.org/ticket/29354), but cannot seem to reproduce the error. iml installs correctly for me. 

Looking at your log files, these lines look rather suspicious:
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible ///usr/lib/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible ///usr/lib/libm.a when searching for -lm
/usr/lib/libgmp.so: error adding symbols: File in wrong format

Did you install libraries for cross compilation to other architecture (including 32bit) by any chance?

It would be worth checking when reinstalling the slackware "gmp" package fixes this problem.



On Wednesday, March 18, 2020 at 4:16:59 PM UTC-4, Christopher Duston wrote:
I ran those two commands, and piped the output to a file, attached here.

Thanks.

On Tue, Mar 17, 2020 at 5:53 PM Matthias Koeppe <matthia...@gmail.com> wrote:
On Tuesday, March 17, 2020 at 3:56:49 PM UTC-4, Christopher Duston wrote:
I've got an error when compiling SageMath 9.0 from source on a Slackware 14.2 machine.

I have set up a test environment for Slackware (tox -e docker-slackware-14.2) at https://trac.sagemath.org/ticket/29354 

--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/WshDn3e_l3k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-...@googlegroups.com.

Christopher Duston

unread,
Jun 4, 2020, 2:42:49 PM6/4/20
to sage-...@googlegroups.com
I'd like to follow up on this - the real issue is that when building iml the libraries are hardcoded to reside at /lib, but in multilib systems this may not be the case. Specifically, in Slackware we have lib for 32-bit and lib64 for 64-bit. I fixed this by changing this line in build/pkgs/iml/spkg-install.in:

SAGE_GMP_LIB="`echo "$SAGE_GMP_INCLUDE" | sed 's|/include|/lib|'`"

to this:

SAGE_GMP_LIB="`echo "$SAGE_GMP_INCLUDE" | sed 's|/include|/lib{$LIBDIRSUFFIX}|'`"

where LIBDIRSUFFIX is specified by our build to be null for 32-bit or 64 for 64-bit. I've attached our patch here for reference, but I would appreciate a fix in the Sage build directly.

Thanks.

To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e43d858d-dab5-49a5-ad14-8d507e7484ca%40googlegroups.com.
iml.patch

Matthias Koeppe

unread,
Jun 4, 2020, 3:47:01 PM6/4/20
to sage-devel
Thanks. I have created https://trac.sagemath.org/ticket/29795 for this issue.

Could you advise how to create a multilib slackware configuration? 

Christopher Duston

unread,
Jun 4, 2020, 6:08:07 PM6/4/20
to sage-...@googlegroups.com
Thanks, I appreciate the attention.

Instructions for making Slackware multilib can be found here: https://docs.slackware.com/slackware:multilib. "Quick and Dirty" instructions are about 20% of the way down.

I should note that multilib is not officially supported by either Slackware or Slackbuilds, but when possible we try to build in that flexibility.

To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/643935f2-f66b-4b4f-8ac1-eb34937dadcao%40googlegroups.com.

Matthias Koeppe

unread,
Jun 4, 2020, 6:31:42 PM6/4/20
to sage-devel
Thanks. I have created https://trac.sagemath.org/ticket/29798 for adding a slackware-multilib test environment to our tox.ini. Would you be interested in helping with this? See https://doc.sagemath.org/html/en/developer/portability_testing.html for an overview.

Christopher Duston

unread,
Jun 10, 2020, 1:30:10 PM6/10/20
to sage-...@googlegroups.com
I am interested in helping with this - I just want to be clear because I don't have much experience with containers. If we add an entry to the tox.ini corresponding to slackware-14.2-multilib, it would allow for the automatic testing of Sage in that OS?

I have gone through the portability wiki, so as long as you can confirm I've understood correctly, I will get started on it.

To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/68872583-b5b2-44ad-945e-b013e6adc34ao%40googlegroups.com.

Matthias Koeppe

unread,
Jun 10, 2020, 2:06:29 PM6/10/20
to sage-devel
On Wednesday, June 10, 2020 at 10:30:10 AM UTC-7, Christopher Duston wrote:
I am interested in helping with this - I just want to be clear because I don't have much experience with containers.

It's easy to start by just taking an existing Dockerfile (that tox.ini generates) and adding steps (shell commands).
 
If we add an entry to the tox.ini corresponding to slackware-14.2-multilib, it would allow for the automatic testing of Sage in that OS?

That's right. 
 
I have gone through the portability wiki, so as long as you can confirm I've understood correctly, I will get started on it.

I gave a tutorial on it at the recent SageDays - https://researchseminars.org/talk/SageDays109/7/ - this may be a starting point.

Reply all
Reply to author
Forward
0 new messages