[Users] Errors compiling against MySQL 5.0.18

Edson 4lists at gmail.com
Mon Feb 27 17:07:27 CET 2006


Hi, Daniel...

Sorry for the delay... Here in Brasil is Carnaval and... well, You know...
;) parties (carnaval for sure), holiday (5 days total), more than 5 good
beachs at less than 40km, water at 25~28C, etc, etc, etc :D

> > 4- an 'ld' message that I thing is a MySQL problem when using MySQL
> 5.0.18
> >    libs (message, please see below on <2>)
> >
> > Radius is still given me some work, but I whant to use MySQL 5.x series.
> So,
> > any one with a successful story in using CVS-head (or stable) with MySQL
> > 5.0.x?
> >
> Did you compiled the mysql library by yourself or it is installed from
> package?

For the MySQL all that I do was:
1- download the file "MySQL-5.0.18-0.src.rpm";
2- type the command: "rpmbuil --rebuild --clean MySQL-5.0.18-0.src.rpm".
3- wait for the RPMs;
4- see which mysql packets where installed:

   # rpm -qa | grep -i mysql
   mysql-shared-4.1.13-3
   ulogd-mysql-1.23-2
   mysql-client-4.1.13-3
   mysql-devel-4.1.13-3
   perl-DBD-mysql-3.0002-2
   mysql-4.1.13-3

5- uninstall all of them:
   # rpm -e <etc,etc,etc>

6- I couldn't uninstall "mysql-shared-4.1.13-3" because it is prereq from 
   FreeRadius (1.0.4-4);
7- install the RPMs:
   . MySQL-server-5.0.18-0.glibc23.x86_64.rpm
   . MySQL-shared-5.0.18-0.glibc23.x86_64.rpm
   . MySQL-client-5.0.18-0.glibc23.x86_64.rpm
   . MySQL-devel-5.0.18-0.glibc23.x86_64.rpm
8- try to recompile from indicated CVS source:
   . make mantainer-clean
   . make cfg-target=/etc/openser/ prefix=/usr cfg-prefix=
   . make cfg-target=/etc/openser/ prefix=/usr exclude_modules="postgres" \
     modules cfg-prefix= > modulos
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:
/usr/lib64/mysql/libmysqlclient.a(libmysql.o): relocation R_X86_64_32
against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
/usr/lib64/mysql/libmysqlclient.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [mysql.so] Error 1
lpidf.c: In function âlpidf_add_addressâ:
lpidf.c:77: warning: âs.sâ may be used uninitialized in this function
lpidf.c:77: warning: âs.lenâ may be used uninitialized in this function
xpidf.c: In function âxpidf_add_addressâ:
xpidf.c:150: warning: unused variable âavailableâ
xpidf.c:149: warning: unused variable âlen_availableâ

Well I thing that the problem repeats itselfs...  See below the messages
pertinent to the mysql module compilation

Edson.

P.S.: same environment as described on previous e-mail.

**********************************************************************
make[1]: Entering directory `/home/download/openser-1.0.0/modules/mysql'
make[1]: Leaving directory `/home/download/openser-1.0.0/modules/mysql'
make[1]: Entering directory `/home/download/openser-1.0.0/modules/mysql'
Compiling db_con.c
gcc -fPIC -DPIC -g -O9 -funroll-loops  -Wcast-align  -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=x86-64
-DNAME='"openser"' -DVERSION=
'"1.0.1"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 4.0.2"'
-D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DD
NS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBY
NAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/include/mysql -I/usr/l
ocal/mysql/include -I/usr/include/mysql -c db_con.c -o db_con.o
Compiling db_mod.c
gcc -fPIC -DPIC -g -O9 -funroll-loops  -Wcast-align  -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=x86-64
-DNAME='"openser"' -DVERSION=
'"1.0.1"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 4.0.2"'
-D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DD
NS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBY
NAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/include/mysql -I/usr/l
ocal/mysql/include -I/usr/include/mysql -c db_mod.c -o db_mod.o
Compiling dbase.c
gcc -fPIC -DPIC -g -O9 -funroll-loops  -Wcast-align  -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=x86-64
-DNAME='"openser"' -DVERSION=
'"1.0.1"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 4.0.2"'
-D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DD
NS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBY
NAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/include/mysql -I/usr/l
ocal/mysql/include -I/usr/include/mysql -c dbase.c -o dbase.o
Compiling my_con.c
gcc -fPIC -DPIC -g -O9 -funroll-loops  -Wcast-align  -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=x86-64
-DNAME='"openser"' -DVERSION=
'"1.0.1"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 4.0.2"'
-D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DD
NS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBY
NAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/include/mysql -I/usr/l
ocal/mysql/include -I/usr/include/mysql -c my_con.c -o my_con.o
Compiling res.c
gcc -fPIC -DPIC -g -O9 -funroll-loops  -Wcast-align  -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=x86-64
-DNAME='"openser"' -DVERSION=
'"1.0.1"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 4.0.2"'
-D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DD
NS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBY
NAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/include/mysql -I/usr/l
ocal/mysql/include -I/usr/include/mysql -c res.c -o res.o
Compiling row.c
gcc -fPIC -DPIC -g -O9 -funroll-loops  -Wcast-align  -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=x86-64
-DNAME='"openser"' -DVERSION=
'"1.0.1"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 4.0.2"'
-D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DD
NS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBY
NAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/include/mysql -I/usr/l
ocal/mysql/include -I/usr/include/mysql -c row.c -o row.o
Compiling utils.c
gcc -fPIC -DPIC -g -O9 -funroll-loops  -Wcast-align  -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=x86-64
-DNAME='"openser"' -DVERSION=
'"1.0.1"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 4.0.2"'
-D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DD
NS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBY
NAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/include/mysql -I/usr/l
ocal/mysql/include -I/usr/include/mysql -c utils.c -o utils.o
Compiling val.c
gcc -fPIC -DPIC -g -O9 -funroll-loops  -Wcast-align  -Wall
-minline-all-stringops -falign-loops -ftree-vectorize -mtune=x86-64
-DNAME='"openser"' -DVERSION=
'"1.0.1"' -DARCH='"x86_64"' -DOS='"linux"' -DCOMPILER='"gcc 4.0.2"'
-D__CPU_x86_64 -D__OS_linux -DCFG_DIR='"/etc/openser/"' -DPKG_MALLOC
-DSHM_MEM  -DSHM_MMAP -DD
NS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBY
NAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -I/usr/local/include
-I/usr/local/include/mysql -I/usr/l
ocal/mysql/include -I/usr/include/mysql -c val.c -o val.o
Linking mysql.so
gcc -shared  -Wl,-O2 -Wl,-E   db_con.o db_mod.o dbase.o my_con.o res.o row.o
utils.o val.o   -L/usr/lib/mysql -L/usr/local/lib -L/usr/local/lib/mysql
-L/usr/local
/mysql/lib/mysql/ -L/usr/local/mysql/lib -L/usr/lib64/mysql -lmysqlclient
-lz -o mysql.so
make[1]: Leaving directory `/home/download/openser-1.0.0/modules/mysql'





More information about the sr-users mailing list