Unix Technical Forum

libc++ demos from CSDK doesn't compile on linux MDK9.1

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 ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:14 PM
petrxh
 
Posts: n/a
Default libc++ demos from CSDK doesn't compile on linux MDK9.1

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 07:15 PM
Thomas Ronayne
 
Posts: n/a
Default Re: libc++ demos from CSDK doesn't compile on linux MDK9.1

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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 07:15 PM
petrxh
 
Posts: n/a
Default Re: libc++ demos from CSDK doesn't compile on linux MDK9.1

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.
>
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 07:15 PM
Thomas Ronayne
 
Posts: n/a
Default Re: libc++ demos from CSDK doesn't compile on linux MDK9.1

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2008, 07:15 PM
petrxh
 
Posts: n/a
Default Re: libc++ demos from CSDK doesn't compile on linux MDK9.1

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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-19-2008, 07:15 PM
Thomas Ronayne
 
Posts: n/a
Default Re: libc++ demos from CSDK doesn't compile on linux MDK9.1

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-19-2008, 07:15 PM
Jonathan Leffler
 
Posts: n/a
Default Re: libc++ demos from CSDK doesn't compile on linux MDK9.1

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/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-19-2008, 07:15 PM
petrxh
 
Posts: n/a
Default Re: libc++ demos from CSDK doesn't compile on linux MDK9.1

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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-19-2008, 07:16 PM
petrxh
 
Posts: n/a
Default Re: libc++ demos from CSDK doesn't compile on linux MDK9.1

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.
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:44 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com