help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issues compiling octave-2.1.69 on FreeBSD 5.4


From: Joan Picanyol i Puig
Subject: Re: issues compiling octave-2.1.69 on FreeBSD 5.4
Date: Fri, 22 Apr 2005 15:08:41 +0200
User-agent: Mutt/1.5.6i

[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 <address@hidden> [20050421 21:29]:
> On 21-Apr-2005, Joan Picanyol i Puig <address@hidden> wrote:
> 
> | * John W. Eaton <address@hidden> [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 <fnmatch.h>
> 
> in liboctave/glob-match.h to be
> 
>   extern "C" {
>   #include <fnmatch.h>
>   }

My liboctave/glob-match.h does not #include <fnmatch.h> (this is after
applying your patch to configure.in and running autogen.sh).

tks
-- 
pica



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]