From: bahder@adelphi-tbb.army.mil (Thomas B. Bahder)
Subject: libg++-2.0 installation
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 17 Apr 1992 14:32:04 GMT

I am using a 040 NeXTcube and NeXTstation under Mach 2.1.

I have already successfully installed gcc-2.1. 


Now I am trying to installl the library, libg++-2.0,  and I have  
ecountered problems.  Below is an outline of my script. 


Any help would be greatly appreciated. 


Tom  Bahder

Applied Physics Branch
U.S.Army Laboratory Command
Harry Diamond Laboratories
(soon to be: Army Research Laboratory) 

Adelphi, Maryland 20783

email and NeXT mail: bahder@adelphi-tbb.army.mil 


tel. 301-394-2042
fax: 301-394-2103



My installation log follows: 

------------------------------------------------
     Installation of libg++-2.0 on NeXT under Mach 2.1


1.  Copy tar archive to disk, uncompress it and extract files.  



fox> uncompress libg++-2.0.tar.Z
fox> ls -l
total 4075
-rw-------  1 tom            7 Nov 21 01:44 Active.datebk
drwxrwxr-x 10 tom         1024 Apr 14 23:14 Apps/
drwxr-xr-x 11 tom         1024 Apr 10 21:50 C/
drwxrwxr-x  6 tom         1024 Mar 14 15:32 Library/
drwxrwxr-x  4 tom         1024 Nov  7 22:43 Mailboxes/
drwxr-xr-x  6 tom         1024 Dec 16 14:36 MathLink/
drwxr-xr-x  2 tom         1024 Mar  8 01:10 Mma/
drwxr-xr-x  5 tom         1024 Dec 18 22:32 Mma.teach/
-rw-r--r--  1 tom          495 Apr 16 00:47 bytesizes.c
drwxr-xr-x  4 tom         1024 Apr 11 00:42 comm/
-rw-r--r--  1 tom        34931 Apr 16 01:02 gcc-2.1.MyInstall
drwxr-xr-x  3 tom         1024 Mar 16 00:58 graphics/
-rw-r--r--  1 tom          720 Apr 16 00:51 hello.cc
drwxr-xr-x  4 tom         1024 Feb 26 21:50 include/
drwxr-xr-x  2 tom         1024 Apr 14 23:17 kdotp/
-rw-r--r--  1 tom         1904 Apr 16 21:46 libg++-2.0.Install.info
-rw-r--r--  1 tom      3801088 Apr 10 16:22 libg++-2.0.tar
-rw-r--r--  1 tom       291164 Apr 16 14:38 libg++.dvi
drwxr-xr-x 10 tom         1024 Feb 23 11:52 money/
drwxr-xr-x  3 tom         1024 Apr 15 00:00 next/
drwxr-xr-x  2 tom         1024 Apr 14 23:16 qwell/
drwxr-xr-x  2 tom         1024 Aug 12  1991 resume/
drwxr-xr-x  3 tom         1024 Apr  4 19:07 sound/
drwxr-xr-x  2 tom         1024 Apr 14 20:38 temp/
drwxr-xr-x  3 tom         1024 Mar 15 23:59 temp4/
drwxr-xr-x  2 tom         1024 Apr 11 20:59 text/
fox> tar xvf libg++-2.0.tar


2.  Do the following:

Near line 239 of config.sub, in the libg++-2.0 directory, you will  
see:

    next)
        basic_machine=m68k-next
        os=-sysv

Change that last bit to:

	os=-bsd


3. Do the following:

In the file

/tom/libg++-2.0/libg++/g++-include/sys/socket.h

Put an #ifndef __NeXT__ around if to prevent the multiple  
definitions.   Specifically, this means 


(a). insert #ifndef __NeXT__ 

(b). insert #endif

see below:

In the above file, CHANGE the block:

#define __libgxx_sys_socket_h 1

// void* in select, since different systems use int* or fd_set*
int       select(int, void*, void*, void*, struct timeval*);

int       accept(int, struct sockaddr*, int*);
int       bind(int, const void*, int);
int       connect(int, struct sockaddr*, int);
int       getsockname(int, struct sockaddr*, int*);
int       getpeername(int, struct sockaddr*, int*);  // 16 Oct 90  
Talisman
int       getsockopt(int, int, int, void*, int*);
int       listen(int, int);
int       rcmd(char**, int, const char*, const char*, const char*,  
int*);
int       recv(int, void*, int, int);
int       recvfrom(int, void*, int, int, void*, int *);
int       recvmsg(int, struct msghdr*, int);
int       rexec(char**, int, const char*, const char*, const char*,  
int*);
int       rresvport(int*);
int       send(int, const void*, int, int);
int       sendto(int, const void*, int, int, const char*, int);
int       sendmsg(int, const struct msghdr*, int);
int       setsockopt(int, int, int, const char*, int);
int       shutdown(int, int);
int       socket(int, int, int);
int       socketpair(int, int, int, int sv[2]);
#endif


TO BE:

#define __libgxx_sys_socket_h 1

#ifndef __NeXT__
// void* in select, since different systems use int* or fd_set*
int       select(int, void*, void*, void*, struct timeval*);

int       accept(int, struct sockaddr*, int*);
int       bind(int, const void*, int);
int       connect(int, struct sockaddr*, int);
int       getsockname(int, struct sockaddr*, int*);
int       getpeername(int, struct sockaddr*, int*);  // 16 Oct 90  
Talisman
int       getsockopt(int, int, int, void*, int*);
int       listen(int, int);
int       rcmd(char**, int, const char*, const char*, const char*,  
int*);
int       recv(int, void*, int, int);
int       recvfrom(int, void*, int, int, void*, int *);
int       recvmsg(int, struct msghdr*, int);
int       rexec(char**, int, const char*, const char*, const char*,  
int*);
int       rresvport(int*);
int       send(int, const void*, int, int);
int       sendto(int, const void*, int, int, const char*, int);
int       sendmsg(int, const struct msghdr*, int);
int       setsockopt(int, int, int, const char*, int);
int       shutdown(int, int);
int       socket(int, int, int);
int       socketpair(int, int, int, int sv[2]);
#endif
#endif




4.  Now, cd to the sub directory 'libg++-2.0/libg++' and type:  

../configure next
This will create and configure a Makefile.


fox> ../configure next
Created "Makefile" in /tom/libg++-2.0/libg++
fox> 





Newsgroups: gnu.gcc.help