hi all,

after being pointed to the "install_name" ld flag by Apple engineering,

Check the man page for ld under install_name - you'll see how  libraries can
be linked with the full path to where they're  ultimately going or not.
Clearly, in one case this happened, and in  the other not.

i'd looked for install_name in the openssl 0.9.8 src, to no avail ...

but, given the above pointer, and doing a little checking ALSO in 0.9.7 src, i find:

% ls temp/
        openssl-0.9.7g  openssl-0.9.7g.tar.gz  openssl-0.9.8  
openssl-0.9.8.tar.gz

% grep -rln install_name .
        ./openssl-0.9.7g/demos/engines/rsaref/Makefile
        ./openssl-0.9.7g/Makefile
        ./openssl-0.9.7g/Makefile.bak
        ./openssl-0.9.7g/Makefile.org
        ./openssl-0.9.8/demos/engines/rsaref/Makefile

% grep install_name `grep -rln install_name .`
./openssl-0.9.7g/demos/engines/rsaref/Makefile: SHAREDFLAGS='-dynamiclib -install_name $(SHLIB)' \ ./openssl-0.9.7g/Makefile: -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \ ./openssl-0.9.7g/Makefile.bak: -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \ ./openssl-0.9.7g/Makefile.org: -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \ ./openssl-0.9.8/demos/engines/rsaref/Makefile: SHAREDFLAGS='-dynamiclib -install_name $(SHLIB)' \


in ./openssl-0.9.7g/Makefile, @320:

        # For Darwin AKA Mac OS/X (dyld)
        do_darwin-shared:
                libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
                if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
                        libs="$(LIBKRB5) $$libs"; \
                fi; \
                ( set -x; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
                        lib$$i.a $$libs -all_load -current_version 
${SHLIB_MAJOR}.${SHLIB_MINOR} \
                        -compatibility_version ${SHLIB_MAJOR}.`echo 
${SHLIB_MINOR} | cut -d. -f1` \
---->        -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
                libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \
                echo "" ; \
                done

whereas in ./openssl-0.9.8/Makefile.shared @198:

        # For Darwin AKA Mac OS/X (dyld)
        link_o.darwin:
                @ $(CALC_VERSIONS); \
                SHLIB=lib$(LIBNAME); \
                SHLIB_SUFFIX=.dylib; \
                ALLSYMSFLAGS='-all_load'; \
                NOALLSYMSFLAGS=''; \
                SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS)"; \
                if [ -n "$(LIBVERSION)" ]; then \
                        SHAREDFLAGS="$$SHAREDFLAGS -current_version 
$(LIBVERSION)"; \
                fi; \
                if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
                        SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version 
$$SHLIB_SOVER_NODOT"; \
                fi; \
                $(LINK_SO_O)
        link_a.darwin:
                @ $(CALC_VERSIONS); \
                SHLIB=lib$(LIBNAME); \
                SHLIB_SUFFIX=.dylib; \
                ALLSYMSFLAGS='-all_load'; \
                NOALLSYMSFLAGS=''; \
                SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS)"; \
                if [ -n "$(LIBVERSION)" ]; then \
                        SHAREDFLAGS="$$SHAREDFLAGS -current_version 
$(LIBVERSION)"; \
                fi; \
                if [ -n "$$SHLIB_SOVER_NODOT" ]; then \
                        SHAREDFLAGS="$$SHAREDFLAGS -compatibility_version 
$$SHLIB_SOVER_NODOT"; \
                fi; \
                $(LINK_SO_A)
        link_app.darwin:    # is there run-path on darwin?
                $(LINK_APP)

NOTE:  *no* instance of the "install_name"

iiuc, then, the 'issue' of incomplete install_name -- i.e., the missing prepended paths -- lies in this stanza ... and it's a code bug in the latest OpenSSL.

cheers,

richard

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to