1748254 Members
3977 Online
108760 Solutions
New Discussion юеВ

Re: Mysql link error

 
SOLVED
Go to solution
Dario Karlen
Frequent Advisor

Mysql link error

I've installed JPFs MySQL server 5.1 on a I64 VMS V8.3. The Server is running well, but when I try to compile and link a C program some errors occur.
I ve got an option file sql.opt:
MYSQL051_ROOT:[000000.VMS.LIB]MYSQLCLIENT_MIXED.OLB/lib
MYSQL051_ROOT:[000000.VMS.LIB]LIBZ_SHR32.exe/share
DKA0:[VMS$COMMON.SYSLIB]SSL$LIBSSL_SHR32/share
DKA0:[VMS$COMMON.SYSLIB]SSL$LIBCRYPTO_SHR32/share

and a compile/link program:
$ cc/float=ieee/iee=denorm/name=(as_is, trunc) -
/INCLUDE=SYS$COMMON:[000000.MYSQL051.INCLUDE]mysql testmysql
$ link testmysql, -
INA_DISK:[INA.PROGS.DK]sql/opt, -
MYSQL051_ROOT:[000000.VMS.LIB]MYSQLCLIENT_MIXED/lib

but when I try to run the compile/link program, some undefined symbols are detected:
ina > @linkmysql
%ILINK-W-NUDFSYMS, 2 undefined symbols:
%ILINK-I-UDFSYM, my_time
%ILINK-I-UDFSYM, thd_lib_detected
%ILINK-W-USEUNDEF, undefined symbol my_time referenced
section: $CODE$
offset: %X0000000000000270 slot: 2
module: client
file: MYSQL051_ROOT:[000000.VMS.LIB]MYSQLCLIENT_MIXED.OLB;1
%ILINK-W-USEUNDEF, undefined symbol my_time referenced
section: $CODE$
offset: %X00000000000002F0 slot: 2
module: client
file: MYSQL051_ROOT:[000000.VMS.LIB]MYSQLCLIENT_MIXED.OLB;1
%ILINK-W-USEUNDEF, undefined symbol thd_lib_detected referenced
section: $CODE$
offset: %X0000000000000000 slot: 1
module: my_thr_init
file: MYSQL051_ROOT:[000000.VMS.LIB]MYSQLCLIENT_MIXED.OLB;1
%ILINK-W-USEUNDEF, undefined symbol thd_lib_detected referenced
section: $CODE$
offset: %X0000000000000010 slot: 1
module: my_thr_init
file: MYSQL051_ROOT:[000000.VMS.LIB]MYSQLCLIENT_MIXED.OLB;1

but my_time should be included in the mysqlclient_mixed.olb.
Any ideas how I can solve this problem?
Thanks in advance.
16 REPLIES 16
Hoff
Honored Contributor

Re: Mysql link error

Check with JFP. There's a potential for an error or for a improvement in the kit or in the kit documentation.

I'd guess that the dependency isn't found until after the OLB has been processed.

And an OLB? I'll assume there's a reason JFP used that approach and not a shareable image version of that code.

As for options (and off the top), I might well try the following:

$ link testmysql, -
MYSQLCLIENT_MIXED/lib, -
sql/opt

and try:

$ link testmysql, -
sql/opt, -
MYSQLCLIENT_MIXED/lib, -
MYSQLCLIENT_MIXED/lib

--

And MYSQL051_ROOT:[000000.VMS.LIB]?

if that's a real rooted logical name, try:

MYSQL051_ROOT:[VMS.LIB]

Do also look for a logical that specifically references the VMS Library area.
Jan van den Ende
Honored Contributor

Re: Mysql link error

Re Hoff:

>>>
And MYSQL051_ROOT:[000000.VMS.LIB]?

if that's a real rooted logical name, try:

MYSQL051_ROOT:[VMS.LIB]
<<<

Yeah, one more case of that BL***D [000000. construct.
Regular readers will know my aversion.

Dario: DO follow Hoff's request, and report the result! I have a feeling that it DOES make a difference, and I would love another example of whence my aversion comes.

Proost.

Have one on me

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Dario Karlen
Frequent Advisor

Re: Mysql link error

Thanks for your answer, I tried as you mentioned:

sql.opt:
MYSQL051_ROOT:[VMS.LIB]MYSQLCLIENT_MIXED.OLB/lib
MYSQL051_ROOT:[VMS.LIB]LIBZ_SHR32.exe/share
DKA0:[VMS$COMMON.SYSLIB]SSL$LIBSSL_SHR32/share
DKA0:[VMS$COMMON.SYSLIB]SSL$LIBCRYPTO_SHR32/share

linkmysql.com:
$ cc/float=ieee/iee=denorm/name=(as_is, trunc) -
/INCLUDE=mysql testmysql
$ link testmysql, -
sql/opt, -
MYSQL051_ROOT:[VMS.LIB]MYSQLCLIENT_MIXED/lib, -
MYSQL051_ROOT:[VMS.LIB]MYSQLCLIENT_MIXED/LIB

but still the same result: two undefined symbols.
ina > @linkmysql
%ILINK-W-NUDFSYMS, 2 undefined symbols:
%ILINK-I-UDFSYM, my_time
%ILINK-I-UDFSYM, thd_lib_detected
%ILINK-W-USEUNDEF, undefined symbol my_time referenced
section: $CODE$
offset: %X0000000000000270 slot: 2
module: client
file: MYSQL051_ROOT:[VMS.LIB]MYSQLCLIENT_MIXED.OLB;1

there is only one MySQL symbol:
ina > sh log *sql*

(LNM$PROCESS_TABLE)

(LNM$JOB_884FECC0)

(LNM$GROUP_000300)

(LNM$SYSTEM_TABLE)

"MYSQL051_ROOT" = "ALESA$DKA0:[SYS0.SYSCOMMON.MYSQL051.]"

(LNM$SYSCLUSTER_TABLE)

(DECW$LOGICAL_NAMES)


x2084
Trusted Contributor

Re: Mysql link error

I would double check if the names are in the library. LIBRARY/LIST/NAMES should do that. The undefined symbols are in lowercase, the OLB needs to have them in lowercase as well.

On the other hand, an OLB can contain object modules without having their symbols in the library's symbol table. You can ask ANALYZE/OBJECT to look at all object modules in the library and format the symbols. If you find the symbol in that output you can explicitly include the object module.

Anyway, as already said, it looks like something is missing in the documentation or in the envnironment.

Dario Karlen
Frequent Advisor

Re: Mysql link error

Thanks.

I checked the library:
lib/list/names MYSQLCLIENT_MIXED.OLB

Module my_time

TIME_to_ulonglong
TIME_to_ulonglong_date
TIME_to_ulonglong_datetime
TIME_to_ulonglong_time
calc_daynr
calc_days_in_year
check_date
check_time_range
days_in_month
init_time
log_10_int
my_TIME_to_str
my_date_to_str
my_datetime_to_str
my_system_gmt_sec
my_time_to_str_default
number_to_datetime
set_zero_time
str_to_datetime
str_to_time
year_2000_handling

my_time seems OK.

anal/obj MYSQLCLIENT_MIXED.OLB output is attached.

Dario Karlen
Frequent Advisor

Re: Mysql link error

I was wrong, my_time is not the modul, its the symbol in module client:

%ILINK-W-USEUNDEF, undefined symbol my_time referenced
section: $CODE$
offset: %X0000000000000270 slot: 2
module: client
file: MYSQL051_ROOT:[VMS.LIB]MYSQLCLIENT_MIXED.OLB;1

and
%ILINK-W-USEUNDEF, undefined symbol thd_lib_detected referenced
section: $CODE$
offset: %X0000000000000000 slot: 1
module: my_thr_init
file: MYSQL051_ROOT:[VMS.LIB]MYSQLCLIENT_MIXED.OLB;1

how can I fix this? I already send a mail to JFP.

Module client

cli_advanced_command
cli_read_rows
cli_safe_read
default_client_charset_info
end_server
free_old_query
free_rows
my_connect
mysql_close
mysql_detach_stmt_list
mysql_errno
mysql_error
mysql_fetch_lengths
mysql_fetch_row
mysql_free_result
mysql_get_server_version
mysql_get_ssl_cipher
mysql_init
mysql_init_character_set
mysql_num_fields
mysql_num_rows
mysql_options
mysql_port
mysql_read_default_options
mysql_real_connect
mysql_real_query
mysql_reconnect
mysql_select_db
mysql_send_query
mysql_set_character_set
mysql_ssl_set
mysql_store_result
mysql_unix_port
not_error_sqlstate
set_mysql_error
sql_protocol_names_lib
sql_protocol_typelib
unknown_sqlstate
unpack_fields

Module my_thr_init

THR_thread_count
_my_thread_var
my_thread_dbug_id
my_thread_end
my_thread_end_wait_time
my_thread_global_end
my_thread_global_init
my_thread_init
my_thread_name


labadie_1
Honored Contributor

Re: Mysql link error

JFP is on holiday this week, wait for next Monday.
Jan van den Ende
Honored Contributor

Re: Mysql link error

@ Gerard Labadie:

>>>
JFP is on holiday this week, wait for next Monday.
<<<

Surely, in France Easter Monday ("Lundi de Paques") is a holiday?

So, make that "wait for Tuesday".

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Willem Grooters
Honored Contributor

Re: Mysql link error

I vaguely remember from other discussions (on JFP's MySQL list and forum, probably) that there are TWO libraries: The one you seem to use is allowing mixed-case names, and there must be one using uppercase only.
Worth a look to try that one.

Or put your question here:
http://www.pi-net.dyndns.org/piforum/viewforum.php?f=3

Willem Grooters
OpenVMS Developer & System Manager