[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LT 1.5: problem with Solaris Forte 64 bit shared C++ libraries

From: Jeff Squyres
Subject: Re: LT 1.5: problem with Solaris Forte 64 bit shared C++ libraries
Date: Sat, 3 May 2003 11:35:35 -0400 (EDT)

On Sat, 3 May 2003, Bob Friesenhahn wrote:

> Does
>   setenv CXX 'CC  -xarch=v9'
> work any better?  I suspect not ...

Interestingly, it fails, but in an entirely different way.  :-)

So if you pretty much assume all the same setup as I originally listed,
and set CXX to "CC -xarch=v9" and unset CXXFLAGS, libtool silently does
nothing on the final link (from "make clean all"):

/bin/bash ./libtool --mode=link CC -xarch=v9      -o -rpath 
/usr/local/lib  foo.lo bar.lo
(cd .libs && rm -f && ln -s
(cd .libs && rm -f && ln -s
(cd .libs && rm -f && ln -s ../

So while there's no untoward failures, no library file is created!

This is doubly strange because I don't see any difference in the
libtool command that automake is issuing.  I'm assuming that automake
is quoting its command differently (perhaps ...-mode=link "CC
-xarch=v9" ....), and although it doesn't seem that that should matter
here, I cut-n-pasted the bash/libtool command from above into my shell
prompt and it did exactly the same thing -- no library was produced,
but no error.

I can only guess, then, that something during AC_PROG_LIBTOOL got
borked and the ./libtool script that was generated is *different* than
my previous tests.

So I ran configure twice: 1) with CXX="CC -xarch=v9" CXXFLAGS="", and
2) with CXX="CC" CXXFLAGS="-xarch=v9" and ran a diff on the produced
libtool.  There were more differences than I thought there should
be. In particular, with the CXX="CC -xarch=v9" version, archive_cmds
and archive_expsym_cmds are *empty* (and are not empty in the other
version).  A bunch of other variables look to be conspicuously
incorrect, too.  I guess that this explains why no library is

I've attached a unified diff of the two produced libtools for those who
are interested.

Is this a bug?  It certainly falls in the "I did not expect this"
category.  :-)

> For gcc, I "fixed" the problem you are experiencing by passing all -m
> options.  Unfortunately, this "fix" is not portable across compilers.
> There are ways (-Wc,flag -Wl,flag) to force options to be passed to the
> compiler or linker, but these are not user friendly, and are highly tool
> dependent.

True.  But will libtool pass these flags through?  I'm ok telling
users that they need to specify extra flags in one of the precious
environment variables, and the exact flags are dependant upon the
compiler.  But how to get libtool to recongize and not eliminate them?
I guess that's the real question.

{+} Jeff Squyres
{+} address@hidden

Attachment: libtool.diff
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]