OpenVMS Notes: MariaDB Client Build Anomaly

created: 2018-04-14
edit : 2018-04-21

Simplest MySQL Client Demo Program (also works with MariaDB)

//
// title:	mysql_demo01.c
// purpose:	a C API client demo for MySQL (and MariaDB)
// reference:	https://dev.mysql.com/doc/refman/5.5/en/c-api-building-clients.html
//
#define __NEW_STARLET   1						// enable strict starlet (>= OpenVMS70)
//
//	ANSI C headers
//
#include <stdio.h>							//
#include <stdlib>							//
//
//	MySQL headers (directory: 'mysql055_root:[include.mysql]')
//
//	The next include is okay for MultiNet but will cause problems with "TCPIP
//	Services" or TCPware (throws error: "-F- Cannot find file ").
//	For those stacks just comment out the next line.
//
#include <my_global.h>							// MultiNet only
#include <mysql.h>							//
//
//	main
//
//	execute a function in the client library to prove we can properly compile-link
//
int main(int argc, char **argv) {
    printf("MySQL client version: %s\n", mysql_get_client_info());
    exit(0);
}

Compile on OpenVMS

$!
$! title:	mysql_compile.com
$! purpose:	DCL script to compile
$!
$	cc	mysql_demo01.c				-
		/pointer=32				-
		/float=ieee				-
		/ieee=denorm				-
		/name=(as_is,shorten)			-
		/prefix_library_entries=all_entries	-
		/include=mysql055_root:[include.mysql]
$

Link-1 on OpenVMS Itanium (this works perfectly)

$!
$! title:	mysql_link.com
$! pupose:	DCL script to link
$!
$link mysql_demo01.obj	-
 /SELECTIVE		-
 /NOinformationals	-
 , sys$input/opt
 mysql055_root:[lib.IA64]libclientlib.olb/library
 mysql055_root:[lib.IA64]libmysys.olb/library
 mysql055_root:[lib.IA64]libstrings.olb/library
 mysql055_root:[lib.IA64]libvio.olb/library
 mysql055_root:[lib.IA64]libz.olb/library
 mysql055_root:[lib.IA64]ssl_libssl32.olb/library
 mysql055_root:[lib.IA64]ssl_libcrypto32.olb/library

Link-2 on OpenVMS Itanium (this fails with 53 warnings)

comments:

  • in this example I am attempting to link to 32-bit SSL1$ libraries which are based upon OpenSSL-1.0 and higher. This fails with 53 warnings.
  • in another example (not shown) I tried linking to 32-bit SSL$ libraries (based upon OpenSSL-0.9 and lower) which failed the same way
  • "I think" programs linked this way work properly provided SSL-encryption is not attempted
    caveat: there is probably no good reason to enable SSL-encryption when mysql-client routines reside on the same platform as mysql-server. But when clients and servers are on different platforms, then any packet sniffer will be able to see the usernames and passwords in your connect statements.
  • Why do this? Best practice directives from security audits are recommending that developers have their applications link to a single run-time library rather than linking to private libraries. On Linux platforms (where the files usually have the extension ".so") the associated programs are always smaller. Linking to shared libraries on VMS and OpenVMS systems also produces smaller binaries.
$!
$! title:	mysql_link.com
$! pupose:	DCL script to link
$!
$link mysql_demo01.obj	-
 /SELECTIVE		-
 /NOinformationals	-
 , sys$input/opt
 mysql055_root:[lib.IA64]libclientlib.olb/library
 mysql055_root:[lib.IA64]libmysys.olb/library
 mysql055_root:[lib.IA64]libstrings.olb/library
 mysql055_root:[lib.IA64]libvio.olb/library
 mysql055_root:[lib.ia64]LIBZ.OLB;1/library
 SYS$LIBRARY:SSL1$LIBSSL_SHR32.EXE;1/share
 SYS$LIBRARY:SSL1$LIBCRYPTO_SHR32.EXE;1/share


