-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Make lcalc accessible as a library on OS X #9665
Comments
comment:1
Sage 4.5.2.rc0 happens to build successfully and pass the long doctests on bsd.math. In particular, $ uname -a
Darwin bsd.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
$ pwd
/Users/mpatel/apps/sage-4.5.2.rc0
$ find . | grep libLfunction
./local/lib/libLfunction.so
$ touch devel/sage-main/sage/libs/lcalc/lcalc_Lfunction.pyx
$ ./sage -b
...
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/mpatel/apps/sage-4.5.2.rc0/local/include/lcalc/ -I/Users/mpatel/apps/sage-4.5.2.rc0/local//include -I/Users/mpatel/apps/sage-4.5.2.rc0/local//include/csage -I/Users/mpatel/apps/sage-4.5.2.rc0/devel//sage/sage/ext -I/Users/mpatel/apps/sage-4.5.2.rc0/local/include/python2.6 -c sage/libs/lcalc/lcalc_Lfunction.cpp -o build/temp.macosx-10.6-i386-2.6/sage/libs/lcalc/lcalc_Lfunction.o -O3 -ffast-math -w
...
g++ -L/Users/mpatel/apps/sage-4.5.2.rc0/local/lib -bundle -undefined dynamic_lookup build/temp.macosx-10.6-i386-2.6/sage/libs/lcalc/lcalc_Lfunction.o -L/Users/mpatel/apps/sage-4.5.2.rc0/local//lib -lcsage -lm -lntl -lmpfr -lgmp -lgmpxx -lLfunction -lstdc++ -lstdc++ -lntl -o build/lib.macosx-10.6-i386-2.6/sage/libs/lcalc/lcalc_Lfunction.so
... finishes with several warnings but no errors. Does bsd.math not require a .dylib library? Disclaimer: I'm not familiar with OS X. |
comment:3
Replying to @qed777:
The "bsd.math" Mac runs with OS X 10.6 using Apples version of GCC 4.2, and obviously this one knows how to handle ".so" dynamic libraries in addition to ".dylib" ones. I suspected so earlier, but since I work almost exclusively with OS X 10.4 (and thus Apples version of GCC 4.0.1), I couldn't tell, or know, for sure. So OS X 10.6 is "out of the game" for the time being. But how about OS X 10.5 (I think it also still uses GCC 4.0.1)? |
comment:5
Last time I built on 10.5, it worked fine. I do not have access to 10.4 intel machine. I am building it again, but I do not think anything should change since last time. Replying to @sagetrac-GeorgSWeber:
|
comment:6
It works fine on 10.5 on intel mac. I could not replicate the problem. I am also building on a ppc machine. This should take a long time. |
comment:7
It sounds from gsw that the issue is Tiger, not PPC versus Intel (he has Intel for Tiger). Does anyone know of an spkg that builds .so files versus .dylib files for these situations? Then one could copy that naively and a non-expert (say, me) with access to Tiger could try it out. Otherwise, this link seems relevant, though I can't gauge its usefulness for sure. |
comment:8
New spkg should work. It is only needed to compile on 10.4. If you are using a compiled version from 10.5 to run on 10.4 then this spkg update is not needed. http://sage.math.washington.edu/home/rishikesh/lcalc/lcalc-20100428-1.23.p1.spkg |
comment:9
In the meantime, I had a look on the "p0" spkg build system (makefile and such). All seems fine, except that ".so" is hardcoded as suffix. Usually, one has something like $(SO_SUFFIX), and this defaults to so on Linux, dylib on Mac OS X, and dll under Windows. No surprise that in the spkg-install, it is said that this lcalc spkg does not work under Cygwin ... But otherwise, OS X is taken care for in the build system, e.g. using "dynamiclib" as an option instead of "shared". So I duplicated under /local/lib/ the file "libLfunction.so" to another file "libLfunction.dylib" and, oh wonder, everything works fine. Sage builds, and the doctest for "devel/sage/sage/libs/lcalc/lcalc_Lfunction.pyx" passes. Now I just downloaded the "p1" lcalc spkg and check it out. Thanks for the quick work! |
comment:10
Replying to @sagetrac-GeorgSWeber:
Does that mean the 'correct' fix is to do this instead, since we eventually want to get Cygwin or whatever to work? Presumably drkirkby has a comment about this as well :) |
Author: Rishikesh |
comment:11
Replying to @kcrisman:
This ticket is about OS X 10.4, and although the difference between p0 and p1 is a quick and dirty hack --- it's exactly the one I myself had in mind ... Let's open up a new ticket for the Cygwin issues (resp. there probably is already one), and close this one. Because I'm giving it a positive review (I just tested it OK). |
Reviewer: Georg S. Weber |
comment:12
Replying to @sagetrac-GeorgSWeber:
Thanks to Georg and Karl-Dieter for their clarifications! |
Merged: sage-4.5.2.rc0 |
Changed merged from sage-4.5.2.rc0 to sage-4.5.2.rc1 |
comment:15
Just to confirm, this worked fine on my PPC OS X 10.4 Mac as well, so it works on Intel and PPC (as it should, having read the hack). Huzzah! |
comment:16
lcalc as included does not need mpfr. Mike has experimental code which uses mpfr.
Feel free to clean and put up an spkg for review.
|
comment:18
Replying to @rishikesha:
This should probably be on a different ticket, though. |
comment:19
OK since I am redirected here. Francois |
comment:20
Yes it needs them. If you do not agree, try to remove and compile and see the error message, or better yet, see the code for the pyx file. It has been quite a long time since I wrote the wrapper. I never used NTL, but the wrapper does not compile without without those flags. |
Reported by Georg Weber on sage-release:
Georg continues:
Related: #4793, #5396.
CC: @kiwifb @sagetrac-drkirkby @sagetrac-GeorgSWeber @rishikesha @robertwb @williamstein @sagetrac-ylchapuy mrubinst@math.uwaterloo.ca @kcrisman
Component: packages: standard
Author: Rishikesh
Reviewer: Georg S. Weber
Merged: sage-4.5.2.rc1
Issue created by migration from https://trac.sagemath.org/ticket/9665
The text was updated successfully, but these errors were encountered: