From maintainers-request at octave dot org Sun Feb 6 12:15:19 2005 Subject: Compiling from CVS From: Todd Neal To: maintainers at octave dot org Date: Sun, 6 Feb 2005 13:14:04 -0500 Hello, I recently attempted to compile Octave from CVS and ran across the following problem: g++ -I. -I.. -I../liboctave -I../src -I../libcruft/misc -I../glob -I../glob -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -g -O2 \ -L.. -fPIC -o octave \ main.o balance.o besselj.o betainc.o chol.o colloc.o daspk.o dasrt.o dassl.o det.o eig.o expm.o fft.o fft2.o fftn.o fftw_wisdom.o filter.o find.o fsolve.o gammainc.o gcd.o getgrent.o getpwent.o getrusage.o givens.o hess.o inv.o kron.o lpsolve.o lsode.o lu.o minmax.o odessa.o pinv.o qr.o quad.o qz.o rand.o schur.o sort.o sqrtm.o svd.o syl.o time.o gplot.o \ -L../liboctave -L../libcruft -L../src -Wl,-rpath -Wl,/home/tolchz/octave/install/lib/octave-2.1.64 \ ../src/liboctinterp.a ../liboctave/liboctave.a ../libcruft/libcruft.a ../glob/glob.o ../glob/fnmatch.o \ -lblas -lreadline -lncurses -lm -L/usr/lib/gcc-lib/i486-linux/3.3.5 -L/usr/lib/gcc-lib/i486-linux/3.3.5/../../.. -lfrtbegin -lg2c -lm -lgcc_s ../src/liboctinterp.a(file-io.o)(.bss+0x0):/home/tolchz/octave/octave/src/file-io.cc:83: multiple definition of `tmp_files' gplot.o(.bss+0x20):/home/tolchz/octave/octave/src/:752: first defined here ../liboctave/liboctave.a(file-ops.o)(.text+0xf2b): In function `file_ops::tempnam(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator >&)': /home/tolchz/octave/octave/liboctave/file-ops.cc:335: warning: the use of `tempnam' is dangerous, better use `mkstemp' collect2: ld returned 1 exit status make[2]: *** [octave] Error 1 make[2]: Leaving directory `/home/tolchz/octave/octave/src' make[1]: *** [src] Error 2 make[1]: Leaving directory `/home/tolchz/octave/octave' make: *** [all] Error 2 I checked in file-io.cc and gplot.cc and tmp_files is declared twice. file-io.cc: 104 // List of files to delete when we exit or crash. 105 // 106 // XXX FIXME XXX -- this should really be static, but that causes 107 // problems on some systems. 108 std::stack tmp_files; gplot.cc: 2000 // List of files to delete when we exit or crash. 2001 // 2002 // XXX FIXME XXX -- this should really be static, but that causes 2003 // problems on some systems. 2004 std::stack tmp_files; Commenting out line 2004 in gplot.cc allows it to compile. Octave CVS downloaded Feb 6th, 2005 gcc (GCC) 3.3.5 (Debian 1:3.3.5-5) g++ (GCC) 3.3.5 (Debian 1:3.3.5-5) Thanks, Todd