Re: problem resolving foreign function (I think)
DJ <[email protected]> Wed, 11 Mar 2015 23:40:35 -0400
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------070305070009040604060901
Content-Type: multipart/alternative;
boundary="------------000800010602090607030105"
--------------000800010602090607030105
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
I am having some trouble with the quicklisp version of clsql on my
system as mentioned in my previous post.
If this is really something I should post on the quicklisp site, let me
know please.
Details again:
On 15-03-06 10:58 PM, DJ wrote:
> I can connect to a mysql database, but when I do any query with
> (clsql:query...) I get:
>
> Can't resolve foreign symbol "clsql_mysql_field_flags"
>
>
> So, here is the setup. I am running:
>
> Linux Mint 17 64-bit
> Clozure CL Version 1.10-r16196 64-bit
The problem seems to be with the version of clsql_mysql64.so that gets
built for the quicklisp package. I have attached the output from make to
this post. I am not very expert at C development. I note that the 32-bit
library could not be built. The only other suspicious thing is that ls
reports some kind of problem:
ld: warning: cannot find entry symbol _start
I don't know whether that is the problem.
I have different problems if I install the cl-sql-mysql debian package.
But if I just download that package and use the shared library
(clsql_mysql64.so) from it, clsql works. It seems I also have to
suppress loading the local quicklisp shared library by commenting out a
line in mysql-loader.lisp that pushes that path.
I tried something simple to see whether the shared library built by for
quicklisp would work. In ccl you can just do for example
(open-shared-library "blah") and then (external
"clsql_mysql_field_flags") to see whether the foreign function can be
located. When I load the library from the debian package, the clsql
functions resolve. But they don't resolve if I use the library build
for quicklisp. There is something funny about that shared library, but
it is beyond my expertise to track down just what.
Hoping for help; thanks.
- DJ -
--------------000800010602090607030105
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dwindows-1252"
http-equiv=3D"Content-Type">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
I am having some trouble with the quicklisp version of clsql on my
system as mentioned in my previous post.<br>
<br>
If this is really something I should post on the quicklisp site, let
me know please.<br>
<br>
Details again:<br>
<br>
<div class=3D"moz-cite-prefix">On 15-03-06 10:58 PM, DJ wrote:<br>
</div>
<br>
<blockquote cite=3D"mid:[email protected]" type=3D"cite"> I ca=
n
connect to a mysql database, but when I do any query with
(clsql:query...) I get:<br>
<br>
<blockquote>Can't resolve foreign symbol "clsql_mysql_field_flags"<=
br>
</blockquote>
<br>
So, here is the setup. I am running:<br>
<br>
Linux Mint 17 64-bit<br>
Clozure CL Version 1.10-r16196 64-bit<br>
</blockquote>
<br>
The problem seems to be with the version of clsql_mysql64.so that
gets built for the quicklisp package. I have attached the output
from make to this post. I am not very expert at C development. I
note that the 32-bit library could not be built. The only other
suspicious thing is that ls reports some kind of problem:<br>
<br>
<blockquote>ld: warning: cannot find entry symbol _start<br>
</blockquote>
I don't know whether that is the problem.<br>
<br>
I have different problems if I install the cl-sql-mysql debian
package. But if I just download that package and use the shared
library (clsql_mysql64.so) from it, clsql works. It seems I also
have to suppress loading the local quicklisp shared library by
commenting out a line in mysql-loader.lisp that pushes that path.<br>
<br>
I tried something simple to see whether the shared library built by
for quicklisp would work. In ccl you can just do for example
(open-shared-library "blah") and then (external
"clsql_mysql_field_flags") to see whether the foreign function can
be located. When I load the library from the debian package, the
clsql functions resolve. But they don't=A0 resolve if I use the
library build for quicklisp. There is something funny about that
shared library, but it is beyond my expertise to track down just
what.<br>
<br>
Hoping for help; thanks.<br>
<br>
- DJ -<br>
<br>
<br>
<br>
</body>
</html>
--------------000800010602090607030105--
--------------070305070009040604060901
Content-Type: text/plain; charset=UTF-8;
name="makelog"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="makelog"
gcc -I /usr/local/include/mysql -I /usr/include/mysql -I /sw/include/mysql -I /opt/local/include/mysql -I /opt/local/include/mysql55/mysql -I /usr/local/mysql/include -I /usr/include/x86_64-linux-gnu -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -c clsql_mysql.c -o clsql_mysql.o
ld -L/usr/local/lib64/mysql -L/usr/local/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql -L/sw/lib -L/opt/local/lib/mysql -L/opt/local/lib/mysql5/mysql -L/usr/local/mysql/lib -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -lmysqlclient -lz -lc -Bsymbolic-functions -fPIE -pie -z relro -z now -shared -soname=clsql_mysql clsql_mysql.o -o clsql_mysql64.so
ld: warning: cannot find entry symbol _start; defaulting to 0000000000000550
rm clsql_mysql.o
Ensure that you have multiarch i386 build tools and libraries if you want to build 32-bit library
gcc -H -I /usr/local/include/mysql -I /usr/include/mysql -I /sw/include/mysql -I /opt/local/include/mysql -I /opt/local/include/mysql5/mysql -I /usr/local/mysql/include -m32 -fPIC -c clsql_mysql.c -o clsql_mysql.o
. /usr/include/mysql/mysql.h
In file included from clsql_mysql.c:32:0:
/usr/include/mysql/mysql.h:47:23: fatal error: sys/types.h: No such file or directory
#include <sys/types.h>
^
compilation terminated.
make: [clsql_mysql.so] Error 1 (ignored)
ld -shared -soname=clsql_mysql clsql_mysql.o -L/lib32 -L/usr/lib32 -melf_i386 -lmysqlclient -lz -lc -o clsql_mysql.so
ld: cannot find clsql_mysql.o: No such file or directory
ld: cannot find -lmysqlclient
ld: cannot find -lz
ld: cannot find -lc
make: [clsql_mysql.so] Error 1 (ignored)
rm -f clsql_mysql.o
--------------070305070009040604060901
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
CLSQL mailing list
[email protected]
http://lists.b9.com/cgi-bin/mailman/listinfo/clsql
--------------070305070009040604060901--