linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* fstream on PPC?
@ 2003-11-17 15:09 Toni Van Remortel
  2003-11-17 15:53 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Toni Van Remortel @ 2003-11-17 15:09 UTC (permalink / raw)
  To: linuxppc-embedded


Hi all,

A programmer has written an GUI application that has to run on my EP405
board. When compiling the application without any fstream calls, it
works fine.
But when I allow the functions that use fstream (for saving and loading
small files over NFS), I get the following error:

Linking test...
/opt/eldk/usr/ppc-linux/bin/ld: warning: libstdc++-libc6.2-2.so.3,
needed by /opt/PPC_X/usr/X11R6/lib/libGLU.so, not found (try using
-rpath or -rpath-link)
test.o: In function `figure::save(ofstream &)':
test.o(.text+0x1574): undefined reference to
`ostream::operator<<(double)'
test.o(.text+0x1574): relocation truncated to fit: R_PPC_REL24
ostream::operator<<(double)
test.o(.text+0x157c): undefined reference to `ostream::operator<<(char
const *)'
....
and more than a dozen of these errors. It's a linking problem, that's
what I know. But I don't know how to get to the problem-core. Can I
solve this by a quick hack? Or is it hopeless to start messing with
fstream on PPC?

The app is written with FLTK support, and is compiled as a test-program
inside the standard FLTK-tree (after adding a Makefile entry for the
app, which is currently called test.cxx).
All written in C++.

PS: don't mind the warning about libstdc++-libc6.2-2.so.3, it's in place
on the embedded system.

PPS: Had to do a hack for the stream functions, because the original was
developed on Windows with MS Visual Studio. Calling them all with &f_in
etc)
--
                           Toni Van Remortel
              Wetenschappelijk Medewerker - D-science lab
  Real time Linux for embedded systems: http://linemb.d-sciencelab.com
              Tel: +32 3 205 61 72 - Fax: +32 3 205 61 95
                      E-mail: t.vanremortel@ha.be


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fstream on PPC?
  2003-11-17 15:09 fstream on PPC? Toni Van Remortel
@ 2003-11-17 15:53 ` Wolfgang Denk
  2003-11-18  8:58   ` Toni Van Remortel
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2003-11-17 15:53 UTC (permalink / raw)
  To: t.vanremortel; +Cc: linuxppc-embedded


Dear Toni,

in message <1069081757.25853.5.camel@toni> you wrote:
>
> But when I allow the functions that use fstream (for saving and loading
> small files over NFS), I get the following error:
>
> Linking test...
> /opt/eldk/usr/ppc-linux/bin/ld: warning: libstdc++-libc6.2-2.so.3,
> needed by /opt/PPC_X/usr/X11R6/lib/libGLU.so, not found (try using
> -rpath or -rpath-link)
...
> and more than a dozen of these errors. It's a linking problem, that's
> what I know. But I don't know how to get to the problem-core. Can I

Why not? The error message is pretty plain english:

Your  link  step  included   the   /opt/PPC_X/usr/X11R6/lib/libGLU.so
library,    which    in    turn    tried    to   link   against   the
libstdc++-libc6.2-2.so.3 library, which was not found by the linker.

This is not a big surprise, as the current version of the ELDK  ships
with libstdc++-libc6.1-2.a.3


> solve this by a quick hack? Or is it hopeless to start messing with
> fstream on PPC?

I don't know where  you  got  the  /opt/PPC_X/usr/X11R6/lib/libGLU.so
library  from. I guess you copied if from a standard PowerPC release.
This is very risky in itself, as it may have been built in a way wich
is incompatible to the ELDK libraries (or  are  you  absolutely  sure
that  they  use  the  same  settings  for  FPU support and cache line
sizes?).

You should probably rebuild libGLU using the ELDK tools, and link  it
against the ELDK provided C/C++ libs.


> PS: don't mind the warning about libstdc++-libc6.2-2.so.3, it's in place
> on the embedded system.

You must be joking. Of course you have to mind this.  It's  the  root
cause  of your problems. And other problems are lurking to hit you as
libstdc++-libc6.2-2.so.3 is most probably incompatible to  the  ELDK,
too.


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
Ninety-Ninety Rule of Project Schedules:
        The first ninety percent of the task takes ninety percent of
the time, and the last ten percent takes the other ninety percent.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fstream on PPC?
  2003-11-17 15:53 ` Wolfgang Denk
