On May 20 14:45, Corinna Vinschen wrote: > On May 20 11:21, Corinna Vinschen wrote: > > On May 20 01:43, Richard Levitte - VMS Whacker wrote: > > > In message <[EMAIL PROTECTED]> on Fri, 20 May 2005 00:15:40 +0200, > > > Corinna Vinschen <[EMAIL PROTECTED]> said: > > > > > > vinschen> In both cases I'll send a patch to fix that. It's just > > > vinschen> rather late and especially the engine Makefile change needs > > > vinschen> some testing, so give me a couple of days. > > > > > > If you get it to us before Monday, it will be there in the next > > > planned beta (see http://www.openssl.org/news/state.html). > > > > Cool. I see what I can do. We're expecting a rainy weekend anyway :-)
Ok, below is a patch which should solve the problems on Cygwin. It tweaks Makefile.org, Makefile.shared, engines/Makefile and util/cygwin.sh. A short description of the changes: Makefile.org: - The libclean target now also removes DLLs in toplevel and engines, as well as *.a files in engines which are at least created when building engines on Cygwin. - The install_sw target installs DLLs on Cygwin with version number again, as introduced with OpenSSL 0.9.7. This allows cooperation of multiple versions of OpenSSL on the same machine, as on other platforms. Makefile.shared: - The link_o.cygwin target contains a small tweak which allows to build DLLs with and without version number, depending of LIBVERSION being empty or not. Since LIBVERSION is not set in the engines Makefile, engines are built without version numbers. - The link_a.cygwin target creates the cygcrypto DLL with another base address. This is necessary to avoid collision with the Cygwin DLL itself. The address 0x61200000 used right now collides at least with the Cygwin heap in the upcoming 1.5.17 release. Since the Cygwin DLL is the only DLL in a Cygwin system which must not be rebased, I chose a new, save base address (0x63000000) for the cygcrypto DLL instead. - The link_a.cygwin target also takes version numbering in the DLL name into account. engines/Makefile: - The install target installs the engines not as cygFOO.dll, but as libFOO.so instead. This might come as a surprise, but since engines are run-time loaded using dlopen and the dlfcn_name_converter is used also for Cygwin, that's the way to go :-) What I'm not sure about is, if the engines shouldn't better be installed into /usr/bin. Otherwise they are only loadable using full paths, or when $PATH also contains the engine installation path, according to Windows DLL loading rules. I'd be grateful about a hint here... util/cygwin.sh: - Accomodates the engines installation now. - Installs also the certificates from the certs directory. This was never correct before! Shame on me. Thanks for considering, Corinna --- openssl-0.9.8-beta1.ORIG/Makefile.org 2005-05-19 03:48:45.000000000 +0200 +++ openssl-0.9.8-beta1/Makefile.org 2005-05-20 16:19:21.128963500 +0200 @@ -276,7 +276,7 @@ Makefile: Makefile.org Configure config @false libclean: - rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib + rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib clean: libclean rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c @@ -476,13 +476,13 @@ install_sw: chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ else \ - c=`echo $$i | sed 's/^lib/cyg/'`; \ + c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ - cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ fi ); \ fi; \ done; \ --- openssl-0.9.8-beta1.ORIG/Makefile.shared 2005-05-19 04:13:10.000000000 +0200 +++ openssl-0.9.8-beta1/Makefile.shared 2005-05-20 15:44:47.609987200 +0200 @@ -231,7 +231,8 @@ link_o.cygwin: SHLIB=cyg$(LIBNAME); \ expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \ SHLIB_SUFFIX=.dll; \ - SHLIB_SOVER=-$(LIBVERSION); \ + LIBVERSION="$(LIBVERSION)"; \ + SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \ @@ -242,16 +243,16 @@ link_a.cygwin: SHLIB=cyg$(LIBNAME); \ expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \ SHLIB_SUFFIX=.dll; \ - SHLIB_SOVER=; \ + SHLIB_SOVER=-$(LIBVERSION); \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ - base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x61200000; \ + base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \ [ -f apps/$$SHLIB$$SHLIB_SUFFIX ] && rm apps/$$SHLIB$$SHLIB_SUFFIX; \ [ -f test/$$SHLIB$$SHLIB_SUFFIX ] && rm test/$$SHLIB$$SHLIB_SUFFIX; \ $(LINK_SO_A) || exit 1; \ - cp -p $$SHLIB$$SHLIB_SUFFIX apps/; \ - cp -p $$SHLIB$$SHLIB_SUFFIX test/ + cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX apps/; \ + cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX test/ link_app.cygwin: $(LINK_APP) --- openssl-0.9.8-beta1.ORIG/engines/Makefile 2005-05-19 04:13:09.000000000 +0200 +++ openssl-0.9.8-beta1/engines/Makefile 2005-05-20 16:47:03.349489100 +0200 @@ -83,15 +83,19 @@ files: # XXXXX This currently only works on systems that use .so as suffix -# for shared libraries. +# for shared libraries as well as for Cygwin which uses the +# dlfcn_name_converter and therefore stores the engines with .so suffix, too. install: @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... @if [ -n "$(SHARED_LIBS)" ]; then \ set -e; \ for l in $(LIBNAMES); do \ ( echo installing $$l; \ - cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + if [ "$(PLATFORM)" != "Cygwin" ]; then \ + cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + else \ + cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + fi; \ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so ); \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so; \ + ); \ done; \ fi --- openssl-0.9.8-beta1.ORIG/util/cygwin.sh 2005-04-27 10:56:15.000000000 +0200 +++ openssl-0.9.8-beta1/util/cygwin.sh 2005-05-20 18:12:26.944386700 +0200 @@ -47,6 +47,14 @@ function doc_install() create_cygwin_readme } +function certs_install() +{ + CERTS_DIR=${INSTALL_PREFIX}/usr/ssl/certs + + mkdir -p ${CERTS_DIR} + cp -rp certs/* ${CERTS_DIR} +} + function create_cygwin_readme() { README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin @@ -104,6 +112,8 @@ base_install doc_install +certs_install + create_cygwin_readme create_profile_files @@ -112,11 +122,13 @@ cd ${INSTALL_PREFIX} strip usr/bin/*.exe usr/bin/*.dll # Runtime package -find etc usr/bin usr/share/doc usr/ssl/certs usr/ssl/man/man[157] \ - usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d | +find etc usr/bin usr/lib/engines usr/share/doc usr/ssl/certs \ + usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private \ + -empty -o \! -type d | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - # Development package -find usr/include usr/lib usr/ssl/man/man3 -empty -o \! -type d | +find usr/include usr/lib/*.a usr/lib/pkgconfig usr/ssl/man/man3 \ + -empty -o \! -type d | tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 - ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2 -- Corinna Vinschen Cygwin Project Co-Leader Red Hat, Inc. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]