MyODBC Build Failed

MyODBC Build Failed

am 18.03.2005 23:59:40 von Bob Tadlock

Solaris x86 version 9
MyODBC-3.51.11
unixODBC-2.2.11
gcc 3.3.2

unixODBC compiled with no errors and installed in /usr/local bin|etc|lib

/bin/bash ../libtool --mode=link gcc -O3 -DDBUG_OFF -DPORTABLE_GUI
-I/usr/local/mysql/include/mysql ../driver_r/libmyodbc3_r.la
-L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lposix4 -lcrypt -lgen
-lsocket -lnsl -lm -o my_basics my_basics.o -L/usr/local/lib -lz
-lodbcinst
gcc -O3 -DDBUG_OFF -DPORTABLE_GUI -I/usr/local/mysql/include/mysql -o
..libs/my_basics my_basics.o ../driver_r/.libs/libmyodbc3_r.so
-L/usr/local/mysql/lib/mysql -L/usr/local/lib
/usr/local/mysql/lib/mysql/.libs/libmysqlclient_r.so -lpthread -lposix4
-lcrypt -lgen -lsocket -lnsl -lm -lz /usr/local/lib/libodbcinst.so -ldl
-lthread -R/usr/local/lib -R/opt/sfw/mysql/lib/mysql
Undefined first referenced
symbol in file
lt_dlinit ../driver_r/.libs/libmyodbc3_r.so
lt_dlopen ../driver_r/.libs/libmyodbc3_r.so
lt_dlsym ../driver_r/.libs/libmyodbc3_r.so
strndup ../driver_r/.libs/libmyodbc3_r.so
lt_dlclose ../driver_r/.libs/libmyodbc3_r.so
ld: fatal: Symbol referencing errors. No output written to .libs/my_basics
collect2: ld returned 1 exit status
make[1]: *** [my_basics] Error


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org

Re: MyODBC Build Failed

am 19.03.2005 08:17:54 von Andreas Almroth

Bob,

lt_* functions are usually provided by the libtool library, and it seems
to be missing here.
strndup you will have no easy luck with as it is a function that is only
in GNU libc as an extension to the standard, and thus you will not find
it in libc provided by Sun.

What is your configure line? Did you use ---with-libtool

I compiled and packaged myODBC 3.51.11 the other day and "fixed" the
strndup and strnlen issues.
If you want to use it you can find the package at
http://www.blastwave.org. It should be on most mirrors in a few days.
It is compiled against the unixODBC provided there as well.

To solve strndup and strnlen you will have to find a recent copy of the
C files containing the two functions, put into one file and compile it.
Then in the Makefile in driver and driver_r directories you add
something like this to LDFLAGS; ../strnfuncs.o
Taken that you put the file in the base directory of MyODBC and you
called the file strnfuncs.c of course...

/A


Bob Tadlock wrote:

>Solaris x86 version 9
>MyODBC-3.51.11
>unixODBC-2.2.11
>gcc 3.3.2
>
>unixODBC compiled with no errors and installed in /usr/local bin|etc|lib
>
>/bin/bash ../libtool --mode=link gcc -O3 -DDBUG_OFF -DPORTABLE_GUI
>-I/usr/local/mysql/include/mysql ../driver_r/libmyodbc3_r.la
>-L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lposix4 -lcrypt -lgen
>-lsocket -lnsl -lm -o my_basics my_basics.o -L/usr/local/lib -lz
>-lodbcinst
>gcc -O3 -DDBUG_OFF -DPORTABLE_GUI -I/usr/local/mysql/include/mysql -o
>.libs/my_basics my_basics.o ../driver_r/.libs/libmyodbc3_r.so
>-L/usr/local/mysql/lib/mysql -L/usr/local/lib
>/usr/local/mysql/lib/mysql/.libs/libmysqlclient_r.so -lpthread -lposix4
>-lcrypt -lgen -lsocket -lnsl -lm -lz /usr/local/lib/libodbcinst.so -ldl
>-lthread -R/usr/local/lib -R/opt/sfw/mysql/lib/mysql
>Undefined first referenced
> symbol in file
>lt_dlinit ../driver_r/.libs/libmyodbc3_r.so
>lt_dlopen ../driver_r/.libs/libmyodbc3_r.so
>lt_dlsym ../driver_r/.libs/libmyodbc3_r.so
>strndup ../driver_r/.libs/libmyodbc3_r.so
>lt_dlclose ../driver_r/.libs/libmyodbc3_r.so
>ld: fatal: Symbol referencing errors. No output written to .libs/my_basics
>collect2: ld returned 1 exit status
>make[1]: *** [my_basics] Error
>
>
>
>


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org

