Re: [sage-devel] Lionizing the Sage build

2011-07-24 Thread Justin C. Walker
A minor update:

On Jul 23, 2011, at 15:12 , Justin C. Walker wrote:
> On Jul 22, 2011, at 15:54 , Justin C. Walker wrote:
>> I don't have a whole lot to report yet, but I thought I'd pass on what 
>> little I've gleaned from the background noise.  Most of this is of general 
>> import.  I haven't really delved into the Sage build issues yet.
> 
> A brief update: trying to hack my way into building with the Xcode 3 tool 
> chain on 10.7, I run immediately into a problem: the first "autoconf" use 
> tries to verify that the C compiler works, which as I mentioned previously, 
> won't work unless you provide a pointer to the pieces.

Turns out that, if you have Xcode 3 installed on your system, you can run the 
installer for Xcode 3.2.6 (a 4GB download from Apple's developer site), and get 
a full installation of the tools.

The next glitch in building Sage is that readline fails to build.  As a test, I 
tried to build from scratch from readline.6.2 source, and it failed in more or 
less the same way.

I can't tell right now if this is an "autoconf" glitch or something deeper 
("-compatibility_version only allowed with -dynamiclib").

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
---
Like the ski resort full of girls hunting for husbands
and husbands hunting for girls, the situation is not
as symmetrical as it might seem.
  - Alan MacKay
--

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Lionizing the Sage build

2011-07-23 Thread Justin C. Walker

On Jul 22, 2011, at 15:54 , Justin C. Walker wrote:

> I don't have a whole lot to report yet, but I thought I'd pass on what little 
> I've gleaned from the background noise.  Most of this is of general import.  
> I haven't really delved into the Sage build issues yet.

A brief update: trying to hack my way into building with the Xcode 3 tool chain 
on 10.7, I run immediately into a problem: the first "autoconf" use tries to 
verify that the C compiler works, which as I mentioned previously, won't work 
unless you provide a pointer to the pieces.  The prereq spkg build halts 
because the "plain" command
   cc -o conftest conftest.c
fails.  I tried defining "CFLAGS" with the "isysroot" flag on the command line 
of the 'make', but that failed in two ways:

first, there's a check to see whether my "make" invocation sets $(MAKE); 
without setting CFLAGS (invoking as usual), the answer is yes; with CFLAGS set, 
the answer is no.

The main problem is the above compile problem: the compiler doesn't produce 
binaries, so the build halts.

If anyone has a suggestion to get past this, let me know.  In the meantime, I 
will switch to trying out Xcode 4.

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income

Experience is what you get
  when you don't get what you want.




-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Lionizing the Sage build

2011-07-22 Thread Justin C. Walker
I don't have a whole lot to report yet, but I thought I'd pass on what little 
I've gleaned from the background noise.  Most of this is of general import.  I 
haven't really delved into the Sage build issues yet.

It appears that the installation of 10.7 does remove references to the tool 
chain from the usual places (/usr/bin, ...).  I believe this is to make "room" 
for Xcode 4, but I'm not sure.

The following works to get Xcode 3 working (assuming you have it installed 
before upgrading to 10.7).

There is a full tool-chain, in good "Unix" order, in the Xcode developer tree.  
I have Xcode 3 installed in /Developer-3, and under that directory is "usr", 
and under that is a full complement of command-line tools (compilers,…), libs, 
etc.

So the first step is to put "/path/to/Dev-usr/bin" as the first thing in your 
path.

That doesn't make things work seamlessly, though.  If you want to "make" a 
simple executable, with no makefile, then "make exc" spits out "cc -o exc 
exc.c", which doesn't fly.  The include and lib directories are all set up 
under the developer tree, so those defaults don't work.

You can overcome this to some extent by pointing to an explicit SDK (which will 
provide the "missing" libs and includes): modify CFLAGS for the "make" command 
as follows:

   make CFLAGS+="-isysroot  /Developer-3/SDKs/MacOSX10.6.sdk/" exc

will build the executable as dictated by the bolt-in "make" rules (or probably 
the active makefile, if there is one; that could depend on the file's content).

At this point, there seem to be several options (this is generic, not directly 
relevant for Sage):
1) duplicate the "install" operation for Xcode 3 and copy things into the 
"/usr" tree.
2) Install Xcode 4 and try that out (I am guessing that install will set things 
up so "make" just works.
3) Set up "good" makefiles for anything that doesn't have one, including macros 
pointing to the proper include and lib directories.

I'd wait until a few of us have pulled the arrows out of our backs, and can 
report back.  I will try (3) and then (2), leaving (1) for someone truly 
twisted.

For Sage, there are a couple of questions:
A) Will the Sage build just work, given only Xcode 3 installed?
B) Will Sage build as is under Xcode 4?

I'm checking this out, a little at a time.

For (A), I think the makefiles are sufficiently robust that with (maybe) a 
little top-level tweaking, most of the problems go away.  There are a few 
potential glitches (or maybe more!): the libraries have changed, and I don't 
yet know the impact of that.  See below for an example.

For (B), it may be that things will work, modulo compiler issues.  Apple is 
moving at high-speed away from gcc, and there are odd-ball reports of bugs from 
the llvm Family of Fine Compilers that might bite us.  In addition, there are 
API changes that are hard to quantify up from (the same holds in A).

An example: the cvxopt failure seems to come from a library glitch, but I 
haven't tracked it down.  The first complaint is about "_ilaenv_":

ImportError: 
dlopen(/Users/Sage/sage-4.7/local/lib/python/site-packages/cvxopt/lapack.so, 
2): Symbol not found: _ilaenv_
  Referenced from: 
/Users/Sage/sage-4.7/local/lib/python/site-packages/cvxopt/lapack.so
  Expected in: 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib

However, this symbol *is* in that dylib, so there's something funky going on 
that I have not grokked.

Comments/thoughts?

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
---
My wife 'n kids 'n dogs are gone,
I can't get Jesus on the phone,
But Ol' Milwaukee's Best is my best friend.
---


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org