Re: libc++ demos from CSDK doesn't compile on linux MDK9.1
Posted in 2003
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
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.
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.