undefined reference to `ext2fs_swab32'

  • Anonymous

    Anonymous - 2012-05-29

    I am trying to build and install E2fsprogs-1.42.3 as a part of the linux from scratch OS that I am compiling. I configured the package with this line just as the book told me to

    PKG_CONFIG=/tools/bin/true LDFLAGS="-lblkid -luuid" \
    ../configure --prefix=/usr --with-root-prefix="" \
    --enable-elf-shlibs --disable-libblkid --disable-libuuid \
    --disable-uuidd --disable-fsck

    Then I used make to compile all the files and all is still well, but when I run "make check" I get his error

    make[1]: Entering directory `/sources/e2fsprogs-1.42.3/build/lib/ext2fs'
        CC ../../../lib/ext2fs/tst_bitops.c
        LD tst_bitops
        CC ../../../lib/ext2fs/tst_badblocks.c
        LD tst_badblocks
        CC ../../../lib/ext2fs/tst_iscan.c
        LD tst_iscan
        CC ../../../lib/ext2fs/tst_types.c
        LD tst_types
        LD tst_icount
        CC ../../../lib/ext2fs/tst_super_size.c
        LD tst_super_size
        CC ../../../lib/ext2fs/tst_inode_size.c
        LD tst_inode_size
        LD tst_csum
    /tmp/cc8WmlGN.o: In function `crc32c_be_body':
    crc32c.c:(.text+0x227): undefined reference to `ext2fs_swab32'
    crc32c.c:(.text+0x42e): undefined reference to `ext2fs_swab32'
    collect2: ld returned 1 exit status
    make[1]: *** [tst_crc32c] Error 1
    make[1]: Leaving directory `/sources/e2fsprogs-1.42.3/build/lib/ext2fs'
    make: *** [check-recursive] Error 1

    I really don't have any idea how to fix this error. Any help would be appreciated

  • Theodore Ts'o

    Theodore Ts'o - 2012-05-30

    You didn't mention what architecture, OS, and C compiler you are using….

    That function should have been an inline function defined in bitops.h, and there should have been a linkable version of that function in inline.o.  It works for me on an x86 system.  You must be using a big endian system from what I can tell, but I don't know anything else about your system.   All I can tell you it's working normally for most people….


Log in to post a comment.