[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: odbc_config missing



And those are what was made on Debian with the same Makefile.am:

/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H
-I. -I../../libodbc -I..    -I../../dbinterface -DUNICODE -DUNIXODBC
-I`odbc_config --cflags`  -g -O0 -MT libodbc_lib_la-database_odbc.lo
-MD -MP -MF .deps/libodbc_lib_la-database_odbc.Tpo -c -o
libodbc_lib_la-database_odbc.lo `test -f 'database_odbc.cpp' || echo
'../../libodbc/'`database_odbc.cpp
/bin/bash: line 1: odbc_config: command not found
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../libodbc -I..
-I../../dbinterface -DUNICODE -DUNIXODBC -I -g -O0 -MT
libodbc_lib_la-database_odbc.lo -MD -MP -MF
.deps/libodbc_lib_la-database_odbc.Tpo -c
../../libodbc/database_odbc.cpp  -fPIC -DPIC -o
.libs/libodbc_lib_la-database_odbc.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../libodbc -I..
-I../../dbinterface -DUNICODE -DUNIXODBC -I -g -O0 -MT
libodbc_lib_la-database_odbc.lo -MD -MP -MF
.deps/libodbc_lib_la-database_odbc.Tpo -c
../../libodbc/database_odbc.cpp -o libodbc_lib_la-database_odbc.o
>/dev/null 2>&1
mv -f .deps/libodbc_lib_la-database_odbc.Tpo
.deps/libodbc_lib_la-database_odbc.Plo
/bin/bash ../libtool  --tag=CXX   --mode=link g++ -I../../dbinterface
-DUNICODE -DUNIXODBC -I`odbc_config --cflags`  -g -O0 -L../dbinterface
-ldbinterface `odbc_config --libs` -lodbcinst   -o libodbc_lib.la
-rpath /usr/local/lib libodbc_lib_la-database_odbc.lo
/bin/bash: line 1: odbc_config: command not found
/bin/bash: line 1: odbc_config: command not found
libtool: link: g++  -fPIC -DPIC -shared -nostdlib
/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o
.libs/libodbc_lib_la-database_odbc.o   -L../dbinterface -ldbinterface
-lodbcinst -L/usr/lib/gcc/x86_64-linux-gnu/10
-L/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib
-L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/10/../../.. -lstdc++
-lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/10/crtendS.o
/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crtn.o  -g
-O0   -Wl,-soname -Wl,libodbc_lib.so.0 -o .libs/libodbc_lib.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libodbc_lib.so.0" && ln -s
"libodbc_lib.so.0.0.0" "libodbc_lib.so.0")
libtool: link: (cd ".libs" && rm -f "libodbc_lib.so" && ln -s
"libodbc_lib.so.0.0.0" "libodbc_lib.so")
libtool: link: ar cr .libs/libodbc_lib.a  libodbc_lib_la-database_odbc.o
libtool: link: ranlib .libs/libodbc_lib.a
libtool: link: ( cd ".libs" && rm -f "libodbc_lib.la" && ln -s
"../libodbc_lib.la" "libodbc_lib.la" )
igor@debian:~/dbhandler/Debug/libodbc$

As you can see the build succeeded.

But after running "make install" trying to load that library will fail
because the library
libodbc.so will not be found.

Thank you.


On Wed, Jul 20, 2022 at 7:55 PM Greg Wooledge <greg@wooledge.org> wrote:
>
> On Wed, Jul 20, 2022 at 07:46:43PM -0500, Igor Korot wrote:
> > On Wed, Jul 20, 2022 at 7:28 PM Greg Wooledge <greg@wooledge.org> wrote:
> > > Can you show us the linker command that you ran, and its error message?
> >
> > This is the command generated on Gentoo:
>
> How is that relevant to DEBIAN?
>
> > [code]
> > /bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
> > -I/home/igor/dbhandler/libodbc -I..    -I../../dbinterface -DUNICODE
> > -DUNIXODBC -I`odbc_config --cflags`  -g -O0 -MT
> [...]
>
> That's all noise as far as Debian is concerned.
>
> > with the following Makefile.am:
> >
> > [code]
> > ## Process this file with automake to produce Makefile.in
> >
> >
> > lib_LTLIBRARIES =  \
> >         libodbc_lib.la
> >
> > libodbc_lib_la_SOURCES =  \
> >         database_odbc.cpp \
> >         database_odbc.h
> >
> > libodbc_lib_la_CXXFLAGS = -I../../dbinterface \
> >         -DUNICODE \
> >         -DUNIXODBC \
> >         -I`odbc_config \
> >         --cflags`
> >
> > libodbc_lib_la_LDFLAGS = -L../dbinterface \
> >         -ldbinterface \
> >         `odbc_config \
> >         --libs` \
> >         -lodbcinst
> > [/code]
>
> It looks like you've made some false assumptions about this library.
> Apparently it has different linker options and library filenames on
> different platforms, and moreover, different *means of learning those
> names*.
>
> Sounds like a real bitch to work with.  Oh right, it's ODBC, so it's
> always going to be horrible, isn't it.
>
> Good luck!
>


Reply to: