public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sean Callanan <sc843@bard.edu>
To: gcc@gcc.gnu.org
Subject: sparc g++ fails "Hello world!"
Date: Sun, 16 Dec 2001 00:42:00 -0000	[thread overview]
Message-ID: <4.3.2-J.20011216023652.00beea60@smtp.citlink.net> (raw)

Dear mailing list:

The short version of this story is that a carefully bootstrapped g++ on a 
new LFS partition (g++ 3.0.2, glibc 2.2.4) creates binaries that have bus 
errors. If you are interested, here's the legend that goes along with it.
-
In the reign of

GNU C Library stable release version 2.1.3
Compiled by GNU CC version 2.95.2.19991024 (release)
Compiled on a Linux 2.2.16 system on 2000-08-08

there was created by Root (through his prophet RPM) the righteous

GNU binutils version 2.9.5 (sparc-suse-linux) using BFD version 2.9.5.0.24

and there was also Root's misbegotten offspring by a mistaken "make 
install" pass:

gcc version 3.0.2
Configured with ../gcc-3.0.2/configure --prefix=/usr --exec-prefix=/usr 
--enable-languages=c,c++ --disable-nls --disable-shared --host=sparc-linux 
--target=sparc-linux --program-prefix=sparc-linux-

which was a static binary. They begat

GNU binutils 2.11

which was a most righteous static binary, and

gcc version 3.0.2
Configured with ../gcc-3.0.2/configure --prefix=/usr 
--enable-languages=c,c++ --disable-nls --disable-shared 
--enable-threads=posix --program-prefix=sparc-linux-

which was also static, having at birth been "make bootstrap"ped most 
carefully. This binary was perfect save that the ruler (glibc 2.1.3) 
forbade inclusions of stdio-limits.h and therefore libstdc++ could not be built.

These two were "make install"ed by Root into a new Partition, and Root 
said, "Grow, multiply, may your compiled offspring cover the new Partition" 
for this was a Linux-from-Scratch partition.

Now they begat a new ruler:

GNU C Library stable release version 2.2.4
Compiled by GNU CC version 3.0.2
Compiled on a Linux 2.4.16 system on 2001-12-13

and under his reign there was born a "bootstrap"ping baby,

gcc version 3.0.2
Configured width ../gcc-3.0.2/configure --prefix=/usr 
--enable-languages=c,c++,objc,java --enable-threads=posix 
--program-prefix=sparc-linux- --host=sparc-linux

But all was not well in the new Partition, for Root came and issued the 
following Commands:

# cat test.cc

#include <iostream.h>
int main()
{
   cout << "Hello world!" << endl;
   return(0);
}

# sparc-linux-g++ -o test-c++ test.cc
# ./test-c++
Bus error
#

And there was much suffering among the people, for g++ was a necessity. And 
one rose up from the mass and cried, "Lord Root, if thou canst not help us, 
then call upon the gods of far gcc@gcc.gnu.org for among them are sages of 
wisdom who may be of help!"
-
And that's the legend. Does GCC make any modifications to the libstdc++ 
header files during compilation? I think I installed the header files for 
the static binary that wouldn't compile the library properly, and perhaps 
that inhibited the installation of proper headers when the good dynamic 
binary was built. Any ideas?

Sincerely,
Sean Callanan

Sincerely,
Sean Callanan 

             reply	other threads:[~2001-12-16  7:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-16  0:42 Sean Callanan [this message]
2001-12-16  9:01 ` Jeff Sturm
     [not found] ` <Pine.LNX.4.10.10112161150490.22736-100000@mars.deadcafe.or g>
2001-12-16 12:42   ` Sean Callanan
2001-12-16 19:49     ` Jeff Sturm
2001-12-17  1:58       ` sc843

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.3.2-J.20011216023652.00beea60@smtp.citlink.net \
    --to=sc843@bard.edu \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).