GNOME Bugzilla – Bug 134886
Compile fails on bzlib.h parse error before "FILE"
Last modified: 2004-12-22 21:47:04 UTC
During the compile of garnome 0.30.1 I'm having some trouble compiling yelp 2.5.5 Generating and caching the translation database WARNING: ../po/th.po is not in UTF-8 but TIS-620, converting... Merging translations into GNOME_Yelp.server. In file included from yelp-io-channel.c:30: /usr/include/bzlib.h:177: error: parse error before "FILE" /usr/include/bzlib.h:205: error: parse error before "FILE" make[4]: *** [yelp-io-channel.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive-am] Error 2 make[1]: *** [build-work/main.d/yelp-2.5.5/Makefile] Error 2 make: *** [paranoid-install] Error 2
*** Bug 134903 has been marked as a duplicate of this bug. ***
This works fine here, admittedly with HEAD. Shaun, any idea?
Stef: can you check if your /usr/include/bzlib.h has an '#include <stdio.h>' line in it. Try adding '#include <stdio.h>' in yelp-io-channel.c, just before the '#include <bzlib.h>'.
Adding #include <stdio.h> to the yelp-io-channel.c file solved the issue. Is this a problem only on my PC or will this include line be added to the next version of yelp ?
I suspect you have a pretty old version of bzip2. Adding '#include <stdio.h>' doesn't hurt anyway, so it should be added to yelp.
I've tried looking for a newer version but the latest is from DEC 2001 released jan2002. If there is a newer version somewhere that I've not looked for please tell me. Thanks
I think it's pretty broken that a header file doesn't include the headers it actually needs. I'm not willing to break the code freeze over this. I'll add the include to yelp-io-channel after the release. Stef: what kind of system is this?
I'm running a slackware 8.0, with gcc-3.3.3,glibc-.2.3.2,kernel-2.6.5-rc1 as the major updated components
Updating milestone for 2.6.1.
I've added #include <stdio.h> to yelp-io-channel.c on HEAD and gnome-2-6. Closing.
I've tried to compile yelp 2.6.1 and the problem still exists in the 2.6.1 source. As reported earlier.
Is the problem here that Shaun included the stdio.h *after* bzlib.h rather than before? Stef, could you try moving it up? (And thanks for staying on this, Stef.)
It looks like it. My include lines look like this when yelp compiles OK #include <stdio.h> #include <glib.h> #include <zlib.h> #ifdef HAVE_LIBBZ2 #include <bzlib.h> #endif #include <string.h> Thanks for your prompt response.
All right, sorry for the delay on this. I've moved the stdio include above the others on HEAD and gnome-2-6, so this should really be fixed now. Feel free to reopen if there's still a problem.