%ILINK-W-NUDFSYMS, 53 undefined symbols:
%ILINK-W-USEUNDEF, undefined symbol SSL_get_current_cipher referenced
        section: $CODE$
        offset: %X0000000000005E90  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CIPHER_get_name referenced
        section: $CODE$
        offset: %X0000000000005EB0  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_error_string_n referenced
        section: $CODE$
        offset: %X0000000000007400  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_get_peer_certificate referenced
        section: $CODE$
        offset: %X0000000000007540  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_get_verify_result referenced
        section: $CODE$
        offset: %X0000000000007580  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol X509_get_subject_name referenced
        section: $CODE$
        offset: %X00000000000075B0  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol X509_NAME_get_index_by_NID referenced
        section: $CODE$
        offset: %X00000000000075E0  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol X509_NAME_get_entry referenced
        section: $CODE$
        offset: %X0000000000007620  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol X509_NAME_ENTRY_get_data referenced
        section: $CODE$
        offset: %X0000000000007650  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ASN1_STRING_data referenced
        section: $CODE$
        offset: %X0000000000007690  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ASN1_STRING_length referenced
        section: $CODE$
        offset: %X00000000000076C0  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol X509_free referenced
        section: $CODE$
        offset: %X0000000000007780  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_free referenced
        section: $CODE$
        offset: %X000000000000D2D0  slot: 2
        module: client 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_read referenced
        section: $CODE$
        offset: %X0000000000000980  slot: 2
        module: mysql_async 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_get_error referenced
        section: $CODE$
        offset: %X00000000000009C0  slot: 2
        module: mysql_async 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_write referenced
        section: $CODE$
        offset: %X0000000000000B80  slot: 2
        module: mysql_async 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_get_error referenced
        section: $CODE$
        offset: %X0000000000000BC0  slot: 2
        module: mysql_async 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBCLIENTLIB.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol DH_new referenced
        section: $CODE$
        offset: %X0000000000000020  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol BN_bin2bn referenced
        section: $CODE$
        offset: %X0000000000000080  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol BN_bin2bn referenced
        section: $CODE$
        offset: %X00000000000000C0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol DH_free referenced
        section: $CODE$
        offset: %X0000000000000110  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_library_init referenced
        section: $CODE$
        offset: %X0000000000000210  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol OPENSSL_add_all_algo_noconf referenced
        section: $CODE$
        offset: %X0000000000000230  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_load_error_strings referenced
        section: $CODE$
        offset: %X0000000000000290  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSLv23_client_method referenced
        section: $CODE$
        offset: %X0000000000000320  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSLv23_server_method referenced
        section: $CODE$
        offset: %X0000000000000340  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_new referenced
        section: $CODE$
        offset: %X0000000000000360  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_get_error_line_data referenced
        section: $CODE$
        offset: %X00000000000003C0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_ctrl referenced
        section: $CODE$
        offset: %X0000000000000420  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_set_cipher_list referenced
        section: $CODE$
        offset: %X0000000000000450  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_get_error_line_data referenced
        section: $CODE$
        offset: %X00000000000004A0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_free referenced
        section: $CODE$
        offset: %X00000000000004D0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_load_verify_locations referenced
        section: $CODE$
        offset: %X0000000000000530  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_get_error_line_data referenced
        section: $CODE$
        offset: %X00000000000005A0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_free referenced
        section: $CODE$
        offset: %X00000000000005D0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_set_def_verify_paths referenced
        section: $CODE$
        offset: %X0000000000000620  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_get_error_line_data referenced
        section: $CODE$
        offset: %X0000000000000670  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_free referenced
        section: $CODE$
        offset: %X00000000000006A0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_use_cert_chain_file referenced
        section: $CODE$
        offset: %X0000000000000770  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_use_PrivateKey_file referenced
        section: $CODE$
        offset: %X0000000000000850  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_check_private_key referenced
        section: $CODE$
        offset: %X0000000000000930  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_get_error_line_data referenced
        section: $CODE$
        offset: %X0000000000000A20  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_free referenced
        section: $CODE$
        offset: %X0000000000000A50  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol DH_new referenced
        section: $CODE$
        offset: %X0000000000000A90  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol BN_bin2bn referenced
        section: $CODE$
        offset: %X0000000000000AF0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol BN_bin2bn referenced
        section: $CODE$
        offset: %X0000000000000B30  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol DH_free referenced
        section: $CODE$
        offset: %X0000000000000B80  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_ctrl referenced
        section: $CODE$
        offset: %X0000000000000BD0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol DH_free referenced
        section: $CODE$
        offset: %X0000000000000BF0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_set_verify referenced
        section: $CODE$
        offset: %X0000000000000CF0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_ctrl referenced
        section: $CODE$
        offset: %X0000000000000DB0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_set_verify referenced
        section: $CODE$
        offset: %X0000000000000DE0  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_set_session_id_context referenced
        section: $CODE$
        offset: %X0000000000000E10  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_CTX_free referenced
        section: $CODE$
        offset: %X0000000000000E70  slot: 2
        module: viosslfactories 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_read referenced
        section: $CODE$
        offset: %X00000000000000C0  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_write referenced
        section: $CODE$
        offset: %X00000000000001B0  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_set_quiet_shutdown referenced
        section: $CODE$
        offset: %X0000000000000220  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_shutdown referenced
        section: $CODE$
        offset: %X0000000000000240  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_set_quiet_shutdown referenced
        section: $CODE$
        offset: %X0000000000000310  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_shutdown referenced
        section: $CODE$
        offset: %X0000000000000330  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_free referenced
        section: $CODE$
        offset: %X00000000000003A0  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_new referenced
        section: $CODE$
        offset: %X0000000000000480  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_get_error referenced
        section: $CODE$
        offset: %X00000000000004B0  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_clear referenced
        section: $CODE$
        offset: %X0000000000000510  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_get_session referenced
        section: $CODE$
        offset: %X0000000000000530  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_SESSION_set_timeout referenced
        section: $CODE$
        offset: %X0000000000000560  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_set_fd referenced
        section: $CODE$
        offset: %X0000000000000590  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_ctrl referenced
        section: $CODE$
        offset: %X00000000000005C0  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_get_error referenced
        section: $CODE$
        offset: %X0000000000000620  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_free referenced
        section: $CODE$
        offset: %X0000000000000650  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_get_fd referenced
        section: $CODE$
        offset: %X00000000000006A0  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_accept referenced
        section: $CODE$
        offset: %X0000000000000730  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_connect referenced
        section: $CODE$
        offset: %X0000000000000790  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_pending referenced
        section: $CODE$
        offset: %X0000000000000850  slot: 2
        module: viossl 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_get_fd referenced
        section: $CODE$
        offset: %X0000000000001460  slot: 2
        module: viosocket 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_get_fd referenced
        section: $CODE$
        offset: %X00000000000016A0  slot: 2
        module: viosocket 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_pending referenced
        section: $CODE$
        offset: %X00000000000018C0  slot: 2
        module: viosocket 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol SSL_pending referenced
        section: $CODE$
        offset: %X0000000000001A60  slot: 2
        module: viosocket 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_remove_state referenced
        section: $CODE$
        offset: %X0000000000000740  slot: 2
        module: vio 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol ERR_free_strings referenced
        section: $CODE$
        offset: %X0000000000000760  slot: 2
        module: vio 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol EVP_cleanup referenced
        section: $CODE$
        offset: %X0000000000000780  slot: 2
        module: vio 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 
