From owner-freebsd-ports@FreeBSD.ORG Fri Apr 22 13:09:49 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 125B516A4CE for ; Fri, 22 Apr 2005 13:09:49 +0000 (GMT) Received: from grummit.biaix.org (86.Red-213-97-212.pooles.rima-tde.net [213.97.212.86]) by mx1.FreeBSD.org (Postfix) with SMTP id 976C143D58 for ; Fri, 22 Apr 2005 13:09:47 +0000 (GMT) (envelope-from lists-octave@biaix.org) Received: (qmail 49262 invoked by uid 1000); 22 Apr 2005 13:08:41 -0000 Date: Fri, 22 Apr 2005 15:08:41 +0200 From: Joan Picanyol i Puig To: "John W. Eaton" Message-ID: <20050422130841.GB40624@grummit.biaix.org> References: <20050420175047.GB29990@grummit.biaix.org> <42674D94.7070108@gmail.com> <20050421155406.GB86490@grummit.biaix.org> <16999.53351.603626.223836@devzero.bogus.domain> <20050421191441.GB9754@grummit.biaix.org> <16999.65302.366221.91861@devzero.bogus.domain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16999.65302.366221.91861@devzero.bogus.domain> User-Agent: Mutt/1.5.6i cc: help@octave.org cc: freebsd-ports@freebsd.org Subject: Re: issues compiling octave-2.1.69 on FreeBSD 5.4 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2005 13:09:49 -0000 [added freebsd-ports@ to the discussion; for those interested, the original thread can be found at http://www.octave.org/mailing-lists/help-octave/2005/] * John W. Eaton [20050421 21:29]: > On 21-Apr-2005, Joan Picanyol i Puig wrote: > > | * John W. Eaton [20050421 18:10]: > | > Octave should only need standard and relatively basic functionality. > | > I think the real problem was an oops in configure.in (see below for a > | > patch). I'm not sure how that ended up in the sources that were > | > distributed. > | > | No luck, I still get the following: > | > | g++ -I/usr/include -I/usr/local/include -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 -L/usr/lib -L/usr/local/lib -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 pinv.o qr.o quad.o qz.o rand.o schur.o sort.o sqrtm.o svd.o syl.o time.o \ > | -L../liboctave -L../libcruft -L../src \ > | ../src/liboctinterp.a ../liboctave/liboctave.a ../libcruft/libcruft.a ../glob/glob.o ../glob/fnmatch.o \ > | -lcblas -lf77blas -latlas -lfftw3 -lreadline -lncurses -lm -L/usr/lib -L/usr/local/lib -lg2c -lm > | ../liboctave/liboctave.a(file-ops.o)(.text+0x23b): In function `file_ops::tempnam(std::string const&, std::string const&, std::string&)': > | /fs/scratch/mount/scratch/build/octave-2.1.69/liboctave/file-ops.cc:419: warning: warning: tempnam() possibly used unsafely; consider using mkstemp() > | ../liboctave/liboctave.a(glob-match.o)(.text+0x124): In function `glob_match::match(std::string const&)': > | /usr/include/c++/3.4/bits/basic_string.h:368: undefined reference to `fnmatch(char const*, char const*, int)' > | gmake[2]: *** [octave] Error 1 > | gmake[2]: Leaving directory `/fs/scratch/mount/scratch/build/octave-2.1.69/src' > | gmake[1]: *** [src] Error 2 > | gmake[1]: Leaving directory `/fs/scratch/mount/scratch/build/octave-2.1.69' > | gmake: *** [all] Error 2 > | 582,p3,2$ > | > | The symbols is in the glob/ libraries: > | > | 583,p3,1$ nm glob/fnmatch.o | grep fnmatch > | 00000e68 T fnmatch > | 00000000 t internal_fnmatch > | 584,p3,0$ nm glob/glob.o | grep fnmatch > | U fnmatch > | > | but the error shows the system include file. FWIW, adding -lc to the > | command line does not solve the issue either. > > Can you look in config.log and find why the tests fail to find the > system versions of fnmatch and glob? Apparently it _does_ find the system's version: 532,p2,0$ grep fnmatch config.log configure:17009: checking fnmatch.h usability configure:17054: checking fnmatch.h presence configure:17125: checking for fnmatch.h configure:17439: checking for fnmatch ac_cv_func_fnmatch=yes ac_cv_header_fnmatch_h=yes 533,p2,0$ grep glob config.log configure:16857: checking glob.h usability configure:16902: checking glob.h presence configure:16973: checking for glob.h configure:17354: checking for glob in -lglob configure:17392: gcc -o conftest -g -O2 -I/usr/include -I/usr/local/include -L/usr/lib -L/usr/local/lib conftest.c -lglob -lm >&5 /usr/bin/ld: cannot find -lglob | char glob (); | glob (); configure:17551: checking for glob ac_cv_func_glob=yes ac_cv_header_glob_h=yes ac_cv_lib_glob_glob=no 534,p2,0$ I hope this is useful: configure:17009: checking fnmatch.h usability configure:17021: gcc -c -g -O2 -I/usr/include -I/usr/local/include conftest.c >&5 configure:17027: $? = 0 configure:17031: test -z || test ! -s conftest.err configure:17034: $? = 0 configure:17037: test -s conftest.o configure:17040: $? = 0 configure:17050: result: yes configure:17054: checking fnmatch.h presence configure:17064: gcc -E -I/usr/include -I/usr/local/include conftest.c configure:17070: $? = 0 configure:17090: result: yes configure:17125: checking for fnmatch.h configure:17132: result: yes configure:17439: checking for fnmatch configure:17504: gcc -o conftest -g -O2 -I/usr/include -I/usr/local/include -L/usr/lib -L/usr/local/lib conftest.c -lm >&5 configure:17510: $? = 0 configure:17514: test -z || test ! -s conftest.err configure:17517: $? = 0 configure:17520: test -s conftest configure:17523: $? = 0 configure:17535: result: yes configure:17551: checking for glob configure:17616: gcc -o conftest -g -O2 -I/usr/include -I/usr/local/include -L/usr/lib -L/usr/local/lib conftest.c -lm >&5 configure:17622: $? = 0 configure:17626: test -z || test ! -s conftest.err configure:17629: $? = 0 configure:17632: test -s conftest configure:17635: $? = 0 configure:17647: result: yes About -lglob: configure:17354: checking for glob in -lglob configure:17392: gcc -o conftest -g -O2 -I/usr/include -I/usr/local/include -L/usr/lib -L/usr/local/lib conftest.c -lglob -lm >&5 /usr/bin/ld: cannot find -lglob > > What is the output from > > nm liboctave/glob-match.o | grep fnmatch 530,p2,2$ nm liboctave/glob-match.o | grep fnmatch U _Z7fnmatchPKcS0_i 531,p2,0$ > Also, can you determine precisely which fnmatch.h file is being > included? I don't know how to. I've found two fnmatch.h files, one in /usr/include and the other in /usr/local/include, installed by the heimdal port. > Does it include lines like > > #ifdef __cplusplus > extern "C" { > #endif > > #ifdef __cplusplus > } > #endif > > around the contents of the file? None of them do. > If not, does changing the line > > #include > > in liboctave/glob-match.h to be > > extern "C" { > #include > } My liboctave/glob-match.h does not #include (this is after applying your patch to configure.in and running autogen.sh). tks -- pica