Re: edbi on 64 bit machines?
- Posted by jimcbrown (admin) May 04, 2012
- 4236 views
I've tried running a script that uses edbi on two diffrent 64 bit machines (suse and unbutu 12.04). The script does work on a 32 bit machine. I was able to compile edbi_mysql.so driver without errors. Euphoria does work on the 64 bit machine.
I get the same error on both 64 bit machines.
I know that edbi_mysql.so is in: /usr/share/euphoria/edbi/drivers/mysql/edbi_mysql.so and /usr/lib/edbi_mysql.so
I ran ldconfig.
file /usr/lib/edbi_mysql.so outputs:
/usr/lib/edbi_mysql.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x06b9fc2549df19b598cb8b42b73548deb9646751, not stripped
When running my test program with edbi I get:
eui test.ex /usr/share/euphoria/include/std/error.e:50 in procedure crash() Could not open driver as: /usr/share/euphoria/edbi/drivers/mysql/edbi_mysql.so /usr/share/euphoria/edbi/drivers/edbi_mysql.so edbi_mysql.so ... called from /usr/share/euphoria/include/std/../../edbi/edbi/edbi.e:336 in function open() ... called from /var/www/cgi/./db.e:7 in function open_db() ... called from /var/www/cgi/./svg.e:29 --> See ex.err
Permissions on edbi_mysql.so are:
ls -all /usr/share/euphoria/edbi/drivers/mysql/edbi_mysql.so -rwxr-xr-x 1 root root 1097862 May 3 23:27 /usr/share/euphoria/edbi/drivers/mysql/edbi_mysql.so ls -all /usr/lib/edbi_mysql.so -rwxr-xr-x 1 root root 1097862 May 3 23:51 /usr/lib/edbi_mysql.so
Please help...
Seeing that the file sizes are the same, I'm going to guess that /usr/share/euphoria/edbi/drivers/mysql/edbi_mysql.so is a 64bit LSB even though you didn't explicitly say so this time.
You haven't actually given any new information since your last post.
Try this:
gcc -m64 -c -o /tmp/ju.o /tmp/ju.c gcc -m64 -o /tmp/ju.so -shared /tmp/ju.o eui /tmp/ju.e
With these:
-- ju.e include dll.e atom a a = open_dll("/tmp/ju.so") atom c c = define_c_proc(a, "testme", {}) c_proc(c, {})
/* ju.c */
#include <stdio.h>
void testme()
{
printf("testme\n");
}
And let me know what the output is.
Also, try this:
which eui file `which eui`