%ILINK-W-USEUNDEF, undefined symbol CRYPTO_cleanup_all_ex_data referenced
        section: $CODE$
        offset: %X00000000000007A0  slot: 2
        module: vio 
        file: KAWC09$DKB1:[MYSQL055.lib.ia64]LIBVIO.OLB;2 

Failure Mode Analysis

  • these commands prove that the share library provided by HPE requires uppercase symbols
    $      ana/image SSL1$LIBcrypto_SHR32.EXE/sect=SYMBOL_VECTOR
    $ pipe ana/image SSL1$LIBcrypto_SHR32.EXE/sect=SYMBOL_VECTOR | search sys$input X509_free 
  • Meanwhile, the libraries provided by Mark Berryman are demanding mixed case symbols

Solution-1 (preferred)

  • I have not yet stumbled across the correct linker incantation to force a successful link
    • "CASE_SENSITIVE=NO" seems to only affect object files looking into libraries (not libraries linking against libraries)
    • "SYMBOL_VECTOR" only applies to generating shared libraries (something we are not doing here)
  • The only solution appears to be this: publish two sets of libraries (one compiled with "/names=as_is" while the other is compiled with "/names=upper"). This was the method employed by JFP for MySQL-5.1 on OpenVMS and can be seen here
    KAWC09(DVLP)::Neil> dir [...]*.olb/date/siz/width=file=25
    
    Directory SYS$COMMON:[MYSQL051.VMS.lib]
    
    mysqlclient_mixed.olb;1       2580   9-FEB-2011 15:07:54.56
    mysqlclient_upper.olb;1       2572   9-FEB-2011 15:14:19.83
    
    Total of 2 files, 5152 blocks.
    

Solution-2 (ad hoc workaround)

  • Write some sort of wrapper which will translate mixed-case function names to uppercase names

Back to Home
Neil Rieck
Waterloo, Ontario, Canada.