[GiNaC-list] [patch] Document that shared libraries are not supported on some weird platforms

Sheplyakov Alexei varg at theor.jinr.ru
Thu Jul 20 16:02:47 CEST 2006

On Wed, Jul 19, 2006 at 10:45:13PM +0200, Richard B. Kreckel wrote:
> Anyway, specifying --prefix at configuration time makes sense since in 
> some cases it is necessary to insert the prefix into non-source files 
> (e.g. manpages) and specifying the prefix at the make install step may 
> be too late.
I think the main reason is SONAME versus file name issue. Most ELF linkers
record the expected runtime location of the shared library internally.
Libtool tries to hide linker guts from the programmer, to do this it
needs to know $libdir.

> For the purpose of copying files from the built-area into 
> their final places you are right, of course.  Actually, you *can* 
> specify the prefix at the make install step by saying make install 
> prefix=/path/to/whereever.
Do you mean "make install DESTDIR=/some/weird/dir"?

> Surprise!
Indeed. Because *sometimes* moving shared library could break it 
(have you ever seen cryptic "don't forget to run libtool --finish"

> I'm not so sure.  I am quite happy that the details of building 
> libraries are factored out and maintained separately.  Doesn't your 
> configure output list a line like "checking whether the gcc linker 
> supports shared libraries..."?

The linker *does* support shared libraries.

> If that answer at the end of that line 
> is no and it still builds every object twice, then you may wish to 
> report that as a bug to the libtool maintainers.

Unfortunatelly, brain-dead nature of win32 dlls (all library symbols
*must* be resolved at the link time) requires non-trivial effort from
the library programmer (every user-visible extern foo bar must
have __declspec boilerplate).
I don't think libtool maintainers can do anything about this... 

So I propose to document that shared libraries are not supported on
MinGW. What about this patch?

RCS file: /home/cvs/GiNaC/INSTALL,v
retrieving revision 1.54
diff -u -r1.54 INSTALL
--- INSTALL	19 Oct 2005 20:54:13 -0000	1.54
+++ INSTALL	20 Jul 2006 13:37:43 -0000
@@ -56,9 +56,8 @@
  $ make check
-The "configure" script (and "autogen.sh", which invokes "configure") can be
-given a number of options to enable and disable various features. For a
-complete list, type:
+The "configure" script can be given a number of options to enable and
+disable various features. For a complete list, type:
  $ ./configure --help
@@ -113,3 +112,16 @@
 Building GiNaC requires many standard header files. If you get a configure
 error complaining about such missing files your compiler and library are
 probably not up to date enough and it's no worth continuing.
+win32 (MinGW)
+GNU compiler and linker are *required* in order to compile GiNaC (you 
+can download them from <http://www.mingw.org>). Note that shared libraries
+(DLLs) are *not supported* at the moment, so you might want to use
+--disable-shared option to save compilation time.
+To build ginsh modified version of GNU readline library is necessary. It 
+is available at <http://gnuwin32.sourceforge.net/packages/readline.htm>.

All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20060720/a1ad9ce0/attachment.pgp

More information about the GiNaC-list mailing list