Re: Building .so files only.

2003-08-31 Thread Stephen Torri
On Fri, 2003-08-29 at 06:55, Benjamin Reed wrote:
> On Aug 29, 2003, at 12:55 AM, Daniel Reed wrote:
> 
> > To produce only .la and .so files, you can pass -module -avoid-version 
> > to
> > libtool. In Automake, you can do this by using something similar to:
> >
> > pkglib_LTLIBRARIES = mymod.la
> > mymod_la_SOURCES = mymod.c
> >
> > mymod_la_LDFLAGS = -module -avoid-version
> >
> > This also removes the requirement that the library name start with 
> > "lib."
> 
> This may work on Linux, but on some platforms, this produces a very 
> different file from a library created without -module.
> 
> "modules" are meant to only be used as a plugin, ie dlopened or 
> something similar.  With the module flag, it's a plugin; without, it's 
> a shared library.
> 
> If you're using -module to make shared libs (that will get linked 
> against by other things), your project isn't portable.  ;)

So far I have the following for creating a 'plugin' module:

AC_TRY_CPPFLAGS("-Wall", wall="-Wall", wall="")
CXXFLAGS="-g $wall"
 
MODULE_LDFLAGS="-export-dynamic -module -avoid-version"

For example, a module called libFS.la (Filesystem module) will produce
libFS.la and libFS.so in the installation directory. The only way that I
know to only see libFS.so in the install directory is to place a script
in the Makefile.am to remove the libFS.la. Is this the correct method?

Stephen
-- 
Stephen Torri
GPG Key: http://www.cs.wustl.edu/~storri/storri.asc


signature.asc
Description: This is a digitally signed message part
___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-31 Thread Albert Chin
On Fri, Aug 29, 2003 at 12:55:19AM -0400, Daniel Reed wrote:
> To produce only .la and .so files, you can pass -module -avoid-version to
> libtool. In Automake, you can do this by using something similar to:
> 
> pkglib_LTLIBRARIES = mymod.la
> mymod_la_SOURCES = mymod.c
> 
> mymod_la_LDFLAGS = -module -avoid-version
> 
> This also removes the requirement that the library name start with "lib."

This depends on the platform.

-- 
albert chin ([EMAIL PROTECTED])


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


RE: Building .so files only.

2003-08-29 Thread Schleicher Ralph (LLI)
Tom Howard writes:

> That's my point.  My understanding of Stephen problem is that he doesn't want
> to build/install the companion files.
[...]
> So in his situation, patching libtool and using -shared isn't really going to
> solve his problem.  Correct?

As already pointed out by Daniel Reed, -avoid-version gets rid of
the version number and associated files.  At present (libtool 1.5),
the only clean way to not install libtool companion files (or static
libraries) is to remove them after they got installed, e.g., via
Automake's install-exec-hook.

-- 
Ralph




___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-29 Thread Benjamin Reed
On Aug 29, 2003, at 12:55 AM, Daniel Reed wrote:

To produce only .la and .so files, you can pass -module -avoid-version 
to
libtool. In Automake, you can do this by using something similar to:

pkglib_LTLIBRARIES = mymod.la
mymod_la_SOURCES = mymod.c
mymod_la_LDFLAGS = -module -avoid-version

This also removes the requirement that the library name start with 
"lib."
This may work on Linux, but on some platforms, this produces a very 
different file from a library created without -module.

"modules" are meant to only be used as a plugin, ie dlopened or 
something similar.  With the module flag, it's a plugin; without, it's 
a shared library.

If you're using -module to make shared libs (that will get linked 
against by other things), your project isn't portable.  ;)

--
We put a lot of thought into our defaults.  We like them.  If we
didn't, we would have made something else be the default.  So keep
your cotton-pickin' hands off our defaults.  Don't touch.  Consider
them mandatory.  "Mandatory defaults" has a nice ring to it.


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-29 Thread Tom Howard
Hi Ralph,

On Friday 29 August 2003 16:53, Schleicher Ralph (LLI) wrote:
> In libtool jargon, ".so file" is a synonym for a shared library.
> This includes all companion files, but their names and number
> depend on libtool's configuration and build options.  E.g., HP-UX
> uses .sl instead of .so for the shared library file name extension,
> but libtool users on HP-UX also talk about .so files, so that
> libtool users on other systems don't get confused.

That's my point.  My understanding of Stephen problem is that he doesn't want 
to build/install the companion files.

On Wednesday 27 August 2003 16:21, Stephen Torri wrote:
> I am trying to build libraries that will act as modules in a program. At
> present when I do a compile its building .la, .so, .so.0.0 and .so.0.0.0
> files. I am looking for advice on how to setup my Makefile.am file so
> that all I get installed is a .so file. Ideas?

So in his situation, patching libtool and using -shared isn't really going to 
solve his problem.  Correct?

Cheers,

-- 
Tom Howard



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


RE: Building .so files only.

2003-08-29 Thread Schleicher Ralph (LLI)
Tom Howard writes:

> Sorry if I'm being dense, but (after reading the referenced messages) I don't
> understand why using the -shared flag will only produce the a .so file.
> Won't it still produce a .so.X, .so.X.X.X and .la files as well?

