Re: AIDE compilation under cygwin
On Tue, 16 Mar 2004 22:04:37 -0600 John Kristoff [EMAIL PROTECTED] wrote: Does someone have any detailed notes about installing a current version of AIDE under cygwin? mhash appears to compile OK, but the configure script in AIDE fails in its mhash library check. From the config.log: [...] /[dir]/mhash-0.8.18/lib/mhash.c:664: multiple definition of `_main' I finally got around to looking at this again and thought I would post my solution in case any one else had a need for it. Richard had pointed out the following in mhash.c: #ifdef WIN32 WIN32DLL_DEFINE int main (void) { /* empty main function to avoid linker error (see cygwin FAQ) */ } #endif The cygwin FAQ at http://cygwin.com/faq/faq_toc.html#TOC95 mentions a potential problem with dynamic libraries needing this hack or that the compiler line needs to be reordered. I didn't have much luck with the latter, so to solve I removed the definition and main() function from the mhash.c source file and built mhash as follows: ./configure --enable-static=yes --enable-shared=no make Then aide as: ./configure --with-extra-libs=-L/path/to/mhash-0.8.18/lib/.libs \ --with-extra-includes=-I/path/to/mhash-0.8.18/lib make A working aide.exe was the result. John
AIDE compilation under cygwin
Does someone have any detailed notes about installing a current version of AIDE under cygwin? mhash appears to compile OK, but the configure script in AIDE fails in its mhash library check. From the config.log: configure:2996: gcc -E -g -O2 -I/[dir]/mhash-0.8.18/lib -static conftest.c /dev/null 2conftest.out configure:3028: checking for gzdopen in -lz configure:3047: gcc -o conftest -g -O2 -static -g -O2 -I/[dir]/mhash-0.8.18/lib -static -L/[dir]/mhash-0.8.18/lib/.libs -static conftest.c -lz 15 configure:3096: checking for regexec configure:3124: gcc -o conftest -g -O2 -static -g -O2 -I/dir]/mhash-0.8.18/lib -static -L/[dir]/mhash-0.8.18/lib/.libs conftest.c -lz 15 configure:3096: checking for regcomp configure:3124: gcc -o conftest -g -O2 -static -g -O2 -I/[dir]/mhash-0.8.18/lib -static -L/[dir]/mhash-0.8.18/lib/.libs conftest.c -lz 15 configure:3208: checking for mhash_get_block_size in -lmhash configure:3227: gcc -o conftest -g -O2 -static -g -O2 -I/[dir]/mhash-0.8.18/lib -static -L/[dir]/mhash-0.8.18/lib/.libs conftest.c -lmhash -lz 15 /[dir]/mhash-0.8.18/lib/.libs/libmhash.a(mhash.o)(.text+0xd70): In function `main': /[dir]/mhash-0.8.18/lib/mhash.c:664: multiple definition of `_main' /cygdrive/c/WINDOWS/TEMP/cc0Ut2p0.o(.text+0x0):/[dir]/aide-0.10/configure:3222: first defined here collect2: ld returned 1 exit status configure: failed program was: #line 3216 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mhash_get_block_size(); int main() { mhash_get_block_size() ; return 0; } Thanks for any hints, John