SONAME clarification

Marco Atzeri marco_atzeri at yahoo.it
Wed Jan 28 02:23:05 CST 2009


--- "John W. Eaton" ha scritto:

> On 13-Nov-2008, Marco Atzeri wrote:
> 
> | --- Marco Atzeri  ha scritto:
> | 
> | > --- "John W. Eaton"  ha scritto:
> | > 
> | > > On 12-Nov-2008, Marco Atzeri wrote:
> |  
> | > > Oh, I see, you are changing LIBPRE to "cyg". 
> If
> | > you
> | > > do that and you
> | > > also strip it off for the --out-implib option,
> | > then
> | > > how about using
> | > > something like
> | > > 
> | > >   SONAME_FLAGS='-Wl,--out-implib=$(patsubst
> | > > $(LIBPRE)%, %, $@).a'
> | > 
> | > I need to check, in any case there are other
> points 
> | > where I need to differentiate between
> | > LIBPRE=cyg and an additional SOPRE=lib.
> | > See attached patch, in cygwin it works, and
> | > I should have left correct for all the other
> | > systems.
> | 
> | I re-made the patch using your suggestion,
> | and adding the SOPRE=lib to differentiate from
> | LIBPRE=cyg
> | 
> | SONAME_FLAGS='-Wl,--out-implib=$(patsubst
> $(SOPRE)%,
> | %, $@).a'
> | 
> | > 
> | > > Comments?
> | > > 
> | > > jwe
> | > > 
> | 
> | The patch is now cleaner and simpler.
> | It builds fine on cygwin, but a check on other 
> | system is worth.
> 
> I'm confused about this patch because it installs
> files with names
> like $(SOPRE)octinterp.$(LIBEXT) and
> $(SOPRE)octinterp.$(SHLLIB), but
> there are no rules for building files with with the
> $(SOPRE) prefix.
> 
> Shouldn't the $(SOPRE) only apply to shared
> libraries?  In the new
> install rules, you also use this prefix for static
> libraries.
> 
> I'm appending a version of the patch, updated for
> the current
> sources.  I won't apply it until these issues are
> resolved.
> 
> jwe

Hi John,
There were some mistakes in the one I sent you before.
The correct form for cygwin SONAME should be 

SONAME_FLAGS='-Wl,--out-implib=$(patsubst
$(LIBPRE)%,$(SOPRE)%,$@).a'

where
    LIBPRE=cyg
    SOPRE=lib

Attached the latest version I am using on 3.0.3
and 3.0.4 release candidate.
http://cygwin.com/ml/cygwin-announce/2009-01/msg00035.html


The scope of the patch is to have for cygwin

shared lib as cygcruft.dll
import lib as libcruft.dll.a

from compilation log:

*********************************

make cygcruft.dll.3.0.4
make[3]: Entering directory
`/pub/cygports/octave/octave-3.0.4-2/build/libcruft'
rm -f cygcruft.dll
g++-4 -shared -Wl,--export-all-symbols
-Wl,--enable-auto-import -Wl,--enable-aut
o-image-base  -Wl,--out-implib=libcruft.dll.a -o
cygcruft.dll amos/dgamln.o .....

Creating library file: libcruft.dll.a
rm -f cygcruft.dll.3.0.4
ln -s cygcruft.dll cygcruft.dll.3.0.4

*********************************

and from install log:

*********************************
          rm -f
/pub/cygports/octave/octave-3.0.4-2/inst/usr/lib/octave-3.0.4/libcruft.dll.a.3.0.4;
\
          /bin/install -c \
            libcruft.dll.a
/pub/cygports/octave/octave-3.0.4-2/inst/usr/lib/octave-3.0.4/libcruft.dll.a.3.0.4;

\
          rm -f
/pub/cygports/octave/octave-3.0.4-2/inst/usr/lib/octave-3.0.4/libcruft.dll.a;
\
          (cd
/pub/cygports/octave/octave-3.0.4-2/inst/usr/lib/octave-3.0.4;
\
          ln -s libcruft.dll.a.3.0.4
/pub/cygports/octave/octave-3.0.4-2/inst/usr/lib/octave-3.0.4/libcruft.dll
.a); \
          if  test xdll != x ; then \
            rm -f
/pub/cygports/octave/octave-3.0.4-2/inst/usr/bin/cygcruft.dll;
\
            /bin/install -c \
              cygcruft.dll
/pub/cygports/octave/octave-3.0.4-2/inst/usr/bin/cygcruft.dll;
\
 
*********************************

the installed lib files will be

usr/bin/cygcruft.dll
usr/bin/cygoctave.dll
usr/bin/cygoctinterp.dll

usr/lib/octave-3.0.4/libcruft.dll.a
usr/lib/octave-3.0.4/libcruft.dll.a.3.0.4
usr/lib/octave-3.0.4/liboctave.dll.a
usr/lib/octave-3.0.4/liboctave.dll.a.3.0.4
usr/lib/octave-3.0.4/liboctinterp.dll.a
usr/lib/octave-3.0.4/liboctinterp.dll.a.3.0.4


Regards
Marco




      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: octave-3.0.4-2.cygwin-build.patch
Type: text/x-diff
Size: 7004 bytes
Desc: 2818000593-octave-3.0.4-2.cygwin-build.patch
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090128/b1298cad/attachment.bin 


More information about the Octave-maintainers mailing list