brandon.bar...@gmail.com wrote:
> On the latest opensolaris running on amd64 and using gcc 4.4.1 I did
> hit the bug you mentioned, but in sqlite (running the gnu autotools
> again for sqlite did not seem to help):
> 
> 
> ar cru .libs/libsqlite3.a  sqlite3.o
> ranlib .libs/libsqlite3.a
> creating libsqlite3.la
> (cd .libs && rm -f libsqlite3.la && ln -s ../libsqlite3.la
> libsqlite3.la)
> if /usr/local/bin/gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=
> \"sqlite\" -DPACKAGE_VERSION=\"3.6.17\" -DPACKAGE_STRING=\"sqlite\
> 3.6.17\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\"; -DPACKAGE=
> \"sqlite\
> " -DVERSION=\"3.6.17\" -D_FILE_OFFSET_BITS=64 -DSTDC_HEADERS=1 -
> DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -
> DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -
> DHAVE_INTTYPES_H=1 -DHAVE_STD
> INT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1 -
> DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -
> DHAVE_READLINE=1 -I. -I.   -I /export/home/brandon/sage-4.1.2/local/
> include -DSQLITE_THRE
> ADSAFE=1  -g  -O2  -MT shell.o -MD -MP -MF ".deps/shell.Tpo" -c -o
> shell.o shell.c; \
>         then mv -f ".deps/shell.Tpo" ".deps/shell.Po"; else rm -f
> ".deps/shell.Tpo"; exit 1; fi
> /bin/sh ./libtool --tag=CC --mode=link /usr/local/bin/gcc -
> DSQLITE_THREADSAFE=1  -g  -O2    -o sqlite3  shell.o ./libsqlite3.la -
> lreadline -lcurses
> /usr/local/bin/gcc -DSQLITE_THREADSAFE=1 -g -O2 -o .libs/sqlite3
> shell.o  ./.libs/libsqlite3.so -lreadline -lcurses  -Wl,--rpath -Wl,/
> export/home/brandon/sage-4.1.2/local/lib
> usage: ld
> [-3:6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VW:Y:?] file
> (s)
>


Can you give me the output of

$ gcc -v
$ ld --version.
$ make --version
$ which make
$ which tar
$ which gcc
$ echo $PATH

(even if these create errors, tell me what they are)

What I think is happening is that you have a GNU version of a linker names 'ld' 
in your path before the Sun linker at /usr/ccs/bin AND gcc is configured to use 
the Sun linker.

If gcc -v shows something like

--with-ld=/usr/ccs/bin/ld

then is configured to use the Sun linker, in /usr/ccs/bin. If however you have 
another linker in your path named 'ld' (i.e. probably from GNU binutils) before 
the Sun linker, the some of the build scripts in Sage will assume you are using 
the GNU linker, and pass GNU-specific flags to the linker.


I suspect by changing the order of your the things in your path, so the Sun 
linker is picked up first, then it will solve it. However, if changing your 
path 
means that you pick up the Sun version of make before then GNU one, then you 
will get a problem. The trick will be to put the GNU version of 'make' and 
'tar' 
in your path before the Sun versions, but put the Sun versions of the other 
tools before the GNU ones. (See my previous note about creating a directory and 
copying the GNU version of make and tar to it.

Perhaps with the notes above, you can solve this yourself, but if not, let me 
have the output of the commands

Here you will see what I have.

1)
$ gcc -v
<SNIP>
--with-ld=/usr/ccs/bin/ld --without-gnu-ld


so gcc is configured to use the Sun linker.

2)
$ ld --version
ld: illegal option -- version
usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s)

So I have the Sun linker in my path before any GNU one

3)
$ make --version
GNU Make 3.80

So I have the GNU make in my path first, before the Sun one.


4)
$ which make
/export/home/drkirkby/bin/make

I've put a copy of the GNU make in a directory which is picked up early.

It basically boils down to this

* If gcc is configured to use the Sun linker, then the Sun linker must be in 
your path first, as some Sage scrips check what linker you have in your path 
first, and use that to determine what linker flags to use. (At some point I 
hope 
to do a better test, but it hard to determine unambiguously what linker gcc 
uses.


* The GNU version of make and tar must be in your path before any GNU version.

* Since the Sun version of 'make' is in the same directory as the Sun version 
of 
'ld' then you must copy GNU versions of make and tar to a directory such as 
$HOME/bin-for-sage, and ensure that is in your path first.


I hope that helps somewhat



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to