libtool
[Top][All Lists]
Advanced

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

Re: Libtool 2.1a ported to SkyOS, how to test?


From: Ralf Wildenhues
Subject: Re: Libtool 2.1a ported to SkyOS, how to test?
Date: Sun, 23 Apr 2006 12:19:38 +0200
User-agent: Mutt/1.5.11+cvs20060403

Hi Robert,

* Robert Szeleney wrote on Sun, Apr 23, 2006 at 11:52:44AM CEST:
> 
> Ok, made progress. ./bootstrap for libtool-1.5.22 works now. (After 
> fixing the inital stack creation routine and tweaking gcc to return the 
> default library directory for 'gcc -print-search-dirs)

Ah.  Interesting.

> But it looks like that there is a misconfiguration in the skyos specific 
> settings I just added.
> When I try to build libtool-1.5.22 it succeeds and creates following 
> files in the libltdl/.libs directory:
> 
> libltdl.dll (A valid SkyOS dll with all functions exported)
> libltdl.a (The static library)
> 
> libltdl.la :

> libltdl.lai:


OK, first thing here: compiling ltdl.lo has these spurious errors:
> /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.     
> -g -O2 -c -o ltdl.lo ltdl.c
> mkdir .libs
> rm: cannot remove directory `': Is a directory
>  gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c  -DPIC -o .libs/ltdl.o
> rm: cannot remove directory `': Is a directory
>  gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c -o ltdl.o >/dev/null 2>&1

Did you change ltmain.in or ltmain.sh in any way?
You can run
  /bin/sh ./libtool --debug --tag=CC --mode=compile gcc -DHAVE_CONFIG_H \
    -I. -g -O2 -c -o ltdl.lo ltdl.c

manually to find out which rm complains.

> Unfortunately trying to install libtool-1.5.22 doesn't work because the 
> install process can't find libltdl-3.1.4.dll (which obviously isn't there)
> 
> 'make install':
> ....
> /boot/programs/unix/bin/install -c .libs/libltdl.3.1.4.dll 
> $dldir/libltdl.3.1.4.dll     (this fails)

Well.  You copied the skyos part of libtool.m4 more or less from some
cygwin parts.  That's not sufficient though.

First, there are several macros that need to be adjusted, in both
libtool.m4 and ltdl.m4.

As far as I can see, we need to discuss several questions before we can
fix this:

- does skyos have drive letters like w32?  If not, the logic can be
  simplified considerably.
- how does the runtime linker find DLLs?  Is there a special variable
  for it (shlibpath_var, for example LD_LIBRARY_PATH) or does it abuse
  $PATH for this?  If not the latter, you don't need the hacks done for
  cygwin to install a DLL in some bindir.

(lots more questions; let's do more as we go along, though)

> Now the questions:
> - Does anyone know which libtool.m4 configuration is responsible for 
> this failure?
> 
> - When this is fixed, and there finally is a libltdl.3.1.4 dll, does the 
> make install process install a symlink like libltdl.dll -> 
> libltdl.3.1.4.dll ? ( If not, how is ld supposed to find this library 
> when a third party package for instance tries to link to libltdl by just 
> using 'ld -lltdl ?)

Well, first we need to know how skyos works; then we can adjust
libtool.m4 accordingly.

> - May there be any problems with SkyOS using the .PE DLL format for 
> shared libraries? There must be no undefined/unreferenced symbols when 
> building a DLL. (like in Windows)

No problem.  Just be sure to use -no-undefined with `libtool --mode=link'.

> Anyway, a few more information:
> I tried to add a skyos target to libtool.m4 with following characteristics:
> - The static library should be named: $(libname).a
> - The dynamic library should be named: $(libname).dll
> - There should be NO import library. ( $(libname).lib), because SkyOS 
> GCC/LD can directly link against the DLL

So that part can be simplified as well.

> I attach following files:
> libtool.m4.diff
> output from (./bootstrap && ./configure && make && make install)

What you can do is post  `./libtool --config' output.
Better even, go through every such variable, try to understand its
purpose, and then try to think whether it needs to be adjusted for
skyos.  There is some documentation about them in doc/libtool.texi,
and some inline in libtool.m4.  Then post your results, and we shall
see how we can munge that into a proper patch to support skyos.

I'd be happy to help more, but really I don't know enough by far about
skyos, and haven't found adequate documentation online.

Cheers,
Ralf




reply via email to

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