ty@reef.cis.ufl.edu (Tyng-Jing Yang) (04/13/91)
>You can get the source from prep.ai.mit.edu. Also see objc.702 in >NextAnswers for how to compile libg++ 1.37.0 on the NeXT. I did follow objc.702 to change variables in makefiles under src, test, and the main makefile. According to objc.702 we need to make following changes in main makefile, 1. enable XTRAFLAGS = -DNO_LIBGXX_MALLOC, also change sub makefiles in src,test dir. 2. Let PWD=/me/shar/g++lib (in my own case),since I'm not using GNU make. 3. Put the following lines in time.h in g++-include dir. #ifndef time_h #define time_h 1 #ifdef NeXT #define _TIME_H 1 #endif 4. Let GXX=cc++, VERBOSITY_FLAGS = -Wall In objc.702 it say "After doing each of these(above 4 steps) the GNUS libraries will compile on a NeXT machine". Well it doesn't work for me. I need to make more changes 5. CC= cc(not gcc) There are five passes in main makefile all: src tests install etc gperf The above five steps can make me compile src sucessfully. When come to "tests " pass it failed(see enclosure). I don't understand the error message, but my best guess is from LDXX=$(LIBDIR)/gcc-ld and CXXCRT=$(LIBDIR)/crt1+.o How should I change these two variables ? and Why it complain defs.hp can't find even I change PROTODIR to /usr/include (my g++ include dir) in all the genclass and genclass.sh files. ? Any pointers to my problems ? or Is there anyone like to submit their patch files or working libg++ to NeXT archive sites ? Thanks Jing ---------------------------------------------------------------- localhost# make all (cd src; make GXX="cc++" GXXFLAGS=" -I/me/shar/g++lib/g++-include -g -O -fstrength-reduce -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized -Wall -DNO_LIBGXX_MALLOC -pipe" GXXLDFLAGS="-L/me/shar/g++lib/src -lg++ -lm " LIBDIR="/usr/lib" SRCIDIR="/me/shar/g++lib/g++-include" CC="cc" CFLAGS=" -I/usr/lib/gcc-include -I/usr/include -I/me/shar/g++lib/g++-include -g -O -fstrength-reduce -fdelayed-branch -Wall -DNO_LIBGXX_MALLOC -pipe" RANLIB="ranlib" LDXX="/usr/lib/gcc-ld" GXXCRT1="/usr/lib/crt1+.o" MAKE="make" prefix="/usr" VPATH="/me/shar/g++lib/g++-include") (cd tests; make checktests GXX="cc++" GXXFLAGS=" -I/me/shar/g++lib/g++-include -g -O -fstrength-reduce -felide -constructors -fschedule-insns -fdelayed-branch -fsave-memoized -Wall -DNO_LIBGXX_MALLOC -pipe" GXXLDFLAGS="-L/me/shar/g++lib/src -lg++ -lm " LIBDIR="/usr/lib" SRCIDIR="/me/shar/g++lib/g++-include" CC="cc" CFLAGS=" -I/usr/lib/gcc-include -I/usr/include -I/me/shar/g++lib/g++-include -g -O -fstrength-reduce -fdelayed-branch -Wall -DNO_LIBGXX_MALLOC -pipe" RANLIB="ranlib" LDXX="/usr/lib/gcc-ld" GXXCRT1="/usr/lib/crt1+.o" MAKE="make" prefix="/usr") genclass int val defs i genclass: defs.hP: no such file *** Exit 1
madler@nntp-server.caltech.edu (Mark Adler) (04/13/91)
Tyng-Jing Yang requests: >> Is there anyone like to submit their patch files or working libg++ And ruin all your fun?! Well, if you insist ... How I installed the Gnu C++ library (your mileage may vary): 1. Got libg++-1.39.0.tar.Z from prep.ai.mit.edu via anonymous ftp. 2. In /me/tmp, I did: "zcat libg++-1.39.0.tar.Z | tar xvf -". Did a "cd libg++-1.39.0". 3. Created /usr/gnu, and /usr/gnu/lib (writable from me). 4. Changed Makefile(32) to "PWD=/me/tmp/libg++-1.39.0", commented out Makefile(31) (inserted "#" in first column). 5. Uncommented Makefile(93) to leave out the gnu malloc routines. 6. Changed "GXX = g++" to "GXX = cc++" in Makefile(120). 7. Changed "CC = gcc" to "CC = cc" in Makefile(124). 8. Commented out Makefile(148) to kill verbosity flags. 9. Did "make src" (takes a while--ignore the warnings). 10. Did "make install-lib" (puts libg++.a in /usr/gnu/lib). 11. Added these lines after line 2 in g++-include/time.h: #ifdef NeXT #define _TIME_H 1 #endif 12. Did "make install-include-files" (this puts the include files in /usr/gnu/lib/g++-include). 13. Did "make tests" (this takes rather a lot of disk space). There were differences from the expected output, but they appeared to just be precision problems. I didn't investigate further. 14. Removed the directory in tmp ("cd .. ; rm -rf libg++-1.39.0"). 15. Made a test program, x.cc, containing: #include <stream.h> main() { cout << "Hello world!\n"; } and compiled it using: cc++ -I/usr/gnu/lib/g++-include -O x.cc -L/usr/gnu/lib -lg++ and then: a.out printed: Hello world! How about that. And then you can merrily cc++ to your heart's content. Have fun. Mark Adler madler@pooh.caltech.edu