From: David Gamez Date: December 14 2005 1:51pm Subject: Link problems when building on SUSE 10 List-Archive: http://lists.mysql.com/plusplus/5273 Message-Id: <4E57829B0709A6488E2364ABB96082AF9CBBDA@sernt13.essex.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I would appreciate some help compiling mysql++-2.0.7. I am using SUSE 10 = on a Intel Pentium 4 with 64 bit support and the compile is breaking at = the link stage. The version of mysql is: mysql Ver 14.7 Distrib 4.1.14, = for unknown-linux-gnu (x86_64) using readline 4.3. I have tried mysql = 5.0.15, which had a link error with libz.la. Mysql 5.0.13 had a similar = problem. For the configure I used the option -with-mysql-lib=3D/usr/lib64/mysql = so that it could find the mysql library. The error that I am getting is pasted below. Many thanks in advance /bin/sh ../libtool --mode=3Dlink g++ -g -O2 -L/usr/lib64/mysql/ -o = libmysqlpp.la -rpath /usr/local/lib -version-info 2:7:0 coldata.lo = connection.lo datetime.lo fields.lo field_names.lo field_types.lo = manip.lo myset.lo qparms.lo query.lo result.lo row.lo sql_string.lo = string_util.lo type_info.lo vallist.lo -lz -lmysqlclient mkdir .libs rm -fr .libs/libmysqlpp.la .libs/libmysqlpp.* .libs/libmysqlpp.* (cd . && ln -s coldata.lo coldata.o) (cd . && ln -s connection.lo connection.o) (cd . && ln -s datetime.lo datetime.o) (cd . && ln -s fields.lo fields.o) (cd . && ln -s field_names.lo field_names.o) (cd . && ln -s field_types.lo field_types.o) (cd . && ln -s manip.lo manip.o) (cd . && ln -s myset.lo myset.o) (cd . && ln -s qparms.lo qparms.o) (cd . && ln -s query.lo query.o) (cd . && ln -s result.lo result.o) (cd . && ln -s row.lo row.o) (cd . && ln -s sql_string.lo sql_string.o) (cd . && ln -s string_util.lo string_util.o) (cd . && ln -s type_info.lo type_info.o) (cd . && ln -s vallist.lo vallist.o) gcc -shared coldata.lo connection.lo datetime.lo fields.lo = field_names.lo field_types.lo manip.lo myset.lo qparms.lo query.lo = result.lo row.lo sql_string.lo string_util.lo type_info.lo vallist.lo = -Wl,--whole-archive /usr/lib64/mysql/libmysqlclient.a = -Wl,--no-whole-archive -L/usr/lib64/mysql/ -lz -Wl,-soname = -Wl,libmysqlpp.so.2 -o .libs/libmysqlpp.so.2.0.7 /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(libmysql.o): could not read symbols: = Bad value collect2: ld returned 1 exit status make[2]: *** [libmysqlpp.la] Error 1 make[2]: Leaving directory = `/home/davidg/Programs/mysqlpp/mysql++-2.0.7/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/davidg/Programs/mysqlpp/mysql++-2.0.7' make: *** [all] Error 2