ddd
[Top][All Lists]
Advanced

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

Re: Linker Problems with gcc-3.4


From: Max Bernhardt - extern TAGP - Tel. 3749
Subject: Re: Linker Problems with gcc-3.4
Date: Tue, 18 May 2004 10:26:48 +0200

Arnaud Desitter wrote:

> ----- Original Message -----
> From: "Max Bernhardt - extern TAGP - Tel. 3749" <address@hidden>
> To: "Arnaud Desitter" <address@hidden>
> Sent: Monday, May 17, 2004 3:59 PM
> Subject: Re: Linker Problems with gcc-3.4
>
> > Arnaud Desitter wrote:
> >
> > > Hi,
> > >
> > > It looks like a problem with the compiler set-up or your compiler.
> > > Try to build a simple C++ program such as:
> > >
> > > #include <string>
> > > #include <iostream>
> > > int main(){
> > >   std::string s("Hello world.");
> > >   std::cout << s << std::endl;
> > > }
> > >
> > > If it works, then you will have to dig further yourself.
> > > It is vey unlikely to be a ddd problem as it works fine with
> > > gcc 3.4 on Linux and with the native Sun compiler on Solaris.
> > >
> > > Regards,
> >
> > Thanks for the answer, but no ...
> >
> > I can compile the example Program using
> >
> >     g++ hello.cc -o hello
> >
> > or
> >
> >     gcc hello.cc -L/<PATH TO GCC-LIBS> -lstdc++ -o hello
> >
> > just fine.
>
> Then you are the only one that can debug it.

After some trying i found out, that the linker problem originated from the libs
for the XPM Package. Here they are installed in /opt/pd/lib/. SInce this path
doesn't turn up in any of my environment variables (especially not in
LD_LIBRARY_PATH or PATH) i was surprised that configure even found the libs. So
in the linker line '-L/opt/pd/lib -lxxx' showed up.
But this created the problem, because an older version of gcc is also installed
under /opt/pd/(lib/bin). The new gcc-3.4 is installed in a completely different
directory. Since i have the directories for new gcc-3.4 in my PATH and
LD_LIBRARY_PATH variables ddd was to be linked against the new libs (ldd shows
this to be the case), but since the XPM libs were in a path where older gcc
libs live that seemed to throw the linker off.

So configuring with '--without-xpm' did the trick for me.

But i still find it odd that the configure even found the xpm libs.

> > Yes i know that ddd can be compiled with the native Sun Compiler (Sun C++
> 5.5
> > Patch 113817-06 2004/01/29), which is just what i've done after i couldn't
> > compile it with gcc-3.4.
> >
> > But this ddd had some massive problems debugging an appilcation that was
> > compiled with gcc-3.4.
> > (Navigating the stack didn't work correctly, 'up' and 'down' missed
> several
> > functions in the stack, setting breakpoints sometimes set the breakpoint
> one
> > line off (although the source were DEFINITEly current, not finding half of
> the
> > sourcefiles etc.)

Could this in part be a problem that the program i tried to debug is a
multithreaded application??

> > BTW i'm using gdb-6.1, which i compiled with gcc-3.4 and linked with the
> native
> > Sun Linker (/usr/ccs/bin/ld).
> >
> > Might this be a problem between gcc-3.4 and gdb-6.1 ???
>
> Use gdb directly to find out. It may be the ddd needs to be adapted to
> understand
> gdb 6.1. If so, your patches are welcome.

I'd love to but it'd take me quite a while to do something useful, since we are
just now switching to gcc/gdb/ddd and i'm not really fit yet. If gdb-6.1 might
not work yet, which version gdb is (definitely) safe to use with ddd-3.3.8?

Regards,
                 Max

--

"There is no spoon ..." ;-)


Attachment: Max.Bernhardt.vcf
Description: Card for Max Bernhardt - extern TAGP - Tel. 3749


reply via email to

[Prev in Thread] Current Thread [Next in Thread]