openssl/openssl

Building OpenSSL 3.0 on z/OS (IBM mainframe) fails. Linker cannot handle duplicate file names in source tree

Open

#23 216 ouverte le 5 janv. 2024

Voir sur GitHub
 (11 commentaires) (0 réactions) (0 assignés)C (11 262 forks)batch import
help wantedtriaged: bug

Métriques du dépôt

Stars
 (30 157 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

When building on z/OS, the fact that there are multiple files named engine.c (info.c, names.c, provider.c, and driver.c ) causes the linker/binder to get confused. EX: openssl-3.0.11/apps/engine.c openssl-3.0.11/apps/lib/engine.c

The linker/binder errors look like this when linking the executable "openssl": IEW2459W 9206 INCLUDED MEMBER get_cipher_from_engine FAILED TO RESOLVE REFERENCE.

IEW2497W 9229 THE SYMBOL get_cipher_from_engine WAS EXPECTED TO BE RESOLVED BY INCLUDING MEMBER libapps-lib-engine.o FROM THE LIBRARY DEFINED BY DDNAME /0000038

In previous versions, OpenSSL has done an excellent job of preventing this problem by having every .c file have a unique name across all directories. I see that in 3.0.X, OpenSSL builds the .o/.obj files with unique names which helps, but does not go far enough for the z/OS toolset.

I was able to get around this by renaming files and editing the build.info files before the configure step as follows: mv apps/engine.c apps/apps_engine.c mv apps/info.c apps/apps_info.c mv apps/lib/names.c apps/lib/apps_names.c mv test/testutil/provider.c test/testutil/test_provider.c mv test/testutil/driver.c test/testutil/test_driver.c mv apps/build.info apps/build.info.orig mv apps/lib/build.info apps/lib/build.info.orig mv test/build.info test/build.info.orig cat apps/build.info.orig | sed "s@OPENSSLSRC engine.c@OPENSSLSRC apps_engine.c@" | sed "s@info.c@apps_info.c@" > apps/build.info cat apps/lib/build.info.orig | sed "s@ names.c@ apps_names.c@" > apps/lib/build.info cat test/build.info.orig | sed "s@/provider.c@/test_provider.c@" | sed "s@driver.c@test_driver.c@"> test/build.info

Guide contributeur