This is a discussion on libc++ demos from CSDK doesn't compile on linux MDK9.1 within the Informix forums, part of the Database Server Software category; --> Hello all, I'd like to use libc++ library, but I can't compile even demos included with CSDK. It writes ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello all, I'd like to use libc++ library, but I can't compile even demos included with CSDK. It writes about undefined reference to all objects of libc++. Demos can be compiled on older linux versions including Suse8.0 and MDK8.2. It is probably caused by incompatible versions of gcc/glibc. Is there any way to use it on newer distributions (except of installing older compiler)? (gcc is 3.2.2, glibc 2.3.1) Thanks in advance for any help. Petr Husak |
| |||
| petrxh wrote: > Hello all, > I'd like to use libc++ library, > but I can't compile even demos included with CSDK. > It writes about undefined reference to all objects of libc++. > Demos can be compiled on older linux versions including Suse8.0 and MDK8.2. > It is probably caused by incompatible versions of gcc/glibc. > Is there any way to use it on newer distributions (except of installing > older compiler)? > > (gcc is 3.2.2, glibc 2.3.1) > > Thanks in advance for any help. > Petr Husak Make sure you've got your LD_LIBRARY_PATH set so libraries can be found; e.g., at least ${INFORMIXDIR}/lib/c++:${INFORMIXIR}/lib/esql:${INFORMIXDIR}/lib (pretty much in that order). Also, if you're getting "errono" errors, you need to download and install clientsdk.2.81.UC2.LINUX.tar from http://www-3.ibm.com/software/data/informix. See my earlier post about potential problems with the cpio arguments and GNU cpio in the install scripts in the archive. -- In what is probably a vain attempt to get off SPAM lists, you'll have to delete the nonsense in my address if you want to just hit reply; sorry about that, but enough is enough! |
| |||
| Hello Thomas, thanks for your reply. I tried to install SDK again with propper parameters to cpio, with setting LD_LIBRARY_PATH, but I wasn't successful. The reason is most probably incompatibility between g++'s 2.95 (used to compile $INFORMIXDIR/lib/c++/) and g++'s 3.2.2 (I'm using now) ABI. Most probably there is no other solution than recompiling object interface from sources by g++ 3.2.x. But it must be done by IBM (I don't expect they will release object interface's sources, although it seems to be only a wrapper to ESQL/C). Thomas Ronayne wrote: > petrxh wrote: >> Hello all, >> I'd like to use libc++ library, >> but I can't compile even demos included with CSDK. >> It writes about undefined reference to all objects of libc++. >> Demos can be compiled on older linux versions including Suse8.0 and >> MDK8.2. It is probably caused by incompatible versions of gcc/glibc. >> Is there any way to use it on newer distributions (except of installing >> older compiler)? >> >> (gcc is 3.2.2, glibc 2.3.1) >> >> Thanks in advance for any help. >> Petr Husak > > Make sure you've got your LD_LIBRARY_PATH set so libraries can be found; > e.g., at least > ${INFORMIXDIR}/lib/c++:${INFORMIXIR}/lib/esql:${INFORMIXDIR}/lib (pretty > much in that order). > > Also, if you're getting "errono" errors, you need to download and > install clientsdk.2.81.UC2.LINUX.tar from > http://www-3.ibm.com/software/data/informix. See my earlier post about > potential problems with the cpio arguments and GNU cpio in the install > scripts in the archive. > > > |
| |||
| petrxh wrote: > Hello Thomas, > thanks for your reply. > I tried to install SDK again with propper parameters to cpio, with setting > LD_LIBRARY_PATH, but I wasn't successful. > > The reason is most probably incompatibility between g++'s 2.95 (used to > compile $INFORMIXDIR/lib/c++/) and g++'s 3.2.2 (I'm using now) ABI. Most > probably there is no other solution than recompiling object interface from > sources by g++ 3.2.x. But it must be done by IBM (I don't expect they will > release object interface's sources, although it seems to be only a wrapper > to ESQL/C). Did you download the tar archive from IBM? That's the one that's compatible with GCC 3.2.x (I had the same problems going from 2.95 to 3.2.x), and have no problem since installing clientsdk.2.81.UC2.LINUX. It's a big bugger (apparently Big Blue never heard of ZIP or gzip), but it does the deed with the new GCC compiler and library. |
| |||
| Yes, I have CSDK 2.81.UC2. Do you use C++ or ESQL/C? I suppose ESQL/C shouldn't have big problems with newer gcc versions. Could you please try to run make in $INFORMIXDIR/demos/c++/ and let me now if it can compile demo files? Thanks, Petr > Did you download the tar archive from IBM? That's the one that's > compatible with GCC 3.2.x (I had the same problems going from 2.95 to > 3.2.x), and have no problem since installing clientsdk.2.81.UC2.LINUX. > It's a big bugger (apparently Big Blue never heard of ZIP or gzip), but > it does the deed with the new GCC compiler and library. |
| |||
| petrxh wrote: > Yes, I have CSDK 2.81.UC2. Do you use C++ or ESQL/C? > I suppose ESQL/C shouldn't have big problems with newer gcc versions. > > Could you please try to run make in $INFORMIXDIR/demos/c++/ and let me now > if it can compile demo files? > > Thanks, Petr > I have zero -- and I do mean no -- problems with ESQL/C since installing the CSDK update. I tend to avoid C++ (just because it's too much of a pain in the butt; i.e., the too-often kinds of problems below, for me to care much about), but... I had to add -Wno-deprecated to CPPFLAGS in Makefile and change line 510 of ${INFORMIXDIR}/incl/dmi/gls.h from typedef GL_VOIDPTR gl_lc_t; to typedef __locale_struct* gl_lc_t; To get things to get going. After that, I'm getting messages like testtype.cpp: In member function `virtual const ITString& TestType::Printable()': testtype.cpp:193: `hex' undeclared (first use this function) testtype.cpp:193: (Each undeclared identifier is reported only once for each function it appears in.) make: *** [testtype.o] Error 1 At that point, I give up (it starts to get beyond my pain threshold) -- but those are something you ought to be able to chase down. |
| |||
| petrxh wrote: > I'd like to use libc++ library, Why? That's not a wholly facetious question. I'd recommend using ESQL/C in preference. > but I can't compile even demos included with CSDK. > It writes about undefined reference to all objects of libc++. > Demos can be compiled on older linux versions including Suse8.0 and MDK8.2. > It is probably caused by incompatible versions of gcc/glibc. > Is there any way to use it on newer distributions (except of installing > older compiler)? > > (gcc is 3.2.2, glibc 2.3.1) I'm moderately sure that you'd need a gcc 2.96 compiler, the same as was used to build it. More precisely, I'm sure you need to use the same compiler that was used to build the C++ libraries, and I think that may be v2.96. The binary coding conventions used by G++ changed enough between 2.x and 3.x to force a change in the naming, hence the now missing symbols. Find out which compiler is in use on SuSE 8.0 and MDK 8.2 (g++ --version), and I'd be moderately surprised to find it is 3.x and very surprised to find it was 3.2.x. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/ |
| |||
| There must be std::hex instead of hex or somewhere in the beginning of source file "using namespace std;". It is the last issue except undefined references during linking. Thanks for your help, now I can see I must use esql/c too :-(. Thomas Ronayne wrote: > petrxh wrote: >> Yes, I have CSDK 2.81.UC2. Do you use C++ or ESQL/C? >> I suppose ESQL/C shouldn't have big problems with newer gcc versions. >> >> Could you please try to run make in $INFORMIXDIR/demos/c++/ and let me >> now if it can compile demo files? >> >> Thanks, Petr >> > I have zero -- and I do mean no -- problems with ESQL/C since installing > the CSDK update. I tend to avoid C++ (just because it's too much of a > pain in the butt; i.e., the too-often kinds of problems below, for me to > care much about), but... > > I had to add > > -Wno-deprecated > > to CPPFLAGS in Makefile and change line 510 of > ${INFORMIXDIR}/incl/dmi/gls.h from > > typedef GL_VOIDPTR gl_lc_t; > > to > > typedef __locale_struct* gl_lc_t; > > To get things to get going. > > After that, I'm getting messages like > > testtype.cpp: In member function `virtual const ITString& > TestType::Printable()': > testtype.cpp:193: `hex' undeclared (first use this function) > testtype.cpp:193: (Each undeclared identifier is reported only once for > each > function it appears in.) > make: *** [testtype.o] Error 1 > > At that point, I give up (it starts to get beyond my pain threshold) -- > but those are something you ought to be able to chase down. |
| ||||
| You're right. SuSE has gcc 2.95, MDK8.2 gcc 2.96. I'm thinking about ESQL/C or CLI. Jonathan Leffler wrote: > petrxh wrote: >> I'd like to use libc++ library, > > Why? That's not a wholly facetious question. I'd recommend using > ESQL/C in preference. > >> but I can't compile even demos included with CSDK. >> It writes about undefined reference to all objects of libc++. >> Demos can be compiled on older linux versions including Suse8.0 and >> MDK8.2. It is probably caused by incompatible versions of gcc/glibc. >> Is there any way to use it on newer distributions (except of installing >> older compiler)? >> >> (gcc is 3.2.2, glibc 2.3.1) > > I'm moderately sure that you'd need a gcc 2.96 compiler, the same as > was used to build it. More precisely, I'm sure you need to use the > same compiler that was used to build the C++ libraries, and I think > that may be v2.96. The binary coding conventions used by G++ changed > enough between 2.x and 3.x to force a change in the naming, hence the > now missing symbols. Find out which compiler is in use on SuSE 8.0 > and MDK 8.2 (g++ --version), and I'd be moderately surprised to find > it is 3.x and very surprised to find it was 3.2.x. > > |