As a followup to my previous message on ser compilation troubles under
FreeBSD 4.10 / mysql 4.0.18, if you try to compile mysql module
statically using
gmake CC=gcc32 static_modules=mysql all
(I even did ln -s /usr/local/include/mysql /usr/include/mysql)
The following error occurs:
Making static module
gmake[1]: Entering directory `/usr/home/vahan/sip_router2/modules/mysql'
gmake[1]: Nothing to be done for `static'.
gmake[1]: Leaving directory `/usr/home/vahan/sip_router2/modules/mysql'
gcc32 -Wl,-O2 -Wl,-E action.o crc.o data_lump.o data_lump_rpl.o
dprint.o dset.o error.o fifo_server.o flags.o forward.o hash_func.o
ip_addr.o main.o md5.o md5utils.o modparam.o msg_translator.o pass_fd.o
proxy.o re.o receive.o resolve.o route.o route_struct.o script_cb.o
sr_module.o stats.o tcp_main.o tcp_read.o timer.o udp_server.o usr_avp.o
mem/f_malloc.o mem/mem.o mem/memtest.o mem/q_malloc.o mem/shm_mem.o
mem/vq_malloc.o parser/hf.o parser/msg_parser.o parser/parse_content.o
parser/parse_cseq.o parser/parse_disposition.o parser/parse_event.o
parser/parse_expires.o parser/parse_fline.o parser/parse_from.o
parser/parse_hname2.o parser/parse_hostport.o parser/parse_nameaddr.o
parser/parse_param.o parser/parse_rr.o parser/parse_to.o
parser/parse_uri.o parser/parse_via.o parser/parser_f.o
parser/digest/digest.o parser/digest/digest_parser.o
parser/digest/param_parser.o parser/contact/contact.o
parser/contact/parse_contact.o db/db.o lex.yy.o cfg.tab.o
modules/mysql/db_con.o modules/mysql/db_mod.o modules/mysql/db_res.o
modules/mysql/db_row.o modules/mysql/db_utils.o modules/mysql/db_val.o
modules/mysql/dbase.o modules/mysql/utils.o -lfl -o ser
modules/mysql/db_res.o: In function `convert_result':
/usr/home/vahan/sip_router2/modules/mysql/db_res.c:53: undefined
reference to `mysql_field_count'
/usr/home/vahan/sip_router2/modules/mysql/db_res.c:74: undefined
reference to `mysql_fetch_fields'
/usr/home/vahan/sip_router2/modules/mysql/db_res.c:147: undefined
reference to `mysql_num_rows'
/usr/home/vahan/sip_router2/modules/mysql/db_res.c:160: undefined
reference to `mysql_fetch_row'
/usr/home/vahan/sip_router2/modules/mysql/db_res.c:162: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/db_res.c:126: undefined
reference to `mysql_error'
modules/mysql/db_row.o: In function `convert_row':
/usr/home/vahan/sip_router2/modules/mysql/db_row.c:62: undefined
reference to `mysql_fetch_lengths'
modules/mysql/db_val.o: In function `val2str':
/usr/home/vahan/sip_router2/modules/mysql/db_val.c:274: undefined
reference to `mysql_real_escape_string'
/usr/home/vahan/sip_router2/modules/mysql/db_val.c:315: undefined
reference to `mysql_real_escape_string'
modules/mysql/dbase.o: In function `db_init':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:96: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:98: undefined
reference to `mysql_init'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:99: undefined
reference to `mysql_real_connect'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:100: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:101: undefined
reference to `mysql_close'
modules/mysql/dbase.o: In function `db_close':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:128: undefined
reference to `mysql_close'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:320: undefined
reference to `mysql_free_result'
modules/mysql/dbase.o: In function `get_result':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:347: undefined
reference to `mysql_store_result'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:349: undefined
reference to `mysql_field_count'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:353: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:354: undefined
reference to `mysql_error'
modules/mysql/dbase.o: In function `db_free_query':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:392: undefined
reference to `mysql_free_result'
modules/mysql/dbase.o: In function `db_query':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:151: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:152: undefined
reference to `mysql_query'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:153: undefined
reference to `mysql_error'
modules/mysql/dbase.o: In function `db_raw_query':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:141: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:152: undefined
reference to `mysql_query'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:153: undefined
reference to `mysql_error'
modules/mysql/dbase.o: In function `db_insert':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:151: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:152: undefined
reference to `mysql_query'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:153: undefined
reference to `mysql_error'
modules/mysql/dbase.o: In function `db_delete':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:151: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:152: undefined
reference to `mysql_query'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:153: undefined
reference to `mysql_error'
modules/mysql/dbase.o: In function `db_update':
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:151: undefined
reference to `mysql_error'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:152: undefined
reference to `mysql_query'
/usr/home/vahan/sip_router2/modules/mysql/dbase.c:153: undefined
reference to `mysql_error'
collect2: ld returned 1 exit status
gmake: *** [ser] Error 1
Please help me compile the beast :)
--
With best regards,
Vahan Yerkanian
ARMINCO Global Telecom