Recent

Author Topic: fpc won't compile testdb mysql program  (Read 14070 times)

thaimann

  • Jr. Member
  • **
  • Posts: 84
fpc won't compile testdb mysql program
« on: April 19, 2005, 05:31:25 am »
I get the following error when I try to compile testdb3.pp program:

/usr/bin/ld: cannot find -lmysqlclient

After reading the Lazaruth Database Tutorial, I did the following
as root in /usr/lib

ln -s libmysqlclient.so.10.0.0 lmysqlclient
ln -s libmysqlclient.so.10.0.0 mysqlclient

I did the same in the local  fpc directry also (where I have the source code, which is also where I compile it from.)

I also had added "-F12/lib;/usr/lib to /etc/fpc.cfg

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2595
fpc won't compile testdb mysql program
« Reply #1 on: April 19, 2005, 10:20:40 am »
rename your symlink to libmysqlclient.so
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Anonymous

  • Guest
fpc won't compile testdb mysql program
« Reply #2 on: April 19, 2005, 02:19:43 pm »
I did this in both /usr/lib and my local dir and am still getting the same error.

Is there a way to check to see what dir it is looking for the file in?  The web page author said he put the s.l. in multiple dir, but he didn't say which ones.

Terry

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2595
fpc won't compile testdb mysql program
« Reply #3 on: April 19, 2005, 04:30:19 pm »
usually /usr/lib only is ok. AFAIK, ld looks there

Look in the link.res file, there are the (extra ?) searchpaths defined.

silly question maybe, but does libmysqlclient.so.10.0.0 exits ?
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Anonymous

  • Guest
fpc won't compile testdb mysql program
« Reply #4 on: April 19, 2005, 05:16:09 pm »
[terry@pegasus fpc]$ ls -l /usr/lib/mysql/libmysqlclient.so.10.0.0
-rwxr-xr-x    1 root     root       214580 Oct 27  2003 /usr/lib/mysql/libmysqlclient.so.10.0.0
[terry@pegasus fpc]$

[root@pegasus bin]# cd /usr/lib
[root@pegasus lib]# ls -l | grep mysqlc
lrwxrwxrwx    1 root     root           24 Apr 19 07:14 libmysqlclient.so -> libmysqlclient.so.10.0.0
lrwxrwxrwx    1 root     777            24 Apr 18 22:09 lmysqlclient -> libmysqlclient.so.10.0.0
lrwxrwxrwx    1 root     777            24 Apr 18 22:03 mysqlclient -> libmysqlclient.so.10.0.0


I've tried to add a lin k to the logical dir in the  link file, but no resolution yet.

Here is the listing:

[terry@pegasus fpc]$ cat link.res SEARCH_DIR(/lib/)
SEARCH_DIR(/usr/lib/)
SEARCH_DIR(/usr/X11R6/lib/)
SEARCH_DIR(/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/rtl/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/zvt/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/zlib/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/x11/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/utmp/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/unzip/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/unixutil/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/tcl/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/syslog/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/svgalib/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/sqlite/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/regexpr/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/pthreads/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/postgres/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/paszlib/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/pasjpeg/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/oracle/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/opengl/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/odbc/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/newt/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/netdb/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/ncurses/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/mysql/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/md5/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/libpng/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/libgd/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/libc/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/libasync/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/lexyacc/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/imlib/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/ibase/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gtk2/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gtk/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gnome/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/ggi/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gdbm/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gdbint/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gconf/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/fv/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/fpgtk/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/forms/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/fcl/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/cdrom/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/bfd/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/)
INPUT(
/usr/lib/fpc/1.9.8/units/i386-linux/rtl/cprt21.o
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/crtbegin.o
/usr/lib/crti.o
testdb3.o
/usr/lib/fpc/1.9.8/units/i386-linux/rtl/system.o
/usr/lib/fpc/1.9.8/units/i386-linux/mysql/mysql3.o
/usr/lib/fpc/1.9.8/units/i386-linux/mysql/mysql3_com.o
/usr/lib/fpc/1.9.8/units/i386-linux/mysql/mysql3_version.o
)
INPUT(
-lm
-lmysqlclient
-lc
)
INPUT(
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/crtend.o
/usr/lib/crtn.o
)
[terry@pegasus fpc]$

Anonymous

  • Guest
fpc won't compile testdb mysql program
« Reply #5 on: April 19, 2005, 05:56:40 pm »
I found what is wrong now.  Sorry to have bothered you.

Thx,    Terry

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
fpc won't compile testdb mysql program
« Reply #6 on: April 20, 2005, 08:55:11 am »
Maybe you can post, what was wrong. Others might learn from it. (Don't assume nobody makes the same mistake as you did.. ;-) )

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2595
fpc won't compile testdb mysql program
« Reply #7 on: April 20, 2005, 02:30:09 pm »
my question wasn't that silly afterall :)

The target the symlink was pointing to didn't exist (in that location)
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

thaimann

  • Jr. Member
  • **
  • Posts: 84
fpc won't compile testdb mysql program
« Reply #8 on: April 20, 2005, 09:14:46 pm »
I had to include the directory path to libmysqlclient.so.10.0.0.  The documantation did NOT indicate that was necesary.

 

TinyPortal © 2005-2018