configure ok; make failure of octave-2.9.17
David Bateman
adb014 at gmail.com
Sun Dec 2 10:09:49 CST 2007
Hans-Jürgen Greif wrote:
> the definition of of "regex_t" structure is missing :
>
> g++ -c -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc
> -DHAVE_CONFIG_H -mieee-fp -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: `regex_t' undeclared (first use this function)
> DLD-FUNCTIONS/regexp.cc:372: (Each undeclared identifier is reported
> only once
> for each function it appears in.)
> DLD-FUNCTIONS/regexp.cc:372: syntax error before `;' token
> DLD-FUNCTIONS/regexp.cc:373: `compiled' undeclared (first use this function)
> DLD-FUNCTIONS/regexp.cc:373: `REG_EXTENDED' undeclared (first use this
> function)
> DLD-FUNCTIONS/regexp.cc:374: `REG_ICASE' undeclared (first use this
> function)
> DLD-FUNCTIONS/regexp.cc:374: `regcomp' undeclared (first use this function)
> DLD-FUNCTIONS/regexp.cc:377: `regerror' undeclared (first use this function)
> DLD-FUNCTIONS/regexp.cc:382: `regfree' undeclared (first use this function)
> DLD-FUNCTIONS/regexp.cc:390: `regmatch_t' undeclared (first use this
> function)
> DLD-FUNCTIONS/regexp.cc:390: template argument 1 is invalid
> DLD-FUNCTIONS/regexp.cc:390: template argument 2 is invalid
> DLD-FUNCTIONS/regexp.cc:390: ISO C++ forbids declaration of
> `match_vector' with
> no type
> DLD-FUNCTIONS/regexp.cc:390: `match' undeclared (first use this function)
> DLD-FUNCTIONS/regexp.cc:390: invalid types `int[int]' for array subscript
> DLD-FUNCTIONS/regexp.cc:397: `REG_NOTBOL' undeclared (first use this
> function)
> DLD-FUNCTIONS/regexp.cc:397: `regexec' undeclared (first use this function)
> DLD-FUNCTIONS/regexp.cc:86: warning: unused parameter `string_vector&named'
> make[2]: *** [pic/regexp.o] Fehler 1
> make[2]: Verlassen des Verzeichnisses Verzeichnis
> »/home/gre/octave/octave-2.9.17/src«
> make[1]: *** [src] Fehler 2
>
> compiled on RHEL 3 with gcc-3.2.3-59 , glibc-2.3.2-95.50
>
> Cheers
>
> gre
There was another thread about this recently,
http://www.nabble.com/Compilation-problems-tf4849574.html#a13938465
However, I don't think there was ever a real solution. Regex is part of
the libc on my machine. The headers required are supposed to be
#include <sys/types.h>
#include <regex.h>
I note that sys/types.h is not included in src/DLD-FUNCTIONS/regexp.cc.
If you include it does this help?
In any case, the best solution for this is to install pcre as the
capabilities of the Octave regexp functions are limited without pcre..
D.
More information about the Bug-octave
mailing list