help-octave
[Top][All Lists]
Advanced

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

Re: Compilation problems


From: Recif
Subject: Re: Compilation problems
Date: Sun, 25 Nov 2007 11:12:00 -0800 (PST)

I am using --prefix=$HOME to have octave installed relative to my home
directory not in /usr/bin.

It does not seem to find regex.h and pcre/pcre.h even though they are in
/usr/include. I even tried explicitly adding the include directories using
CPPFLAGS.  
config.log shows:
#define HAVE_PCRE_PCRE_H 1
#define HAVE_REGEX 1
#define HAVE_REGEXEC 1

Finally I just used include directives for regex.h and pcre/pcre.h in
regexp.cc and the compilation completed. 
'make check' gives some failed tests for the regex functions.

Recif

#if defined (HAVE_PCRE_PCRE_H)
#include <pcre/pcre.h>
#elif defined (HAVE_PCRE_H)
#include <pcre.h>
#elif defined (HAVE_REGEX)
#if defined (__MINGW32__)
#define __restrict
#endif
#include <regex.h>
#endif


David Bateman wrote:
> 
> Recif wrote:
>> Hi,
>>  I am trying to compile octave on a linux system using gcc 3.4.6
>> I ran make configure,and then make, but I get an error while compiling
>> regexp.cc 
>> I checked the archives but did not see any references to this problem.
>> Any help fixing it will be appreciated.
>> Recif
>>
>>
>> g++ -c  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc
>> -DHAVE_CONFIG_H -Wall -W -Wshadow -Wold-style-cast -g -O2
>> ./DLD-FUNCTIONS/regexp.cc -o pic/regexp.o
>> ./DLD-FUNCTIONS/regexp.cc: In function `int octregexp_list(const
>> octave_value_list&, const std::string&, bool, std::list<regexp_elem,
>> std::allocator<regexp_elem> >&, string_vector&, int&)':
>> ./DLD-FUNCTIONS/regexp.cc:372: error: `regex_t' was not declared in this
>> scope
>>   
> Huh, this is very weird. regex is part of the standard libc  and a man
> of onle of the functions on my system gives
> 
> 
> REGCOMP(3)                 Linux Programmer's Manual               
> REGCOMP(3)
> 
> NAME
>        regcomp, regexec, regerror, regfree - POSIX regex functions
> 
> SYNOPSIS
>        #include <sys/types.h>
>        #include <regex.h>
> 
>        int regcomp(regex_t *preg, const char *regex, int cflags);
>        int regexec(const  regex_t  *preg,  const  char *string, size_t
> nmatch,
>                    regmatch_t pmatch[], int eflags);
>        size_t regerror(int errcode, const regex_t *preg, char *errbuf, 
> size_t
>                        errbuf_size);
>        void regfree(regex_t *preg);
> 
> What OS are you running on? What does "man regcomp" tell you above the
> includes for the regex code? Why not install pcre instead and then the
> regexp code isn't used.
> 
> D.
> 
> -- 
> David Bateman                                address@hidden
> Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
> Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
> 91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 
> 
> The information contained in this communication has been classified as: 
> 
> [x] General Business Information 
> [ ] Motorola Internal Use Only 
> [ ] Motorola Confidential Proprietary
> 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Compilation-problems-tf4849574.html#a13938465
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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