I am having similar problems with the undefined mysql reference issues.
I originally thought the issue might be because I decided to see if
pagelinks were fixed, but disabling it had no effect. I ran "make
distclean" between the two compiles.
Here is midgard-lib (beta7) grabbing the MySQL in the configure, so
yes.. it is finding it:
checking whether to enable SiteGroups... yes
checking whether to enable PageLinks (experimental)... no
checking MySQL location... /usr
checking Expat location... /usr
checking for library containing mysql_connect... -lmysqlclient
checking for library containing XML_ParserCreate... -lexpat
checking for errmsg.h... yes
checking for mysql.h... yes
updating cache ./config.cache
Here is the result of my bad compile section, note that the main ./src
compiled fine. Note that the missing references are in libmidgard, not
mysqlclient:
make[1]: Leaving directory `/home/archives/midgard-lib-1.4beta7/src'
Making all in repligard
make[1]: Entering directory `/home/archives/midgard-lib-1.4beta7/repligard'
cd .. \
&& CONFIG_FILES=repligard/Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating repligard/Makefile
make[1]: Leaving directory `/home/archives/midgard-lib-1.4beta7/repligard'
make[1]: Entering directory `/home/archives/midgard-lib-1.4beta7/repligard'
gcc -DPACKAGE=\"midgard-lib\" -DVERSION=\"1.4-beta7\" -DSTDC_HEADERS=1
-DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DEXPAT_INCLUDE_EXPAT_H=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I.. -I/usr/include/mysql
-I/usr/include -g -O2 -I/usr/lib/glib/include -c common.c
gcc -DPACKAGE=\"midgard-lib\" -DVERSION=\"1.4-beta7\" -DSTDC_HEADERS=1
-DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DEXPAT_INCLUDE_EXPAT_H=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I.. -I/usr/include/mysql
-I/usr/include -g -O2 -I/usr/lib/glib/include -c read.c
gcc -DPACKAGE=\"midgard-lib\" -DVERSION=\"1.4-beta7\" -DSTDC_HEADERS=1
-DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DEXPAT_INCLUDE_EXPAT_H=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I.. -I/usr/include/mysql
-I/usr/include -g -O2 -I/usr/lib/glib/include -c import.c
gcc -DPACKAGE=\"midgard-lib\" -DVERSION=\"1.4-beta7\" -DSTDC_HEADERS=1
-DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DEXPAT_INCLUDE_EXPAT_H=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I.. -I/usr/include/mysql
-I/usr/include -g -O2 -I/usr/lib/glib/include -c rpconfig.c
gcc -DPACKAGE=\"midgard-lib\" -DVERSION=\"1.4-beta7\" -DSTDC_HEADERS=1
-DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DEXPAT_INCLUDE_EXPAT_H=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I.. -I/usr/include/mysql
-I/usr/include -g -O2 -I/usr/lib/glib/include -c iconvxml.c
gcc -DPACKAGE=\"midgard-lib\" -DVERSION=\"1.4-beta7\" -DSTDC_HEADERS=1
-DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DEXPAT_INCLUDE_EXPAT_H=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I.. -I/usr/include/mysql
-I/usr/include -g -O2 -I/usr/lib/glib/include -c schema.c
gcc -DPACKAGE=\"midgard-lib\" -DVERSION=\"1.4-beta7\" -DSTDC_HEADERS=1
-DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DEXPAT_INCLUDE_EXPAT_H=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I.. -I/usr/include/mysql
-I/usr/include -g -O2 -I/usr/lib/glib/include -c export.c
gcc -DPACKAGE=\"midgard-lib\" -DVERSION=\"1.4-beta7\" -DSTDC_HEADERS=1
-DHAVE_CRYPT_H=1 -DHAVE_ICONV=1 -DEXPAT_INCLUDE_EXPAT_H=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I.. -I/usr/include/mysql
-I/usr/include -g -O2 -I/usr/lib/glib/include -c main.c
/bin/sh ../libtool --mode=link gcc -g -O2 -I/usr/lib/glib/include
-L/usr/lib/mysql -L/usr/lib -o repligard common.o read.o import.o
rpconfig.o iconvxml.o schema.o export.o main.o ../src/libmidgard.la
-lexpat -lmysqlclient -lm -lz -lcrypt -L/usr/lib -lglib
mkdir .libs
gcc -g -O2 -I/usr/lib/glib/include -L/usr/lib/mysql -L/usr/lib -o
.libs/repligard common.o read.o import.o rpconfig.o iconvxml.o schema.o
export.o main.o ../src/.libs/libmidgard.so -lexpat -lmysqlclient -lm -lz
-lcrypt -lglib -lexpat -lmysqlclient -lm -lz -lcrypt -L/usr/lib -lglib
../src/.libs/libmidgard.so: undefined reference to `mysql_insert_id'
../src/.libs/libmidgard.so: undefined reference to
`mysql_fetch_field_direct'
../src/.libs/libmidgard.so: undefined reference to `mysql_num_rows'
../src/.libs/libmidgard.so: undefined reference to `mysql_errno'
../src/.libs/libmidgard.so: undefined reference to `mysql_error'
../src/.libs/libmidgard.so: undefined reference to `mysql_num_fields'
collect2: ld returned 1 exit status
make[1]: *** [repligard] Error 1
make[1]: Leaving directory `/home/archives/midgard-lib-1.4beta7/repligard'
make: *** [all-recursive] Error 1
This actually seems to indicate that repligard is looking for the MySQL
references in the libmidgard.so shared library. Someone else suggested a
command like this:
nm /usr/local/mysql/lib/mysql/libmysqlclient.so.6 | grep mysql
Here is that result, the missing functions are HERE:
00012e58 b current_mysql
00011b48 d mysql_client_init
00005f74 T mysql_close
00006fa4 T mysql_connect
00007164 T mysql_create_db
000075b0 T mysql_data_seek
00007760 T mysql_debug
000071d4 T mysql_drop_db
00007274 T mysql_dump_debug_info
00006e50 T mysql_escape_string
00007740 T mysql_fetch_field
000076c0 T mysql_fetch_lengths
00007634 T mysql_fetch_row
00007610 T mysql_field_seek
00007504 T mysql_free_result
000073d4 T mysql_get_client_info
000073f0 T mysql_get_host_info
00007400 T mysql_get_proto_info
000073c0 T mysql_get_server_info
00006f44 T mysql_init
000072e4 T mysql_kill
00006954 T mysql_list_dbs
00006bd4 T mysql_list_fields
00006d34 T mysql_list_processes
00006a94 T mysql_list_tables
00005054 t mysql_once_init
00007414 T mysql_options
00007324 T mysql_ping
00011b4c D mysql_port
000070f4 T mysql_query
000048e4 t mysql_read_default_options
00005134 T mysql_real_connect
00006104 T mysql_real_query
00005e34 t mysql_reconnect
000072a4 T mysql_refresh
000075f0 T mysql_row_seek
00007054 T mysql_select_db
00007244 T mysql_shutdown
00007354 T mysql_stat
000066e4 T mysql_store_result
00011b50 D mysql_unix_port
00006844 T mysql_use_result
I also ran the nm command on the compiled version of the libmidgard.so which resides
in ../src/.libs from repligard with the following result:
nm ../src/.libs/libmidgard.so | grep mysql
U mysql_close
U mysql_errno
U mysql_error
U mysql_fetch_field_direct
U mysql_fetch_row
U mysql_free_result
U mysql_init
U mysql_insert_id
U mysql_num_fields
U mysql_num_rows
U mysql_query
U mysql_real_connect
U mysql_store_result
So, they all seem to be here as well... or are they??
Fred
Alan Knowles wrote:
> Thomas Rast <[EMAIL PROTECTED]> said:
>
>>> gcc -g -O2 -I/usr/lib/glib/include -L/usr/local/mysql//lib/mysql
>>> -L/usr/local/lib -o .libs/repligard common.o read.o import.o rpconfig.o
>>> iconvxml.o schema.o export.o main.o ../src/.libs/libmidgard.so -lexpat -lm
>>> -lz -lcrypt -L/usr/lib -lglib -lexpat -lm -lz -lcrypt -L/usr/lib -lglib
>>> -Wl,--rpath -Wl,/usr/local/lib
>>> ../src/.libs/libmidgard.so: undefined reference to `mysql_store_result'
>>
>> <SNIP>
>>
>> AFAICT, it should not be a problem with link paths (there is a
>> "-L/usr/local/mysql/lib/mysql"), but the actual "-lmysqlclient" that tells
>> the linker to link against that library is missing. You might have to check
>> your configure output for a line like "checking for mysqlclient ... no". I
>> had a similiar problem last weekend, but with a completely different
>> program to compile.
>>
>
> dont forget to delete the config.cache file (this will stop it using the
> results of the last ./configure to assume the results for the new one....
>
>
>
>
>> hope that helps
>>
>> Thomas
>>
>>
>>
>> --
>> Linux is like a wigwam ...
>> No gates, no windows and an Apache inside....
>> --
>> Thomas Rast
>> [EMAIL PROTECTED]
>> --
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]