Menu

#311 1.42.2 - OSX configure fatal error: 'asm/types.h' not found

open
nobody
None
5
2014-08-24
2012-05-14
No

During the configure phase of e2fsprogs-1.42.2 and head @ 2788cc879bbe667d28277e1d660b7e56514e5b30 on OSX Lion using clang-3.1 or llvm-gcc-4.2.1, we get a fatal error, but configure continues, and the compile succeeds (make check does not). I believe that this error propagates itself into other programs, specifically ext2fuse, which won't compile. I'm reporting this for Homebrew, a package installer for Macs, and I'm curious if this is something we can patch. In the issue that I'm linking below, 12207, you can see the error building ext2fuse where it complains that e2fsprogs has an undefined blk64_t.

The issue was raised here: https://github.com/mxcl/homebrew/issues/12207

Attempting to build e2fsprogs today using HEAD, these are my results:
The configure terminal output is here: https://gist.github.com/2695620
The config.log is here: https://gist.github.com/2695636
The make check output is here: https://gist.github.com/2695685

It's likely I have something incorrectly setup to as I am new to this software, but I felt that the asm/types.h issue was worth raising. Ok thanks for taking a look at this.

Discussion

  • Theodore Ts'o

    Theodore Ts'o - 2012-05-14

    Workaround asm_types.h file

     
  • Theodore Ts'o

    Theodore Ts'o - 2012-05-14

    Yeah, asm/types.h is something which is provided by the standard gcc header files, but it's apparently not present if you are using the Clang compiler.

    I'm about to cut a release, and this change is a bit too risky for my to try to integrate into the configure system just now, but try dropping in the following asm_types.h file into the top of the build directory after running configure.

     
  • Theodore Ts'o

    Theodore Ts'o - 2012-05-14

    Hmm, I've looked more closely at this, and an empty asm_types.h (which is what should happen on Mac OS if there's no /usr/incloude/asm/types.h) should actually work. I've tried a sample compile with with an empty asm_types.h and it worked on an x86_64 Linux system. A subsequent "make check" also works.

    What tests are failing when you run "make check"? And if it's one of the integration tests in the tests subdirectory, can you send me the test_name.failed file?

    Thanks!!

     
  • 2bits sfbugs

    2bits sfbugs - 2012-05-15

    <asm/types.h>

    It appears that the current XCode-4.3.2 for OSX Lion doesn't supply asm/types.h for either of the two compilers, llvm-gcc or clang. So I get the same errors using either compiler. Though you have success with an empty asm_types.h in the top level directory, we do not. That empty file is created after configure automatically, and it is with that empty file that ext2fuse does not compile against e2fsprogs. It could be ok for your progam, but I can't comment on that because I'm not qualified.

    Your asm_types.h patch has a typo, 'unint16_t', which you might want to update in case someone else comes along to grab it. After adjusting that and compiling e2fsprogs with it, I still get a compile error with ext2fuse. Apparently one of the two programs is missing a

    typedef __u64 blk64_t;

    but I don't know enough C++ to figure this out, I'm sorry.
    Here is the ext2fs.h file from ext2fuse: https://gist.github.com/2699168
    so that you can see it has no typedef for blk64_t between lines 75-80, and you can see in your own source in the file 'include/ext2fs/bitops.h:129' where it starts to define all the 64bit items.

    make check

    From the link I pasted into the bug report, https://gist.github.com/2695685 you can see that 'making check in tests' has usage problems with `mktemp`. It then complains about ambiguous redirects, sed, and rm, repeated about 75 times:

    ./run_e2fsck: line 43: $TMPFILE: ambiguous redirect
    sed: first RE may not be empty
    sed: first RE may not be empty
    usage: rm [-f | -i] [-dPRrvW] file ...
    unlink file
    failed

    I have made a gist of a few of the .failed files so that you can help if my setup is wrong:
    https://gist.github.com/2699229

    And the last problem with 'make check' is that OSX doesn't supply md5sum, but Homebrew can. So I've taken care of that by adding that dep to our formula, and it fixed a few things. Ok thanks for you time.