Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTS: '}' is missing at the end of write_logs.c #7

Closed
wmdlr opened this issue May 26, 2011 · 6 comments
Closed

TESTS: '}' is missing at the end of write_logs.c #7

wmdlr opened this issue May 26, 2011 · 6 comments

Comments

@wmdlr
Copy link
Contributor

wmdlr commented May 26, 2011

GCC output looks like:

gcc -DHAVE_CONFIG_H -I. -I../include -I../include/qb -I../include -I../include -ansi -D_GNU_SOURCE -DANSI_ONLY -g -O2 -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -MT bench_log-write_logs.o -MD -MP -MF .deps/bench_log-write_logs.Tpo -c -o bench_log-write_logs.o test -f 'write_logs.c' || echo './'write_logs.c
write_logs.c: In function ‘log_dict_words’:
write_logs.c:32860:1: error: expected declaration or statement at end of input

@asalkeld
Copy link
Contributor

Are you using bash or another shell?
Are you doing a "make -j"?

Can you try the following:
cd tests
./make-log-test > write_logs.c
make

We might need to so something like thid in the makefile:
./make-log-test > write_logs-tmp.c
mv write_logs-tmp.c write_logs.c

@asalkeld
Copy link
Contributor

Can you try this patch?

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 469c101..e5b8766 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -61,7 +61,8 @@ bench_log_LDADD = -lrt $(top_builddir)/lib/libqb.la

if HAVE_DICT_WORDS
write_logs.c:

  •   $(srcdir)/make-log-test > $(builddir)/write_logs.c
    
  •   $(srcdir)/make-log-test > $(builddir)/write_logs-tmp.c
    
  •   mv $(builddir)/write_logs-tmp.c $(builddir)/write_logs.c
    
    endif

@wmdlr
Copy link
Contributor Author

wmdlr commented May 26, 2011

We solved the problem by patching make-log-tests:

diff -Naur libqb-orig/tests/make-log-test libqb/tests/make-log-test
--- libqb-orig/tests/make-log-test 2011-05-26 13:29:07.000000000 +0400
+++ libqb/tests/make-log-test 2011-05-26 13:46:08.000000000 +0400
@@ -30,4 +30,5 @@
fi
done < /usr/share/dict/words

+echo "}"

The last 'echo "}"' closes log_dict_words function in write_logs.c

@asalkeld
Copy link
Contributor

OK, I'll make this script more robust.
What is you OS/distro?

@wmdlr
Copy link
Contributor Author

wmdlr commented May 26, 2011

Debian squeeze

@asalkeld
Copy link
Contributor

I have applied your fix, so I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants