Thanks for all the help everyone.  I think I have a fairly good
understanding of what's going on now.  My main problems now are:

1.  I don't seem to have all the stuff I needed in the
libstdc++-2.90.8.tr.gz.  Specifically I'm missing the config.sub file?
2.  One more question: if the "make install" command copies relevant
files into system directories (assuming this is the header and lib
files for the standard C++ library) can I then remove the top
directory that I unzipped the archive into?

Thanks again everyone,
Ben.

> -----Original Message-----
> From: Andre Majorel [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, July 28, 2000 3:20 AM
> To:   Ben Miller
> Subject:      Re: configuring g++
> 
> At 16:20 2000.07.27 +0100, Ben Miller wrote:
> 
> >I'm trying to build the 2.90.8 version of the GNU Standard C++
> >Library.  I have the libstdc++-2.90.8.tar.gz which I have unzipped
> >into /root/usr.  Now, I'm trying to 'configure' the library so that
> I
> >can 'make' it.  I'm having problems with the configuration step.
> The
> >instructions I am following (from
> >http://theory.uwinnipeg.ca/localfiles/infofiles/gcc/gcc_Installatio
> n.h
> >tml) tells me to change to the directory  where I unzipped the
> >libstdc++ files and then execute:
> >
> >$ CXX=gcc ./configure
> 
> They really told you to do that CXX=gcc thing ? That's unusual.
> It amounts to requiring that C++ be compiled with a C compiler.
> Oh well, they probably know what they're doing.
> 
> >$ make 
> >$ make install 
> >
> >My problems are:
> >
> >1.  Why can I not just type "CXX=gcc configure" (i.e. without the
> "./"
> >bit)?  (I'm too used to MS-DOS, I think!)
> 
> Depends on the configuration of your system. If the PATH
> environment variable includes "." (the current directory),
> AND the directories that come before "." in the PATH do not
> happen to contain a command named "configure", then you
> can use just "configure". Otherwise, you have to specify
> "./configure".
> 
> "./configure" is best because it works in all cases and
> always does the right thing, even if you have other
> "configure" commands lying around in the path.
> 
> One of the differences between DOS and Unix is that, with
> the latter, "." is not special w.r.t. to the command path ;
> like any other directory, it's searched for executables *only*
> if it's explicitly listed in PATH.
> 
> [Security note: You might be tempted to change your PATH to
> something like PATH=.:/usr/local/bin:/usr/bin to get a more
> DOS-like behaviour but that would not be a good idea security
> wise. Putting ./ or other non-system directories first makes
> you more vulnerable to trojans.]
> 
> >2.  When I execute the first line (with the "./" bit included) I
> get
> >the error message: "configure: error: can not run ../config.sub".
> I
> >have this file in the "/usr/share/automake/" directory, but it
> seems
> >to be trying to get it from the "../" directory.  How can I tell it
> >where to look for this file?
> 
> Mmm... config.sub should be included in the archive. ./configure
> should look for it in the current directory, not in ../ or
> /usr/share/automake/ or whatever. I don't understand. :-(
> 
> >3.  How does the next line ("make") know what it is I'm trying to
> >make!?
> 
> A makefile contains the rules for a number of targets. Typing
> "make foo" causes make to try to build target "foo". If you omit
> the target, make tries to build the *first* target defined in
> the makefile. Traditionally, that target is called "all" and the
> writer of the makefile has arranged so that when you try to
> build it, the program (or library) is built.
> 
> >4.  Is the last line trying to run "make" and create a target
> called
> >"install"?
> 
> "install" is, like "all", a pseudo target. When you try to
> build it, the program (that you just compiled) is installed.
> Because "make install" generally copies file into system
> directories (/usr/bin, /usr/local/bin, etc.), you usually
> need to be root to run it.
> 
> Here is a simplified typical makefile :
> 
> --------------------------------------
> all: foo
> 
> # Link foo
> foo: module1.o module2.o
>       cc module1.o module2.o -o foo
> 
> # Compile module1.c and module2.c
> module1.o: module1.c
>       cc -c module1.c
> 
> module2.o: module2.c
>       cc -c module2.c
> 
> # Install
> install:
>       cp foo /usr/local/bin
> --------------------------------------
> 
> "make" will run 
> 
>   cc -c module1.c
>   cc -c module2.c
>   cc module1.o module2.o -o foo
> 
> "make install" will run
> 
>   cp foo /usr/local/bin
> 
> HTH. Good luck with your first steps in the Unix world. :-)
> 
> 
> André Majorel <[EMAIL PROTECTED]>
> http://www.teaser.fr/~amajorel/
Mercia Software Ltd.
Mercia House 
Ashted Lock
Aston Science Park
Birmingham B7 4AZ, UK 
Registered Number: 1868855 (Cardiff) 
Tel: 44 (0)121 359 5096 
Fax: 44 (0)121 359 0375 
Web Site: http://www.mercia.com 



Reply via email to