Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$SAGE_LOCAL/lib and lib64 #12131

Closed
vbraun opened this issue Dec 9, 2011 · 62 comments
Closed

$SAGE_LOCAL/lib and lib64 #12131

vbraun opened this issue Dec 9, 2011 · 62 comments

Comments

@vbraun
Copy link
Member

vbraun commented Dec 9, 2011

Some distributions set up autotools to install libraries into %{prefix}/lib64, which breaks Sage's assumption that libraries are installed in $SAGE_LOCAL/lib. In particular, OpenSuse64 according to this thread https://groups.google.com/d/topic/sage-devel/LS-u8E77NJQ/discussion

It seems like we have two options:

  • Always call ./configure --libdir='${prefix}/lib' to explicitly specify the library directory, or
  • Set up a symlink $SAGE_LOCAL/lib64 -> $SAGE_LOCAL/lib.

The symlink is the lazy thing to do but will probably break again with the next architectural change. Fixing the configure call seems the right thing to do but will need some work to patch up all spkgs.

Updated spkgs:

Note that I based the r-package on the version from #12057 (which has already been fixed); note that #12057 also contains a patch that needs to be applied.

Similarly, the mpir package is based on the version from #12139.

Depends on #12057
Depends on #12139

CC: @simon-king-jena @malb

Component: build

Author: Volker Braun, Simon King

Reviewer: Simon King, Volker Braun

Merged: sage-4.8.alpha5

Issue created by migration from https://trac.sagemath.org/ticket/12131

@vbraun
Copy link
Member Author

vbraun commented Dec 9, 2011

comment:1

Thomas Hupfer wrote:

In my handwritten notes I find besides readline that libgmp.so.3,
libmftr.so, and libcddgmp.a were in lib64, but this list is probably
incomplete. These errors showed up in building ecl, mpfi, gfan and maxima.

@vbraun
Copy link
Member Author

vbraun commented Dec 9, 2011

comment:2

For the record, Thomas Hupfer further wrote:

grep "local/lib64/" install.log | grep "^/usr/bin/install" | cut -d
4 -f 2 | cut -d / -f 2 | cut -d . -f 1 | sort | uniq

gives:

ecl-11
libcord
libfplll
libfreetype
libgc
libgcrypt
libgd
libgivaro
libgmp
libgmpxx
libgnutls
libgnutls-extra
libgnutls-openssl
libgpg-error
libiml
liblinbox
liblinboxsage
libmpfi
libmpir
libmpirxx
libopencdk
libsqlite3
python2

@simon-king-jena
Copy link
Member

comment:3

Volker has posted an updated readline spkg. It use

./configure --libdir="$SAGE_LOCAL/lib"

Similarly, I changed the python-2.6.4 spkg (not posted yet).

