From owner-bug-octave at bevo dot che dot wisc dot edu Sat Dec 14 12:37:04 1996 Subject: Octave-2.0 won't compile From: "John W. Eaton" To: M dot Dowling at tu-bs dot de Cc: bug-octave at bevo dot che dot wisc dot edu Date: Sat, 14 Dec 1996 12:36:07 -0600 On 14-Dec-1996, Mike Dowling wrote: : In order to compile octave, I first had to make the g++ and g77 : compilers. This appeared to work, as I could make stage2, and make : compare produced no differences. With linux systems, you are usually better off getting the binary distributions of the compiler and libraries. Of course, then the problem is to find the versions of libc and libg++ that are compatible (I'm slowly building up to a raging flame on this point, so stay tuned :-). : After countless such errors, I got: : : c++ -c -I. -I.. -I../liboctave -I../src -I../glob -I../libcruft/misc -DHAVE_CONFIG_H -fno-implicit-templates -mieee-fp -g -O2 -Wall Bounds.cc : Bounds.cc:31: iostream.h: No such file or directory If g++ can't find iostream.h, then your compiler or library is not installed correctly. Where does g++ search for include files? You can find out by compiling a simple C++ program with -v: #include int main (void} { cerr << "yo\n"; return 0; } bash$ g++ -v foo.cc gcc -v foo.cc -lg++ -lstdc++ -lm Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2/specs gcc version 2.7.2 /usr/lib/gcc-lib/i486-linux/2.7.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386) -D__i486__ foo.cc /tmp/cca07716.ii GNU CPP version 2.7.2 (i386 Linux/ELF) #include "..." search starts here: #include <...> search starts here: /usr/lib/g++-include /usr/local/include /usr/i486-linux/include /usr/lib/gcc-lib/i486-linux/2.7.2/include /usr/include End of search list. /usr/lib/gcc-lib/i486-linux/2.7.2/cc1plus /tmp/cca07716.ii -quiet -dumpbase foo.cc -version -o /tmp/cca07716.s GNU C++ version 2.7.2 (i386 Linux/ELF) compiled by GNU C version 2.7.2. as -V -Qy -o /tmp/cca077161.o /tmp/cca07716.s GNU assembler version 2.6 (i486-linux), using BFD version 2.6.0.2 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib/gcc-lib/i486-linux/2.7.2 /tmp/cca077161.o -lg++ -lstdc++ -lm -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o If the location of your include files is not listed in the search path, then you might be able to fix that with a symbolic link. However, if your version of libg++ was not compiled with your current version of gcc, you are likely to run into more trouble. Finally, installing libg++ on a Linux system is not as simple as it should be, because libg++ shares some basic I/O code with the Linux C library, and they must be compatible. jwe