Re: MyODBC Build Failed

am 19.03.2005 16:38:07 von Bob Tadlock

My configure line:
configure --prefix=/usr/local --with-mysql-path=/usr/local/mysql
--with-unixODBC=/usr/local --disable-thread-safe --with-libtool
The functions
lt_dlinit
lt_dlopen
lt_dlsym
lt_dlclose
which are referenced by ../driver_r/.libs/libmyodbc3_r.so and contained in
/usr/local/lib/libodbcinst.so which is included in the compile line that is
being executed so the compiler/linker should be able to resolve them.
The function
strndup
which is also referenced by ../driver_r/.libs/libmyodbc3_r.so is contained
in /usr/lib/libprint.so but Im not sure if the function works the same as
what the myodbc code expects.
I am using gcc to compile the code and have all the gcc libraries installed
so Im surprised that the strndup reference is not resolved.
I would be interested in the details of how you compiled and fixed the
strndup issue and if you used the gcc compiler.
---
Bob Tadlock


From: Andreas AlmrothDate: March 19 2005 8:17am
Subject: Re: MyODBC Build Failed

Bob,

lt_* functions are usually provided by the libtool library, and it seems
to be missing here.
strndup you will have no easy luck with as it is a function that is only
in GNU libc as an extension to the standard, and thus you will not find
it in libc provided by Sun.

What is your configure line? Did you use ---with-libtool

I compiled and packaged myODBC 3.51.11 the other day and "fixed" the
strndup and strnlen issues.
If you want to use it you can find the package at
http://www.blastwave.org. It should be on most mirrors in a few days.
It is compiled against the unixODBC provided there as well.

To solve strndup and strnlen you will have to find a recent copy of the
C files containing the two functions, put into one file and compile it.
Then in the Makefile in driver and driver_r directories you add
something like this to LDFLAGS; ../strnfuncs.o
Taken that you put the file in the base directory of MyODBC and you
called the file strnfuncs.c of course...

/A


Bob Tadlock wrote:

>Solaris x86 version 9
>MyODBC-3.51.11
>unixODBC-2.2.11
>gcc 3.3.2
>
>unixODBC compiled with no errors and installed in /usr/local bin|etc|lib
>
>/bin/bash ../libtool --mode=link gcc -O3 -DDBUG_OFF -DPORTABLE_GUI
>-I/usr/local/mysql/include/mysql ../driver_r/libmyodbc3_r.la
>-L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lposix4 -lcrypt -lgen
>-lsocket -lnsl -lm -o my_basics my_basics.o -L/usr/local/lib -lz
>-lodbcinst
>gcc -O3 -DDBUG_OFF -DPORTABLE_GUI -I/usr/local/mysql/include/mysql -o
>.libs/my_basics my_basics.o ../driver_r/.libs/libmyodbc3_r.so
>-L/usr/local/mysql/lib/mysql -L/usr/local/lib
>/usr/local/mysql/lib/mysql/.libs/libmysqlclient_r.so -lpthread -lposix4
>-lcrypt -lgen -lsocket -lnsl -lm -lz /usr/local/lib/libodbcinst.so -ldl
>-lthread -R/usr/local/lib -R/opt/sfw/mysql/lib/mysql
>Undefined first referenced
> symbol in file
>lt_dlinit ../driver_r/.libs/libmyodbc3_r.so
>lt_dlopen ../driver_r/.libs/libmyodbc3_r.so
>lt_dlsym ../driver_r/.libs/libmyodbc3_r.so
>strndup ../driver_r/.libs/libmyodbc3_r.so
>lt_dlclose ../driver_r/.libs/libmyodbc3_r.so
>ld: fatal: Symbol referencing errors. No output written to .libs/my_basics
>collect2: ld returned 1 exit status
>make[1]: *** [my_basics] Error
>


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org