I wonder: Is the `--libdir=..." option is also valid on Solaris?

Meanwhile, my openSUSE laptop is in the middle of building Atlas. Hence, it looks good, so far!

@vbraun
Copy link
Member Author

vbraun commented Dec 9, 2011

comment:4

I tested the new readline on mark/skynet (Solaris SPARC) and it works.

@vbraun

This comment has been minimized.

@simon-king-jena
Copy link
Member

comment:5

Replying to @vbraun:

I tested the new readline on mark/skynet (Solaris SPARC) and it works.

Great! Meanwhile I have a new python-2.6.4.p12.spkg and an mpir-1.2.2.p8.spkg. The next problem is that ecl can't find libgc, so that's the next thing I have to modify.

@simon-king-jena
Copy link
Member

comment:6

Hooray! Fixing mpir and boehm_gc was enough to make ecl build!! I am looking forward to the next error...

@simon-king-jena
Copy link
Member

comment:7

The next problem is givaro, which hits linbox.

@simon-king-jena
Copy link
Member

comment:8

... followed by mpfr and mpfi

@simon-king-jena
Copy link
Member

comment:9

I made some progress by modifying the following spkgs:

  • readline (I used Volker's version)
  • python
  • mpir
  • boehm_gc
  • givaro
  • mpfr
  • mpfi
  • r

Now it hangs in the Sage library code, more precisely: In M4RI. Therefore I am Cc'ing Martin. I will try to modify the M4RI spkg (and then probably M4RIE, too).

My install.log is here, probably with some leftovers of previous build attempts.

@simon-king-jena
Copy link
Member

comment:10

I forgot to Cc Martin, even though I had announced it in my previous comment...

@simon-king-jena
Copy link
Member

comment:11

According to sage-devel, we could make this a blocker for sage-5.0.

The sage installation on my openSUSE laptop is now almost completed, but just as I write this line, there is yet another library that can't be found.

Here is the suggested work plan:

New package versions

Use the following updated spkgs (the first is contributed by Volker, and I'll provide the others probably later today:

  • python-2.6.4.p12.spkg
  • mpir-1.2.2.p8.spkg
  • boehm_gc-7.2.alpha6.p1.spkg
  • givaro-3.2.13rc2.p3.spkg
  • mpfr-2.4.2.p0.spkg
  • mpfi-1.3.4-cvs20071125.p9.spkg
  • r-2.10.1.p5.spkg
  • libm4ri-2011004.p0.spkg
  • libm4rie-2011004.p0.spkg
  • cddlib-094f.p9.spkg
  • maxima-5.23.2.p3.spkg
  • ecl-11.1.2.cvs20111120.p1.spkg
  • libpng-1.2.35.p4.spkg
  • iml-1.0.1.p14.spkg
  • pynac-0.2.3.p0.spkg
  • linbox-1.1.6.p6.spkg
  • glpk-4.44.p0.spkg

Perhaps there will be more than that, but so far it seems to work: Sage is already creating the docs!

Testing

In addition to the new spkgs, I have LD_LIBRARY_PATH defined. It would be interesting to know whether it would also work without defining it.

@malb
Copy link
Member

malb commented Dec 10, 2011

comment:12

M4RI(E) uses fairly standard autoconf (me thinks) so ./configure --libdir='${prefix}/lib' should work. Fingers crossed!

@jdemeyer
Copy link
Contributor

comment:13

Some of the spkg versions are based on old versions and should be updated:

(all these got positive_review).

@simon-king-jena
Copy link
Member

comment:14

OK, Jeroen's remark means more work. I need to get python, mpir, boehm_gc and r in the most recent versions.

Question: Martin seems to suggest to use --libdir="${prefix}/lib" rather than --libdir="$SAGE_LOCAL/lib" in M4RI(E). Is this a rule that applies to other packages as well?

@simon-king-jena
Copy link
Member

comment:15

Replying to @simon-king-jena:

OK, Jeroen's remark means more work. I need to get python, mpir, boehm_gc and r in the most recent versions.

Not mpir, since I started with alpha3 (which does contain the new mpir).

@jdemeyer
Copy link
Contributor

comment:16

In the post above you mention mpir-1.2.2.p8.spkg

mpir should also be coordinated with #12139. I am planning to work on it this weekend.

@simon-king-jena
Copy link
Member

comment:17

Replying to @jdemeyer:

In the post above you mention mpir-1.2.2.p8.spkg

mpir should also be coordinated with #12139. I am planning to work on it this weekend.

Question to the release manager:

Why is mpir-1.2.2.p8 from #11964 not in alpha3, even though it is supposed to be merged in alpha0?

@malb
Copy link
Member

malb commented Dec 10, 2011

comment:18

Replying to @simon-king-jena:

Question: Martin seems to suggest to use --libdir="${prefix}/lib" rather than --libdir="$SAGE_LOCAL/lib" in M4RI(E). Is this a rule that applies to other packages as well?

Nevermind me, I just tried to say: whatever you do for standard packages, it should work for M4RI(E). I don't know which one is better of the two options you mentioned above.

@simon-king-jena
Copy link
Member

comment:19

Yesssss!!

Sage starts on my laptop, and maxima(1) does work!

I will now get the updated packages from the other tickets and modify them. Because of coordination with #12139, I will not post a new mpir here, but leave it to Jeroen to insert --libdir into mpir.

@jdemeyer
Copy link
Contributor

comment:20

Replying to @simon-king-jena:

Why is mpir-1.2.2.p8 from #11964 not in alpha3, even though it is supposed to be merged in alpha0?

I don't understand your question. #11964 has mpir-2.1.3.p7.spkg which is merged in sage-4.8.alpha0 and still is in sage-4.8.alpha3.

@simon-king-jena
Copy link
Member

comment:36

I will see what I can do. Since my laptop is at home, I can't work on it right now. Also, I think it would be better to update the givaro package on a different ticket.

I did not change executability of spkg-check in givaro and did not change the permissions if cddlib, gd and iml. But if you like, I can take care of that.

@jdemeyer
Copy link
Contributor

comment:37

Replying to @simon-king-jena:

Also, I think it would be better to update the givaro package on a different ticket.

Sure, but al least correct the spkg version name to 3.2.13rc1

I did not change executability of spkg-check in givaro and did not change the permissions if cddlib, gd and iml. But if you like, I can take care of that.

Yes please, these should be trivial fixes.

@jdemeyer
Copy link
Contributor

comment:38

opencdk, mpfi: also fix permissions as above

ppl: spkg-install should be executable

@simon-king-jena
Copy link
Member

comment:39

How could ppl possibly work if spkg-install is not executable??

@simon-king-jena
Copy link
Member

comment:40

PS: How do I make it executable? By chmod ugo+rx spkg-install?

@vbraun
Copy link
Member Author

vbraun commented Dec 12, 2011

comment:41

Replying to @simon-king-jena:

How could ppl possibly work if spkg-install is not executable??

It works because the sage-spkg script makes spkg-install executable before running it.

@vbraun
Copy link
Member Author

vbraun commented Dec 12, 2011

comment:42

Replying to @simon-king-jena:

Needs review, I'd say! I give Volker's readline package a positive review, since it is part of the Sage version that works for me on openSUSE 12.1, at least when I also have

> echo $LD_LIBRARY_PATH
/usr/local/lib64:/usr/local/lib

Is that the default OpenSuse setting? Thats would be quite insane. You are not installing Sage into /usr/local, are you?

@simon-king-jena
Copy link
Member

comment:43

Replying to @vbraun:

Is that the default OpenSuse setting?

No, of course not. Some sage-devel gurus suggested to set LD_LIBRARY_PATH when I had problems building Sage on an older verson of SuSE, when I started using Sage a few years ago. It worked, and thus I did the same again when I met trouble. But this time it has not been enough.

You are not installing Sage into /usr/local, are you?

No. It is in my /home folder.

@simon-king-jena
Copy link
Member

comment:44

Let me ask again: How do I make it executable? By chmod ugo+rx spkg-install?

@vbraun
Copy link
Member Author

vbraun commented Dec 12, 2011

comment:45

Replying to @simon-king-jena:

Let me ask again: How do I make it executable? By chmod ugo+rx spkg-install?

Yes, that works. Or maybe chmod 755 spkg-install, depending on how much you like octal...

The opencdk spkg has not-checked-in changes.

@vbraun
Copy link
Member Author

vbraun commented Dec 12, 2011

comment:46

There is a typo in iml:

./configure --prefix="$SAGE_LOCAL" --libdir="SAGE_LOCAL/lib"

misses a dollar sign before SAGE_LOCAL

@simon-king-jena

This comment has been minimized.

@simon-king-jena
Copy link
Member

comment:47

I have updated the packages as follows:

  • iml: Typo in SPKG.txt ($ missing) and permissions fixed
  • libm4ri: Typo in SPKG.txt concerning version number fixed
  • cddlib: fixed permissions
  • gd: fixed permissions,
  • givaro: I changed the version number into 3.2.13.rc1 and made spkg-check executable. I did not upgrade to the "full" release, though.
  • opencdk: fixed permissions and not-checked-in changes.
  • mpfi: fixed permissions
  • ppl: made spkg-install executable

The spkgs are in their old location (except of course the renumbered givaro package).

@vbraun
Copy link
Member Author

vbraun commented Dec 14, 2011

comment:48

I've double checked everything and it looks good to me! Positive review for everything except the readline spkg which Simon reviewed.

@vbraun
Copy link
Member Author

vbraun commented Dec 14, 2011

Changed reviewer from Simon King to Simon King, Volker Braun

@simon-king-jena
Copy link
Member

comment:49

Since we have a timely positive review: Can this be merged into sage-4.8.alpha_something?

@simon-king-jena simon-king-jena modified the milestones: sage-5.0, sage-4.8 Dec 15, 2011
@jdemeyer
Copy link
Contributor

Merged: sage-4.8.alpha5

@jdemeyer
Copy link
Contributor

comment:51

Why didn't we simply add "$SAGE_LOCAL/lib64" to LD_LIBRARY_PATH in sage-env? The currently solution (setting --libdir) doesn't work on packages installing both a 32-bit and a 64-bit library (such as gcc by default on x86_64, see #12369).

@vbraun
Copy link
Member Author

vbraun commented Jan 31, 2012

comment:52

Apart from giving you a 50% chance of having the wrong library first in the library path, its ugly and will break once somebody uses a more descriptive library path :-)

@jdemeyer
Copy link
Contributor

comment:53

Replying to @vbraun:

Apart from giving you a 50% chance of having the wrong library first in the library path

We already have a 99% chance or so of having the first two components wrong:

/usr/local/src/sage-5.0.beta1/local/lib/R/lib:/usr/local/src/sage-5.0.beta1/local/lib/openmpi:/usr/local/src/sage-5.0.beta1/local/lib/

Besides, nobody said that lib64 had to come first.

and will break once somebody uses a more descriptive library path :-)

True, but the lib32/lib64 multilib is very standard.

In any case, it is absolutely needed for gcc: #12405.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants