undefined reference _ext2fs_get_device_size2

Help
2010-05-26
2012-11-28
  • Chris Brown
    Chris Brown
    2010-05-26

    Hi

    I'm trying to install gearman under cygwin. One of its dependencies is libuuid so I'm now trying to build e2fsprogs.

    I've set environment variables CC, CXX, CPPFLAGS, LDFLAGS, & LIBS.
    CC=gcc
    CXX=g++
    CPPFLAGS=-I/usr/win32/include -I./lib/ext2fs
    LDFLAGS=-L/usr/win32/lib -L./lib
    LIBS=-lext2fs

    I'm running ./configure -with-gnu-ld;make

    The output I get is

    make: Entering directory `/cygdrive/c/tmp/e2fsprogs-1.41.12/e2fsck'
            COMPILE_ET prof_err.et
            CC gen_crc32table
            GEN32TABLE crc32table.h
            CC crc32.c
            CC dict.c
            CC unix.c
            CC e2fsck.c
            CC super.c
            CC pass1.c
            CC pass1b.c
            CC pass2.c
            CC pass3.c
            CC pass4.c
            CC pass5.c
            CC journal.c
            CC badblocks.c
            CC util.c
            CC dirinfo.c
            CC dx_dirinfo.c
            CC ehandler.c
            CC problem.c
            CC message.c
            CC recovery.c
            CC region.c
            CC revoke.c
            CC ea_refcount.c
            CC rehash.c
            CC profile.c
            CC prof_err.c
            LD e2fsck
    unix.o: In function `main':
    /cygdrive/c/tmp/e2fsprogs-1.41.12/e2fsck/unix.c:1131: undefined reference to `_ext2fs_get_device_size2'
    /cygdrive/c/tmp/e2fsprogs-1.41.12/e2fsck/unix.c:1144: undefined reference to `_ext2fs_get_device_size2'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: Leaving directory `/cygdrive/c/tmp/e2fsprogs-1.41.12/e2fsck'
    make: ***  Error 1
    make: Leaving directory `/cygdrive/c/tmp/e2fsprogs-1.41.12'
    make: ***  Error 2

    I think the header file should be ext2fs.h which is in ./lib/ext2fs, hence the references to ext2fs in my env variables. This doesn't make any difference and I'm not sure what else to try.

    Any suggestions as to what I might have missed out would be much appreciated.

    Cheers
    Chris

     
  • Chris Brown
    Chris Brown
    2010-05-28

    Problem resolved by building the libs tarball

     
  • mutex
    mutex
    2011-06-22

    Hi,

    I am getting the same error , please help.

    Thanks