In libtool jargon, ".so file" is a synonym for a shared library.
This includes all companion files, but their names and number
depend on libtool's configuration and build options.  E.g., HP-UX
uses .sl instead of .so for the shared library file name extension,
but libtool users on HP-UX also talk about .so files, so that
libtool users on other systems don't get confused.

-- 
Ralph




___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-29 Thread Daniel Reed
On 2003-08-29T14:14+1000, Tom Howard wrote:
) On Thursday 28 August 2003 16:08, Schleicher Ralph (LLI) wrote:
) > > So by patching my libtool I should be able to put the -shared flag in my
) > > AM_LDFLAGS for the Makefile.am and only get the shared.so file right?
) > Yes, but it makes sense adding it to CFLAGS, too.
) Sorry if I'm being dense, but (after reading the referenced messages) I don't
) understand why using the -shared flag will only produce the a .so file.
) Won't it still produce a .so.X, .so.X.X.X and .la files as well?  Or have I
) misunderstood the original question and Stephen is simply trying to prevent
) the .a file from being created?

To produce only .la and .so files, you can pass -module -avoid-version to
libtool. In Automake, you can do this by using something similar to:

pkglib_LTLIBRARIES = mymod.la
mymod_la_SOURCES = mymod.c

mymod_la_LDFLAGS = -module -avoid-version

This also removes the requirement that the library name start with "lib."

-- 
Daniel Reed <[EMAIL PROTECTED]> http://naim-users.org/nmlorg/   http://naim.n.ml.org/
I don't like sending my conversation hundreds of miles where a lot
of people can read it o_0 even if I am just talking about cheese. --
Avatar214, re: encryption in naim
http://site.n.ml.org/download/20030819120839/naim/naim-0.11.6.tar.gz


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-29 Thread Tom Howard
Hi,

On Thursday 28 August 2003 16:08, Schleicher Ralph (LLI) wrote:
> > So by patching my libtool I should be able to put the -shared flag in my
> > AM_LDFLAGS for the Makefile.am and only get the shared.so file right?
>
> Yes, but it makes sense adding it to CFLAGS, too.

Sorry if I'm being dense, but (after reading the referenced messages) I don't 
understand why using the -shared flag will only produce the a .so file.  
Won't it still produce a .so.X, .so.X.X.X and .la files as well?  Or have I 
misunderstood the original question and Stephen is simply trying to prevent 
the .a file from being created?

Cheers,

-- 
Tom Howard



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


RE: Building .so files only.

2003-08-28 Thread Schleicher Ralph (LLI)
Stephen Torri writes:

> So by patching my libtool I should be able to put the -shared flag in my
> AM_LDFLAGS for the Makefile.am and only get the shared.so file right?

Yes, but it makes sense adding it to CFLAGS, too.

> ! If the @samp{-static} option is given, then only a @samp{.o} file is
> ! built, even if libtool was configured with @samp{--disable-static}.
> 
> This sounds logically confusing. What is the point of --disable-static
> if -static overrides it?

The -static option is for package maintainers, --disable-static is for
users.  The former reads "I really absolutely need a static-only library"
whereas the later reads "I'm not interested in static libraries if I can
avoid it".  Please read Sander Niemeijer's comments in the same thread
, for
more details.

-- 
Ralph




___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-28 Thread Scott James Remnant
On Thu, 2003-08-28 at 00:49, Stephen Torri wrote:

> On Wed, 2003-08-27 at 01:50, Schleicher Ralph (LLI) wrote:
> > 
> ! If the @samp{-static} option is given, then only a @samp{.o} file is
> ! built, even if libtool was configured with @samp{--disable-static}.
> 
> This sounds logically confusing. What is the point of --disable-static
> if -static overrides it?
> 
Because otherwise what would libtool's reaction to being passed
--disable-static at configure-time and -static at compile time be?

+ libtool -mode=compile -static...
libtool sits down and starts singing about gold...

?

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?


signature.asc
Description: This is a digitally signed message part
___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-28 Thread Stephen Torri
On Wed, 2003-08-27 at 01:50, Schleicher Ralph (LLI) wrote:
> See ,
> for more details.

So by patching my libtool I should be able to put the -shared flag in my
AM_LDFLAGS for the Makefile.am and only get the shared.so file right? I
see from the patch that it adds the -shared flag but since I have not
looked at libtool's internals I will go with your explanation in the
email listed above.

! If the @samp{-static} option is given, then only a @samp{.o} file is
! built, even if libtool was configured with @samp{--disable-static}.

This sounds logically confusing. What is the point of --disable-static
if -static overrides it?

! If the @samp{-shared} option is given, then no @samp{.o} file is
built,
! even if libtool was configured with @samp{--enable-static}.  Libtool
! will signal an error if it was configured with
@samp{--disable-shared},
! or if the host does not support shared libraries.

See the previous remark. Again it seems counter productive.

Stephen
-- 
Stephen Torri
GPG Key: http://www.cs.wustl.edu/~storri/storri.asc


signature.asc
Description: This is a digitally signed message part
___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-27 Thread Schleicher Ralph (LLI)
See ,
for more details.

-- 
Ralph




___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool