This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITP] openldap-devel: Lightweight Directory Access Protocolclients and libraries


>>>>> "Corinna" == Corinna Vinschen writes:

    Corinna> What about the shared libs?  I once built openldap with shared libs
    Corinna> using a really ugly trick, but probably there's a more "official"
    Corinna> way to get the same result.

    Corinna> What I did:

    Corinna> $ ./configure \
    Corinna>         --prefix=/usr \
    Corinna>         --sysconfdir=/etc \
    Corinna>         --libexecdir='$(prefix)/sbin' \
    Corinna>         --localstatedir=/var \
    Corinna>         --datadir='$(prefix)/share' \
    Corinna>         --mandir='$(prefix)/share/man' \
    Corinna>         --infodir='$(prefix)/share/info' \
    Corinna>         --enable-dynamic \
    Corinna>         --enable-shared=yes \
    Corinna>         --with-gnu-ld \
    Corinna>         --without-pic \
    Corinna>         --enable-modules \
    Corinna>         --enable-crypt \
    Corinna>         --enable-wrappers \
    Corinna>         --disable-ipv6
    Corinna> $ make depend

    Corinna> Then I replaced libtool in the toplevel directory with the one from
    Corinna> the libtool-devel-1.5-3 package.  Next I applied the following patch:

    Corinna> --- /usr/autotool/devel/bin/libtool     2003-08-18 07:36:04.001000000 +0200
    Corinna> +++ libtool     2003-09-25 22:35:13.892495700 +0200
    Corinna> @@ -1180,7 +1180,11 @@ EOF
    Corinna>        # even a static library is built.  For now, we need to specify
    Corinna>        # -no-undefined on the libtool link line when we can be certain
    Corinna>        # that all symbols are satisfied, otherwise we get a static library.
    Corinna> -      allow_undefined=yes
    Corinna> +      # allow_undefined=yes
    Corinna> +
    Corinna> +      # CV: Hack to build shared libs for Cygwin 1.5.x
    Corinna> +      allow_undefined=no
    Corinna> +      avoid_version=yes
    Corinna>        ;;
    Corinna>      *)
    Corinna>        allow_undefined=yes

    Corinna> Then I called `make' and openldap has been built with shared libs.

I did almost the same, but without the patch.

What I did:

  LDFLAGS=-no-undefined                                \
  ${srcdir}/configure                                  \
    --build=${host}                                    \
    --target=${target}                                 \
    --srcdir=${srcdir}                                 \
    --prefix=${prefix}                                 \
    --exec-prefix=${exec_prefix}                       \
    --bindir=${bindir}                                 \
    --sbindir=${sbindir}                               \
    --libexecdir=${libexecdir}                         \
    --datadir=${datadir}                               \
    --sysconfdir=${sysconfdir}                         \
    --sharedstatedir=${sharedstatedir}                 \
    --localstatedir=${localstatedir}                   \
    --libdir=${libdir}                                 \
    --includedir=${includedir}                         \
    --infodir=${infodir}                               \
    --mandir=${mandir}                                 \
    --with-cyrus-sasl=no                               \
    --enable-dynamic                                   \
    --enable-aci                                       \
    --enable-cleartext                                 \
    --enable-crypt                                     \
    --enable-lmpasswd                                  \
    --enable-spasswd=no                                \
    --enable-phonetic                                  \
    --enable-rewrite                                   \
    --enable-rlookups                                  \
    --disable-slp                                      \
    --disable-wrappers                                 \
    --enable-bdb                                       \
    --enable-dnssrv                                    \
    --enable-ldap                                      \
    --enable-ldbm                                      \
    --enable-meta                                      \
    --enable-monitor                                   \
    --enable-null                                      \
    --enable-passwd                                    \
    --disable-perl                                     \
    --enable-shell                                     \
    --enable-sql=no                                    \
    --enable-static=no                                 \
    --enable-shared=yes                                \

Then I replaced libtool in my .build directory (not the toplevel dir) with the
latest libtool from libtool-devel-1.5.3 then

make devel
make

all where fine and I had shared libs and the servers. Even the make check run
was fine except one test script (which I renamed).

The 

make install DESTDIR=${instdir}

run somehow messed everything up. The libraries got relinked during this step
and the resulting executables could not initialize properly anmore. At least
that's what the windows popup box was saying.

That's the reason for the static libs. If your recipe with the above patch works
I can rebuild everything.

It would be interesting to know why the make check run works but after installation
the resulting shared libs don't work anymore. Charles ??

    Corinna> Corinna

Ciao
  Volker


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]