can't build 0.5, 0.6pre1, or cvs head

hamannj
2009-05-23
2013-05-01
  • hamannj
    hamannj
    2009-05-23

    I've been trying to get mdbtools to build under a variety of platforms (OSX,FreeBSD) without much success:

    These are my results on OSX:

    CVS head:

    no ./configure in the directory, and I'm still pretty much a newbie for using autoconf, automake, and libtool. I will try to add if possible, but I need help.

    mdbtools-0.5:

    $ ./configure --with-unixodbc=/usr/local/unixODBC

    /bin/sh ../../libtool --mode=link gcc  -g -O2 -DSQL -DUNIXODBC   -o libmdb.la -rpath /usr/local/lib  catalog.lo mem.lo file.lo kkd.lo table.lo data.lo dump.lo backend.lo money.lo sargs.lo index.lo like.lo write.lo stats.lo  -L/opt/local/lib -lglib-2.0 -lintl -liconv 
    rm -fr .libs/libmdb.la .libs/libmdb.* .libs/libmdb.*
    gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libmdb.0.0.0.dylib  catalog.lo mem.lo file.lo kkd.lo table.lo data.lo dump.lo backend.lo money.lo sargs.lo index.lo like.lo write.lo stats.lo  -L/opt/local/lib -lglib-2.0 -lintl -liconv -lc -install_name  /usr/local/lib/libmdb.0.dylib -compatibility_version 1 -current_version 1.0
    ld: duplicate symbol _mdb_backends in mem.lo and catalog.lo

    collect2: ld returned 1 exit status
    make[2]: *** [libmdb.la] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1
    rufus:mdbtools-0.5 hamannj$

    looks like a link problem.

    mdbtools-0.6pre1:

    rufus:mdbtools-0.6pre1 hamannj$ make
    Making all in src
    Making all in libmdb
    if /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include  -I../../include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include     -g -O2 -DSQL -DUNIXODBC -MT backend.lo -MD -MP -MF ".deps/backend.Tpo" \       -c -o backend.lo `test -f 'backend.c' || echo './'`backend.c; \     then mv -f ".deps/backend.Tpo" ".deps/backend.Plo"; \     else rm -f ".deps/backend.Tpo"; exit 1; \     fi
    gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -g -O2 -DSQL -DUNIXODBC -MT backend.lo -MD -MP -MF .deps/backend.Tpo -c backend.c  -fno-common -DPIC -o .libs/backend.o
    backend.c:31: error: static declaration of 'mdb_backends' follows non-static declaration
    ../../include/mdbtools.h:150: error: previous declaration of 'mdb_backends' was here
    make[2]: *** [backend.lo] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1
    rufus:mdbtools-0.6pre1 hamannj$

    I haven't tried all of these on the FreeBSD box, but I need to get at least one installation working before giving up. Any help would be greatly appreciated. I'm willing to commit my code, but need a little guidance on how to fix this since I'm really new to the project.

    Thanks,
    Jeff.