1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

FreeBSD, Unable to build e2fsprogs, undefined reference to `posix_memalign'

Discussion in 'Linux and Unix' started by CodeCavalier, Jan 24, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. CodeCavalier

    CodeCavalier Thread Starter

    Joined:
    Jan 19, 2011
    Messages:
    3
    I'm trying to install a Linux-partitioned HDD on my FreeBSD 6.2 server so that I can get important files off of it. (The system it was running on died, but the HDD is still good.) The new drive is showing up in /dev; it has 4 slices.
    Code:
    # file -s /dev/ad8*
    /dev/ad8:   x86 boot sector, extended partition table
    /dev/ad8s1: Linux rev 1.0 ext3 filesystem data (needs journal recovery)
    /dev/ad8s2: Linux/i386 swap file (new style) 1 (4K pages) size 26079 pages
    /dev/ad8s3: Linux rev 1.0 ext3 filesystem data (needs journal recovery) (large files)
    /dev/ad8s4: Linux rev 1.0 ext3 filesystem data (needs journal recovery) (large files)
    
    # mount -t ext2fs /dev/ad8s4 /media
    mount_ext2fs: /dev/ad8s4: Invalid argument
    I'm pretty sure I can make this work if I can just get tune2fs or e2fsck installed (according to the these forums).
    http://forums.techguy.org/linux-unix/327729-solved-mount-ext2fs-linux-freebsd.html
    http://linux-bsd-sharing.blogspot.com/#9025564837868807042
    http://forums.freebsd.org/showthread.php?t=1615

    My problem is, when I go to /usr/ports/sysutils/e2fsprogs and try make install, it bombs out with the following:
    Code:
    ../lib/libext2fs.a(inode.o)(.text+0x2d3): In function `ext2fs_open_inode_scan':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(openfs.o)(.text+0x1eb): In function `ext2fs_open2':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(rw_bitmaps.o)(.text+0x6e): In function `write_bitmaps':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(rw_bitmaps.o)(.text+0xe3): In function `write_bitmaps':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(rw_bitmaps.o)(.text+0x42d): In function `read_bitmaps':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(unix_io.o)(.text+0x430): more undefined references to `posix_memalign' follow
    gmake[2]: *** [e2fsck] Error 1
    gmake[2]: Leaving directory `/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.41.14/e2fsck'
    gmake[1]: *** [all-progs-recursive] Error 1
    gmake[1]: Leaving directory `/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.41.14'
    gmake: *** [all] Error 2
    *** Error code 1
    
    Stop in /usr/ports/sysutils/e2fsprogs.
    *** Error code 1
    
    Stop in /usr/ports/sysutils/e2fsprogs.
    I have also tried pkg_add, but I get this:
    Code:
    pkg_add -r e2fsprogs
    Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/e2fsprogs.tbz: File unavailable (e.g., file not found, no access)
    pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/e2fsprogs.tbz' by URL
    I'm kind of a newbie when it comes to troubleshooting FreeBSD ports, at least, I don't know where to go from here. Any help?
     
  2. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Hi CodeCavalier,

    You can obtain e2fsprogs-1.27 which has been ported to FreeBSD e2fsprogs-1.27.

    Try that version.

    -- Tom
     
  3. CodeCavalier

    CodeCavalier Thread Starter

    Joined:
    Jan 19, 2011
    Messages:
    3
    OK, I don't really know how to install that. I've never installed individual port updates. I only know how to update the entire ports library using: cvsup -L 2 -h cvsup3.FreeBSD.org /usr/share/examples/cvsup/ports-supfile

    To try an educated guess, I downloaded the tarball link on that page, and unpacked it into my /usr/ports/sysutils/e2fsprogs folder. Then I ran make install clean again, but I still got the same result:
    Code:
    ...     CC rehash.c
            CC profile.c
            CC prof_err.c
            SUBST e2fsck.8
            SUBST e2fsck.conf.5
            GEN32TABLE crc32table.h
            CC crc32.c
            LD e2fsck
    ../lib/libext2fs.a(inode.o)(.text+0x2d3): In function `ext2fs_open_inode_scan':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(openfs.o)(.text+0x1eb): In function `ext2fs_open2':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(rw_bitmaps.o)(.text+0x6e): In function `write_bitmaps':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(rw_bitmaps.o)(.text+0xe3): In function `write_bitmaps':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(rw_bitmaps.o)(.text+0x42d): In function `read_bitmaps':
    : undefined reference to `posix_memalign'
    ../lib/libext2fs.a(unix_io.o)(.text+0x430): more undefined references to `posix_memalign' follow
    gmake[2]: *** [e2fsck] Error 1
    gmake[2]: Leaving directory `/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.41.14/e2fsck'
    gmake[1]: *** [all-progs-recursive] Error 1
    gmake[1]: Leaving directory `/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.41.14'
    gmake: *** [all] Error 2
    *** Error code 1
    
    Stop in /usr/ports/sysutils/e2fsprogs.
    *** Error code 1
    
    Stop in /usr/ports/sysutils/e2fsprogs.
    Am I doing this right? Is there something else I should be trying?
     
  4. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Installing E2fsprogs-1.27.


    e2fsprogs-1.27 (Note: visit this link to get links to Requires list components below)
    A set of utilities and library to manipulate an ext2 filesystem
    Long description | Sources | Main Web Site
    Maintained by: [email protected]
    Requires: expat-1.95.6_1, gettext-0.11.5_1, gmake-3.80, libiconv-1.9.1_1

    Offhand, I would say that you are missing the header files (and perhaps posix libraries) that define the missing definitions.

    -- Tom
     
  5. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    posix_memalign is defined in stdlib.h which implies there may be a missing header file include in the source code or a missing Makefile include directory path to where stdlib.h is located.

    See: Linux / Unix Command: posix_memalign.

    -- Tom
     
  6. CodeCavalier

    CodeCavalier Thread Starter

    Joined:
    Jan 19, 2011
    Messages:
    3
    Sorry to be such a noob, but all that about makefiles and headers is just over my head.

    I gave up on my FreeBSD box and moved my HDD to a Debian Linux box. After poking around some more forums, I found the answers I needed. Turns out this HDD had been set up using RAID. I had to install the 'mdadm' utility onto my Debian box. Then I basically performed the following commands:

    # file -s /dev/sdb* (To see what's on the partitions)
    # mkdir /media/sdb4
    # modprobe md
    # mknod /dev/md4 b 9 4
    # mdadm --assemble /dev/md4 /dev/sdb4
    # mount /dev/md4 /media/sdb4

    That was it! Basically, those commands go through the process of setting up the RAID device, then mounting it. Now I can access the partition off the old HDD. Thanks for all your help.
     
  7. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Hi CodeCavalier,

    Glad to see you solved your problem. Btw, here is a link to the e2fsprogs home webpage at sourceforge where there is a users-mailing-list available so you can ask the experts how to solve any problems with it in the future. You'll have to access one of the doc links to find info about the mailing-lists - they are full of useful information! Let me know if you can't find it, and I'll get you a better link - as I have many.

    -- Tom
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/976633

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice