seqan / seqan

SeqAn's official repository.
https://www.seqan.de
Other
473 stars 171 forks source link

/seqan/include/seqan/stream/zipstream/zutil.h:212:37: error: expected initializer before ‘OF’ #899

Closed mmokrejs closed 9 years ago

mmokrejs commented 9 years ago

In https://github.com/seqan/seqan/issues/772#issuecomment-77446340 I fetched seqan sources. after the commands shown there I did "make". Compiling it using gcc-4.8.3 gives me:

...
Scanning dependencies of target test_stream
[  7%] Building CXX object tests/stream/CMakeFiles/test_stream.dir/test_stream.cpp.o
In file included from /mnt/external/tmp/seqan/include/seqan/stream/stream_compressor.h:42:0,
                 from /mnt/external/tmp/seqan/include/seqan/stream.h:89,
                 from /mnt/external/tmp/seqan/tests/stream/test_stream.cpp:39:
/mnt/external/tmp/seqan/include/seqan/stream/zipstream/zutil.h:212:37: error: expected initializer before ‘OF’
 typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf,
                                     ^
/mnt/external/tmp/seqan/include/seqan/stream/zipstream/zutil.h:214:16: error: expected initializer before ‘OF’
 voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
                ^
/mnt/external/tmp/seqan/include/seqan/stream/zipstream/zutil.h:215:16: error: expected initializer before ‘OF’
 void   zcfree  OF((voidpf opaque, voidpf ptr));
                ^
In file included from /mnt/external/tmp/seqan/include/seqan/basic.h:61:0,
                 from /mnt/external/tmp/seqan/tests/stream/test_stream.cpp:38:
/mnt/external/tmp/seqan/include/seqan/basic/basic_exception.h:358:37: warning: ‘seqan::_globalExceptionHandler’ defined but not used [-Wunused-variable]
 static const std::terminate_handler _globalExceptionHandler = std::set_terminate(globalExceptionHandler);
                                     ^
tests/stream/CMakeFiles/test_stream.dir/build.make:54: recipe for target 'tests/stream/CMakeFiles/test_stream.dir/test_stream.cpp.o' failed
make[2]: *** [tests/stream/CMakeFiles/test_stream.dir/test_stream.cpp.o] Error 1
CMakeFiles/Makefile2:1820: recipe for target 'tests/stream/CMakeFiles/test_stream.dir/all' failed
make[1]: *** [tests/stream/CMakeFiles/test_stream.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
temehi commented 9 years ago

@mmokrejs Do you still have this problem or is it solved with #772?

mmokrejs commented 9 years ago

I do not have this problem with seqan-2.0.0 with a patch from https://www.mail-archive.com/gentoo-commits@lists.gentoo.org/msg99608.html

temehi commented 9 years ago

Thanks @mmokrejs ! @esiragusa you can close the issue now.

h-2 commented 9 years ago

wait, maybe we should incorporate the patch instead of relying on downstream?

esiragusa commented 9 years ago

@h-2 yes! @temehi would you please prepare a PR?

temehi commented 9 years ago

I don't think the patch is the way to go. The problem is not with "/include/seqan/stream/zipstream/zutil.h". initialization of "OF" should be done in the not in SeqAn.

h-2 commented 9 years ago

Hm, but apparently not all zip libraries provide this. If we add this to our zutil, it shouldn't hurt anyone, right?

#ifndef OF
#define OF(x) x
#endif
esiragusa commented 9 years ago

Really? If so, then let's do as @h-2 proposed.

h-2 commented 9 years ago

@mmokrejs can you confirm the patch by @temehi fixes your build problems?

mmokrejs commented 9 years ago

[FIXED #899] of macro defined under zutil.h

This one ( b8e66974dc39a802197e56a7db24d282a6ed2fc5 ) works for me as well. I am not a C programmer but couldn't configure check for a zlib version and adjust properly? Yeah, no configure used ... ;-) Sounds hackish but I don't care. It also works. Thanks. I have zlib-1.2.8, btw.

h-2 commented 9 years ago

Well, if this works, we will take it I think ;)