public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/17219] New: -static and -statig-libgcc aren't doing what they should.
@ 2004-08-28  0:15 gonnetp at inf dot ethz dot ch
  2004-08-28  1:33 ` [Bug driver/17219] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gonnetp at inf dot ethz dot ch @ 2004-08-28  0:15 UTC (permalink / raw)
  To: gcc-bugs

I installed gcc-3.4.1 in a non-standard location (/usr/local/gcc/gcc-3.4.1/) and
I am having trouble running g++ programs compiled with it. Since it seems to be
al linking bug, it's easy to reproduce.

Given the program test.cc

    #include <iostream>
    using namespace std;

    main()
    {
        cout << "Hello World!";
        return 0;
    }

When I compile it in the most safe possilbe mode

    /usr/local/gcc/gcc-3.4.1/bin/g++ -static-libgcc test.cc \
    -L/usr/local/gcc/gcc-3.4.1/lib

I already get problems compiling:

    ld32: WARNING 127: Two shared objects with the same soname,
    /usr/lib32/mips3/libm.so and /usr/lib32/libm.so, have been been linked.
    This is probably due to a missing -L specification. Ignoring the latter.

Which is kind of odd, since I only have one _static_ version of libm, which, in
my opinion, should not be used. The executeable itself then fails with

    f15 307> ./a.out 
    80302:./a.out: rld: Fatal Error: Cannot Successfully map soname
    'libstdc++.so.7' under any of the filenames 
/usr/lib32/libstdc++.so.7:/usr/lib32/internal/libstdc++.so.7:/lib32/libstdc++.so.7:/opt/lib32/libstdc++.so.7:/usr/lib32/libstdc++.so.7.7:/usr/lib32/internal/libstdc++.so.7.7:/lib32/libstdc++.so.7.7:/opt/lib32/libstdc++.so.7.7: 

I can avoid this by adding /usr/local/gcc/gcc-3.4.1/lib to my LD_LIBRARY_PATH,
but this defeats the purpose of using "-static-libgcc". Adding just "-static"
has the same non-effect.

If this is just a bug in my setup I would be more than glad to know where to
start looking... 

Many thanks,
Pedro

-- 
           Summary: -static and -statig-libgcc aren't doing what they
                    should.
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gonnetp at inf dot ethz dot ch
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17219


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

end of thread, other threads:[~2004-09-02 21:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-28  0:15 [Bug driver/17219] New: -static and -statig-libgcc aren't doing what they should gonnetp at inf dot ethz dot ch
2004-08-28  1:33 ` [Bug driver/17219] " pinskia at gcc dot gnu dot org
2004-08-30 17:21 ` gonnetp at inf dot ethz dot ch
2004-08-30 18:37 ` [Bug target/17219] " pinskia at gcc dot gnu dot org
2004-08-30 18:46 ` gonnetp at inf dot ethz dot ch
2004-08-31  6:01 ` pinskia at gcc dot gnu dot org
2004-09-01  4:41 ` wilson at specifixinc dot com
2004-09-01  4:59 ` pinskia at gcc dot gnu dot org
2004-09-01 23:49 ` wilson at specifixinc dot com
2004-09-02 20:07 ` gonnetp at inf dot ethz dot ch
2004-09-02 21:26 ` wilson at specifixinc dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).