@ 2003-11-18  8:58   ` Toni Van Remortel
  2003-11-18  9:38     ` Toni Van Remortel
  0 siblings, 1 reply; 4+ messages in thread
From: Toni Van Remortel @ 2003-11-18  8:58 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-embedded


Op ma 17-11-2003, om 16:53 schreef Wolfgang Denk:
> Dear Toni,
>
> in message <1069081757.25853.5.camel@toni> you wrote:
> >
> > But when I allow the functions that use fstream (for saving and loading
> > small files over NFS), I get the following error:
> >
> > Linking test...
> > /opt/eldk/usr/ppc-linux/bin/ld: warning: libstdc++-libc6.2-2.so.3,
> > needed by /opt/PPC_X/usr/X11R6/lib/libGLU.so, not found (try using
> > -rpath or -rpath-link)
> ...
> > and more than a dozen of these errors. It's a linking problem, that's
> > what I know. But I don't know how to get to the problem-core. Can I
>
> Why not? The error message is pretty plain english:
>
> Your  link  step  included   the   /opt/PPC_X/usr/X11R6/lib/libGLU.so
> library,    which    in    turn    tried    to   link   against   the
> libstdc++-libc6.2-2.so.3 library, which was not found by the linker.

Strange. It did found it before. Should check that further then.
Although the resulting binary runs fine on the EP405.

> > solve this by a quick hack? Or is it hopeless to start messing with
> > fstream on PPC?
>
> I don't know where  you  got  the  /opt/PPC_X/usr/X11R6/lib/libGLU.so
> library  from.

Compiled from source, linked against ELDK. Works perfectly.

> > PS: don't mind the warning about libstdc++-libc6.2-2.so.3, it's in place
> > on the embedded system.
>
> You must be joking. Of course you have to mind this.  It's  the  root
> cause  of your problems. And other problems are lurking to hit you as
> libstdc++-libc6.2-2.so.3 is most probably incompatible to  the  ELDK,
> too.

Hmm. Still find it strange. It compiles, it runs, and it only complains
at compile time. Very odd, but I'll try to remove the first warning and
see what happens.

Thanks for your help.
--
                           Toni Van Remortel
              Wetenschappelijk Medewerker - D-science lab
  Real time Linux for embedded systems: http://linemb.d-sciencelab.com
              Tel: +32 3 205 61 72 - Fax: +32 3 205 61 95
                      E-mail: t.vanremortel@ha.be


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fstream on PPC?
  2003-11-18  8:58   ` Toni Van Remortel
@ 2003-11-18  9:38     ` Toni Van Remortel
  0 siblings, 0 replies; 4+ messages in thread
From: Toni Van Remortel @ 2003-11-18  9:38 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-embedded


> > > PS: don't mind the warning about libstdc++-libc6.2-2.so.3, it's in place
> > > on the embedded system.
> >
> > You must be joking. Of course you have to mind this.  It's  the  root
> > cause  of your problems. And other problems are lurking to hit you as
> > libstdc++-libc6.2-2.so.3 is most probably incompatible to  the  ELDK,
> > too.

I apologize for this stupid question: the symlink to the lib was wrong
inside the /opt/eldk/ppc_4xx/lib directory.

Anyhow, thanks for pointing me to the correct location of the problem, I
was seeking inside the FLTK map.

Regards,
--
                           Toni Van Remortel
              Wetenschappelijk Medewerker - D-science lab
  Real time Linux for embedded systems: http://linemb.d-sciencelab.com
              Tel: +32 3 205 61 72 - Fax: +32 3 205 61 95
                      E-mail: t.vanremortel@ha.be


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-11-18  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-17 15:09 fstream on PPC? Toni Van Remortel
2003-11-17 15:53 ` Wolfgang Denk
2003-11-18  8:58   ` Toni Van Remortel
2003-11-18  9:38     ` Toni Van Remortel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).