I believe I have found the problem why sqlite 3.5.3.p3 would not build 
on Solaris 10 with gcc-4.4.0. That now builds on t2 at least. I 
previously submitted this as a trac ticket

http://sagetrac.org/sage_trac/ticket/6266

I'm not sure of the process of now getting that fix incorporated into Sage.

The basic problem is that libpthread and libc were both linked, but in 
the wrong order. In fact, in modern versions of Solaris, there is no 
need at all to link libpthread, as the functionality is in libc (or at 
least that's what I'm told).

So my fix was to strip the line from the Makefile that linked in 
libpthread. There might be a more elegant solution, but this seems to 
work. So I modified spkg-install to remove the offending code from the 
Makefile if the OS is Solaris. (I just use sed to strip it out).

Is it normal to submit a complete file, or a diff? If a diff is wanted, 
what is the exact command to use?

I must have spent 20-30 hours working on this - I'm glad I finally found 
it!!

Dave


kir...@t2:~$ cat spkg-install
#!/usr/bin/env bash

if [ "$SAGE_LOCAL" = "" ]; then
     echo "SAGE_LOCAL undefined ... exiting";
     echo "Maybe run 'sage -sh'?"
     exit 1
fi

if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
     echo "64 bit MacIntel"
     CFLAGS="-O2 -g -m64 "; export CFLAGS
     CXXFLAGS="-O2 -g -m64 "; export CXXFLAGS
fi

if [ $UNAME = "CYGWIN" ]; then
     # Replace the makefile with a new makefile whose install: target
     # does *not* install the sqlite3 client.  This isn't needed at
     # all for Sage.
     cp patches/Makefile.in src/Makefile.in
fi

cd src

./configure --prefix="$SAGE_LOCAL" --disable-tcl

if [ $? -ne 0 ]; then
     echo "Error configuring sqlite"
     exit 1
fi

if [ `uname` = "SunOS" ]; then
    # Linking in pthread is not necessary in recent versions of Solaris, 
as all the functionality is
    # in libc. The thread library is only included for backwards 
compatibility. However, libtool
    # appears to be messing things up, so  the library will be removed 
from the Makefile.
    # This is probably not the most elegant way, but it works.
    # David Kirkby, 13th June 2009
    sed 's/LIBPTHREAD=-lpthread/LIBPTHREAD=/g' Makefile > 
Makefile-without-pthread
    mv Makefile-without-pthread  Makefile
fi

make

if [ $? -ne 0 ]; then
     echo "Error making sqlite"
     exit 1
fi

make install

if [ $? -ne 0 ]; then
     echo "Error installing sqlite"
     exit 1
fi

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to