Tue 18 Jan 2011 09:09:57 AM UTC, comment #16:
I'm going to close this report since the problem is now fixed in Octave. If gnulib is later fixed to remove the redefinition of fnmatch and we remember, we could revert the change in Octave.
|
Sun 16 Jan 2011 10:29:12 AM UTC, comment #15:
Hello
I have confirmed that the changeset below fix this issue.
Regards
Tatsuro
|
Sun 09 Jan 2011 10:23:36 PM UTC, comment #14:
Since it looks like the redefinition is happening because of gnulib, I asked about this problem on the gnulib mailing list. I'll change the DEFUN to DEFUNX if there is no way to fix the problem in gnulib.
|
Sun 09 Jan 2011 09:55:43 PM UTC, comment #13:
Using,
DEFUNX ("fnmatch", Ffnmatch,
instead of
DEFUN (fnmatch, ...)
test_system.m result change to
test_system.m .................................... PASS 84/84
|
Sun 09 Jan 2011 09:41:37 PM UTC, comment #12:
Sorry I have omitted to see the below:
*******************
/* Define to a replacement function name for fnmatch(). */
#define fnmatch posix_fnmatch
*******************
The above is found in config.h.
|
Sun 09 Jan 2011 09:36:45 PM UTC, comment #11:
You wrote:
Yes, but is there another line that does
|
Sun 09 Jan 2011 09:34:01 PM UTC, comment #10:
Looking at the files that you posted, it looks like fnmatch is still being redefined to posix_fnmatch. Where is that happening if it is not in config.h? Does some header file on your system do that? If so, which one?
|
Sun 09 Jan 2011 09:25:59 PM UTC, comment #9:
I carried out git pull and executed ./autogen.sh --copy --gnulib-srcdir=../gnulib. And then I executed configure and make but fnmatch errors in test_system.m still happened.
I have looked into 'config.h' and found
/* Define to 1 if you have the <fnmatch.h> header file. */
/* #undef HAVE_FNMATCH_H */
I have attached a new -save-tmp results and diffs from the previous one in tar.bz2 archived form.
BTW,
I am now trying
*************
#define fnmatch posix_fnmatch
DEFUNX ("fnmatch", Ffnmatch,
*************
After the above will be done I will report here.
(file #22380)
|
Sun 09 Jan 2011 12:16:08 AM UTC, comment #8:
Are you up to date with gnulib? Could you please try running
in the gnulib source directory, then reconfiguring and rebuilding to see if that fixes this problem? If not, then please check your generated config.h file and see if it has a
line in it, and tell me what that line is.
|
Sat 08 Jan 2011 10:54:05 PM UTC, comment #7:
In the file you attached, I see
so in some header file that is included in dirfns.cc, there is apparently a
or something that has that effect. You could work around the problem by using
instead of
but I would really like to know where this definition is coming from. If it is gnulib, then we should fix the problem instead of just covering it up.
|
Sat 08 Jan 2011 04:17:21 AM UTC, comment #6:
Hello John
Sorry I have not carried out the following
**************************
nm src/.libs/liboctinterp_la-dirfns.o | grep fnmatch
**************************
Results are
**************************
$ nm src/.libs/liboctinterp_la-dirfns.o | grep fnmatch
0000a230 T __Z14Fposix_fnmatchRK17octave_value_listi
U __ZNK10glob_match21opts_to_fnmatch_flagsEj
**************************
On windows, glob and fnmatch do not exist in default. By the 3.2, the widows builders uses the originally prepared glob and fnmatch. As far as I remember, when you decided to use gnulib, discussion on glob and fnmatch were carried out. Final conclusion is to use gnulib version of glob and fnmatch if the system does not have them.
Therefore of source, in condig.h,
/* Define to 1 if you have the <fnmatch.h> header file. */
/* #undef HAVE_FNMATCH_H */
Therefore in libgnu/.libs, fnmatch.o exists and fnmatch.o is found libgnu.a.
And I also fonud 'fnmatch' in liboctinterp_la-dirfns.o by an text editor as I wrote in the previous mail.
I attached dirfns.ii (bzip2 compressed).
Regards
Tatsuro
(file #22376)
|
Thu 06 Jan 2011 11:56:34 PM UTC, comment #5:
So there is no fnmatch symbol in src/.libs/liboctinterp_la-dirfns.o at all? What does
return by itself? Does this file have any symbols at all? I can't see any conditionals in the corresponding dirfns.cc file that would cause the fnmatch function to be omitted.
Is there a "#define fnmatch ..." on MinGW systems that is causing trouble?
Can you add -save-temps to CXXFLAGS and recompile dirfns.cc and attach the resulting dirfns.ii file? Maybe that will give a clue about why there is no fnmatch symbol present.
|
Thu 06 Jan 2011 11:18:54 PM UTC, comment #4:
nm src/.libs/liboctinterp_la-dirfns.o | grep fnmatch
I found that fnmach in src/.libs/liboctinterp_la-dirfns.o using the editor.
****************
cd %s: %s rename readlink link mkdir directory exists readdir symlink fnmatch confirm_recursive_rmdir all filesep glob
*****************
I executed the following
octave:1> x = _builtins_ ();
octave:2> x{strmatch ("fnmatch", x)}
octave:3>
|
Thu 06 Jan 2011 07:33:17 AM UTC, comment #3:
What does
show on your system?
Or, what does
show?
|
Mon 03 Jan 2011 08:45:08 AM UTC, comment #2:
Hello
Thank you for your reply.
I have tried,
octave:18> fnmatch ("f*", "foo")
error: `fnmatch' undefined near line 18 column 1
fnmatch has not be able to be recognized from the octave on MinGW (developments source since Benjamin had reported the error.
|
Mon 03 Jan 2011 08:10:26 AM UTC, comment #1:
This looks like Octave is telling you that its fnmatch function is not available, but I don't see how that could happen. The fnmatch function is defined in dirfns.cc, and is always defined as far as I can tell.
What happens if you start Octave and type
fnmatch ("f*", "foo")
at the command prompt?
|
Mon 03 Jan 2011 07:48:09 AM UTC, original submission:
In the fntests on octave-dev source (3.3.54+ on Jan 1, 2011), I have met errors,
Integrated test scripts:
<snip>
Fixed test scripts:
test_system.m .......................................... PASS 81/84 FAIL 3
Summary:
PASS 4963
FAIL 20
In the test_system,
***** test
string_fill_char = setstr (0);
assert((fnmatch ("a*a", {"aba"; "xxxba"; "aa"}) == [1; 0; 1]
&& fnmatch ({"aa"; "bb"}, "bob")
&& fnmatch ("x[0-5]*", {"x1"; "x6"}) == [1; 0]
&& fnmatch ("x[0-5]*", {"x1"; "x6"; "x001"}) == [1; 0; 1]
&& fnmatch ("x???y", {"xabcy"; "xy"}) == [1; 0]));
!!!!! test failed
`fnmatch' undefined near line 4 column 10
***** error <Invalid call to fnmatch.*> fnmatch ();
!!!!! expected <Invalid call to fnmatch.*> but got `fnmatch' undefined near line 2 column 2
***** error <Invalid call to fnmatch.*> fnmatch ("foo", "bar", 3);
!!!!! expected <Invalid call to fnmatch.*> but got `fnmatch' undefined near line 2 column 2
The fnmatch error has already reported by Benjamin in the octave-maintainers list.
http://octave.1599824.n4.nabble.com/building-development-tip-with-mingw32-td2013435.html
I have registered the report of this test result to bug tracker to prevent this issue to be forgotten.
|