Bugs item #1776177, was opened at 2007-08-17 13:53
Message generated for change (Comment added) made by helly
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=616200&aid=1776177&group_id=96864
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
>Priority: 3
Private: No
Submitted By: Rainer Tammer (tammer)
>Assigned to: Marcus Börger (helly)
Summary: Build on AIX
Initial Comment:
Hello,
thanks for your work on re2c.
I have a small compilation problem on AIX 5.2/5.3.
During the configure process the following is inserted in the config.h:
/* Define to 1 if your system has a GNU libc compatible `malloc'
function, and
to 0 otherwise. */
#define HAVE_MALLOC 0
...
/* Define to rpl_malloc if the replacement function should be used. */
#define malloc rpl_malloc
This is cause by AC_FUNC_MALLOC
Unfortunately this is not working on AIX with the OS
compiler XL C/C++ 8.0.
There are no calls to malloc(0) in the code of re2c.
So the AIX malloc should work just fine.
The #define HAVE_MALLOC is not used by re2c.
So the easiest way to solve this problem would be
to remove the AC_FUNC_MALLOC test from configure.in.
This solves the first build problem on AIX.
This change should break noting on other platforms.
What do you think about it ??
During the actual build og re2c 0.13.0 I experienced a segfault
during the regeneration of scanner.cc
# dbx re2c
Type 'help' for help.
[using memory image in core]
reading symbolic information ...
Segmentation fault in fwrite at 0xd020f468 ($t1)
0xd020f468 (fwrite+0x3c) b01f0010 sth r0,0x10(r31)
(dbx) where
fwrite(??, ??, ??, ??) at 0xd020f468
...
see attached file
The segfault is caused in a call to fwrite().
The fix for this problem is very simple:
virtual int sync()
{
if (buffer.length() > 0)
fwrite(buffer.c_str(), sizeof(_E), buffer.length(), fp);
buffer.clear();
return fp == 0
|| _Tr::eq_int_type(_Tr::eof(), overflow())
|| 0 <= fflush(fp) ? 0 : -1;
}
The fwrite() function on AIX can not be called with
a length of 0. The above fix will prevent this. This
fix should not break anything on other OS.
The script run_tests.sh calls diff to compare the
results. The call to diff uses the parameter -u.
Unfortunately this parameter is not present on AIX.
The AIX diff have a slightly different syntax.
AIX diff -C3 a b
*** b Fri Aug 17 10:42:38 2007
--- a Fri Aug 17 10:42:26 2007
***************
*** 1,5 ****
1AAAA
2BBBB
! 3cccc
4DDDD
5EEEE
--- 1,5 ----
1AAAA
2BBBB
! 3CCCC
4DDDD
5EEEE
GNU diff -u a b
--- a 2007-08-17 10:42:26.000000000 +0200
+++ b 2007-08-17 10:42:38.000000000 +0200
@@ -1,5 +1,5 @@
1AAAA
2BBBB
-3CCCC
+3cccc
4DDDD
5EEEE
I think that the -u parameter is not really important
for the tests. If you remove the -u than the make
test will also run on AIX without modification.
This is the final result:
# gmake test
gmake all-am
gmake[1]: Entering directory `/daten/source/re2c-0.13.0'
gmake[1]: Nothing to be done for `all-am'.
gmake[1]: Leaving directory `/daten/source/re2c-0.13.0'
test -x run_tests.sh || chmod +x run_tests.sh
./run_tests.sh
./lessons/001_upn_calculator/calc_001.re:
Passed.
./lessons/001_upn_calculator/calc_002.re:
Passed.
./lessons/001_upn_calculator/calc_003.re:
Passed.
./lessons/001_upn_calculator/calc_004.re:
Passed.
./lessons/001_upn_calculator/calc_005.re:
Passed.
./lessons/001_upn_calculator/calc_006.s.re: -s
Passed.
./lessons/001_upn_calculator/calc_007.b.re: -b
Passed.
./lessons/001_upn_calculator/calc_008.b.re: -b
Passed.
./lessons/001_upn_calculator/windows/main.b.re: -b
Passed.
./lessons/002_strip_comments/strip_001.s.re: -s
Passed.
./lessons/002_strip_comments/strip_002.s.re: -s
Passed.
./lessons/002_strip_comments/strip_003.b.re: -b
Passed.
./test/bug1054496.re:
Passed.
./test/bug1163046.re:
Passed.
./test/bug1187785.re:
Passed.
./test/bug1297658.re:
Passed.
./test/bug1390174.re:
Passed.
./test/bug1454253.re:
Passed.
./test/bug1454253.s.re: -s
Passed.
./test/bug1454253b.s.re: -s
Passed.
./test/bug1472770.b.re: -b
Passed.
./test/bug1472770.f.re: -f
Passed.
./test/bug1472770.re:
Passed.
./test/bug1472770.s.re: -s
Passed.
./test/bug1479044.b.re: -b
Passed.
./test/bug1479044.re:
Passed.
./test/bug1479044.s.re: -s
Passed.
./test/bug1528269.re:
Passed.
./test/bug1529351.re:
Passed.
./test/bug1682718.is.re: -is
Passed.
./test/bug1682718.re:
Passed.
./test/bug1708378.ib.re: -ib
Passed.
./test/bug1711240.eis.re: -eis
Passed.
./test/c.re:
Passed.
./test/cmmap.re:
Passed.
./test/cnokw.re:
Passed.
./test/cond_error_00.re:
Passed.
./test/cond_error_01.c.re: -c
Passed.
./test/cond_error_02.c.re: -c
Passed.
./test/cond_error_03.c.re: -c
Passed.
./test/cond_error_04.c.re: -c
Passed.
./test/cond_error_05.c.re: -c
Passed.
./test/cond_error_06.c.re: -c
Passed.
./test/cond_error_07.c.re: -c
Passed.
./test/cond_error_08.c.re: -c
Passed.
./test/condition_01.c.re: -c
Passed.
./test/condition_02.c.re: -c
Passed.
./test/condition_02.cg.re: -cg
Passed.
./test/condition_03.cg.re: -cg
Passed.
./test/condition_04.cg.re: -cg
Passed.
./test/condition_05.cg.re: -cg
Passed.
./test/condition_05.cgitcondition_05.cgit.h.re:
-cgit./test/condition_05.cgit.h
Passed header test.
Passed.
./test/condition_05.cgtcondition_05.cgt.h.re: -cgt./test/condition_05.cgt.h
Passed header test.
Passed.
./test/condition_05.cs.re: -cs
Passed.
./test/condition_06.cs.re: -cs
Passed.
./test/condition_07.cbi.re: -cbi
Passed.
./test/condition_08.cbi.re: -cbi
Passed.
./test/condition_08.cbif.re: -cbif
Passed.
./test/condition_09.cbif.re: -cbif
Passed.
./test/condition_09.cgif.re: -cgif
Passed.
./test/config1.re:
Passed.
./test/config10.re:
Passed.
./test/config2.s.re: -s
Passed.
./test/config3.re:
Passed.
./test/config4a.f.re: -f
Passed.
./test/config4b.f.re: -f
Passed.
./test/config4c.f.re: -f
Passed.
./test/config4d.f.re: -f
Passed.
./test/config4e.f.re: -f
Passed.
./test/config4f.f.re: -f
Passed.
./test/config5.re:
Passed.
./test/config6.re:
Passed.
./test/config7a.g.re: -g
Passed.
./test/config7b.g.re: -g
Passed.
./test/config8.re:
Passed.
./test/config9.b.re: -b
Passed.
./test/ctx.b.re: -b
Passed.
./test/ctx.re:
Passed.
./test/ctx.s.re: -s
Passed.
./test/cunroll.re:
Passed.
./test/cvsignore.b.re: -b
Passed.
./test/cvsignore.re:
Passed.
./test/cvsignore.s.re: -s
Passed.
./test/cvsignore.u.re: -u
Passed.
./test/cvsignore.ub.re: -ub
Passed.
./test/cvsignore.w.re: -w
Passed.
./test/cvsignore.wb.re: -wb
Passed.
./test/error1.re:
Passed.
./test/error10.re:
Passed.
./test/error11.re:
Passed.
./test/error12.re:
Passed.
./test/error13.1.re: -1
Passed.
./test/error13.re:
Passed.
./test/error14.1.re: -1
Passed.
./test/error14.re:
Passed.
./test/error2.re:
Passed.
./test/error3.re:
Passed.
./test/error4.re:
Passed.
./test/error5.re:
Passed.
./test/error6.re:
Passed.
./test/error7.re:
Passed.
./test/error8.re:
Passed.
./test/error9.re:
Passed.
./test/input1.re:
Passed.
./test/input10.b.re: -b
Passed.
./test/input10.re:
Passed.
./test/input10.s.re: -s
Passed.
./test/input11.b.re: -b
Passed.
./test/input11.i.re: -i
Passed.
./test/input11.re:
Passed.
./test/input11.s.re: -s
Passed.
./test/input12.boinput12.c.re: -bo./test/input12.c
Passed.
./test/input12.oinput12.c.re: -o./test/input12.c
Passed.
./test/input13.re:
Passed.
./test/input2.re:
Passed.
./test/input3.re:
Passed.
./test/input4.re:
Passed.
./test/input5.re:
Passed.
./test/input6.re:
Passed.
./test/input7.re:
Passed.
./test/input8.b.re: -b
Passed.
./test/input8.g.re: -g
Passed.
./test/input8.re:
Passed.
./test/input9.re:
Passed.
./test/modula.re:
Passed.
./test/parse_date.b.re: -b
Passed.
./test/parse_date.db.re: -db
Passed.
./test/parse_date.g.re: -g
Passed.
./test/parse_date.re:
Passed.
./test/parse_date.s.re: -s
Passed.
./test/push.f.re: -f
Passed.
./test/push.fb.re: -fb
Passed.
./test/push.fg.re: -fg
Passed.
./test/push.fs.re: -fs
Passed.
./test/push.re:
Passed.
./test/repeater.re:
Passed.
./test/sample.re:
Passed.
./test/scanner.fs.re: -fs
Passed.
./test/scanner.re:
Passed.
./test/scanner.s.re: -s
Passed.
./test/simple.re:
Passed.
All 141 tests passed successfully.
This build was compiled with IBM XL X/C++ 8.0.
Bye
Rainer Tammer
----------------------------------------------------------------------
>Comment By: Marcus Börger (helly)
Date: 2007-08-20 14:58
Message:
Logged In: YES
user_id=271023
Originator: NO
The length issue was already fixed, you should have checked the bugs data
base or try HEAD versions first. I now also fixed the run_tests issue and
the configure stuff. The former by testing if -u will work and the latter
by dropping the offending lines since they are not needed anyway. Please
reopen the bug if there is still a problem. Otherwise both 12.3 and 13.1
will contain the fix when released - hopefully I can release 12.3 this
month. Anyway, thanks for finding the configure thingie.
----------------------------------------------------------------------
Comment By: Rainer Tammer (tammer)
Date: 2007-08-20 08:16
Message:
Logged In: YES
user_id=180014
Originator: YES
Hello,
I just tested the changes on Linux and I could not find any problem.
The make test completes without an error.
Bye
Rainer
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=616200&aid=1776177&group_id=96864
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Re2c-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/re2c-general