Unix Shell - A question about libtool

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > December 2006 > A question about libtool





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author A question about libtool
Bo Yang

2006-12-16, 1:31 am

I think there must be some persons knowing autotools very well.
I have read the Libtool info, it says:

In the past, if a source code package developer wanted to take
advantage of the power of shared libraries, he needed to write
custom support code for each platform on which his package ran.
He also had to design a configuration interface so that the
package installer could choose what sort of libraries were built.

There are two points where I can't understand.
First, whatever platform it is, they all use ELF format for binary
files. So, the shared libraries must have the same file format. Why
we need to write custom support code for each platform?

Second, what is the configuration interface here?

Thanks in advance!
Adam Price

2006-12-16, 1:31 am

On Sat, 16 Dec 2006 10:53:42 +0800, Bo Yang wrote:

> I think there must be some persons knowing autotools very well.
> I have read the Libtool info, it says:
>
> In the past, if a source code package developer wanted to take
> advantage of the power of shared libraries, he needed to write
> custom support code for each platform on which his package ran.
> He also had to design a configuration interface so that the
> package installer could choose what sort of libraries were built.
>
> There are two points where I can't understand.
> First, whatever platform it is, they all use ELF format for binary
> files. So, the shared libraries must have the same file format. Why
> we need to write custom support code for each platform?


Even on Linux on x86 not all systems use ELF format[1].
The unix world is bigger than x86. Platform includes Alpha,Sparc,IBM Power,
Itanium, PA-Risc, Arm, VAX and many others that I can't be bothered to
think of right now.
>
> Second, what is the configuration interface here?
>

Usually a script which asks a bunch of questions about tool locations,
compiler options etc, but sometimes a menu a gui with options to tick.
Adam

[1] http://aput.net/~jheiss/aout_redhat.shtml
Bo Yang

2006-12-16, 1:31 am

Adam Price :
> On Sat, 16 Dec 2006 10:53:42 +0800, Bo Yang wrote:
>
>
> Even on Linux on x86 not all systems use ELF format[1].
> The unix world is bigger than x86. Platform includes Alpha,Sparc,IBM Power,
> Itanium, PA-Risc, Arm, VAX and many others that I can't be bothered to
> think of right now.

So, libtool's purpose is to simplify the use of different format shared
library?

> Usually a script which asks a bunch of questions about tool locations,
> compiler options etc, but sometimes a menu a gui with options to tick.
> Adam
>
> [1] http://aput.net/~jheiss/aout_redhat.shtml

Adam Price

2006-12-16, 1:19 pm

On Sat, 16 Dec 2006 15:13:48 +0800, Bo Yang wrote:

> Adam Price :
> So, libtool's purpose is to simplify the use of different format shared
> library?
>

Not just different formats, for example when you compile with gcc you often
end up using the gnu maths libraries, but you may find your system is being
ported to a system with an intel compiler and maths library, making your
build scripts work can be non-trivial in such cases, particularly if you
don't know what platforms someone may want to compile your code on.
The documentation here...
http://www.gnu.org/software/libtool...html#Motivation
Seems quite clear to me, what is it that you don't understand?
Adam
Bo Yang

2006-12-16, 1:19 pm

Adam Price :
> On Sat, 16 Dec 2006 15:13:48 +0800, Bo Yang wrote:
>
> Not just different formats, for example when you compile with gcc you often
> end up using the gnu maths libraries, but you may find your system is being
> ported to a system with an intel compiler and maths library, making your
> build scripts work can be non-trivial in such cases, particularly if you
> don't know what platforms someone may want to compile your code on.
> The documentation here...
> http://www.gnu.org/software/libtool...html#Motivation
> Seems quite clear to me, what is it that you don't understand?
> Adam

I am sorry, maybe I have no enough Linux development experience.
Could you please give me an example, where I must to use libtool
for my software package?

Thank you!
Adam Price

2006-12-16, 7:26 pm

On Sun, 17 Dec 2006 00:01:53 +0800, Bo Yang wrote:

> Adam Price :
> I am sorry, maybe I have no enough Linux development experience.
> Could you please give me an example, where I must to use libtool
> for my software package?
>
> Thank you!


Nope.. There is no reason why you must. You may want to. Imagine if you
want to people to build your application on Linux and FreeBSD and Tru64 and
Sparc and so on...
Imagine that you don't have access to all of these systems, but would still
like your build scripts to work if possible. Then you may want to use
auto-conf and auto-make in conjunction with libtool.
Adam
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com