#5 Version 1.3.3 does not compile on OS X

closed-fixed
crash (3)
5
2006-02-12
2006-02-04
Jesse Kornblum
No

While attempting to compile version 1.3.3 on Mac OS X
version 10.4 (Tiger) with gcc version 3.3 20030304
(Apple Computer, Inc. build 1495), I get the following
error:

gcc -g -O2 -o dcfldd dcfldd.o md5.o sha1.o sha2.o
human.o long-options.o safe-read.o xstrtol.o
version-etc.o argmatch.o xstrtoul.o full-write.o
xstrtoumax.o copy.o hash.o verify.o translate.o
sizeprobe.o pattern.o util.o log.o output.o split.o
hashformat.o
ld: Undefined symbols:
_error
make[1]: *** [dcfldd] Error 1
make: *** [all] Error 2

Discussion

  • Jesse Kornblum
    Jesse Kornblum
    2006-02-09

    Logged In: YES
    user_id=448978

    Upgrading the compiler doesn't help. The same bug occurs
    with gcc version 4.0

     
  • david gunnells
    david gunnells
    2006-02-10

    Logged In: YES
    user_id=284996

    I also get an error when I try to compile this in cygwin
    running on Windows XP SP2 using gcc (GCC) 3.4.4 (cygming
    special) (gdc 0.12, using dmd 0.125).

    The error is:

    gcc -g -O2 -o dcfldd.exe dcfldd.o md5.o sha1.o sha2.o
    human.o long-options.o safe-read.o xstrtol
    .o version-etc.o argmatch.o xstrtoul.o full-write.o
    xstrtoumax.o copy.o hash.o verify.o translate.o
    sizeprobe.o pattern.o util.o log.o output.o split.o hashformat.o
    util.o: In function `skip':
    /usr/src/dcfldd-1.3.3/util.c:187: undefined reference to
    `_error'
    /usr/src/dcfldd-1.3.3/util.c:195: undefined reference to
    `_error'
    collect2: ld returned 1 exit status
    make: *** [dcfldd.exe] Error 1

    any ideas?

     
  • Jesse Kornblum
    Jesse Kornblum
    2006-02-11

    Logged In: YES
    user_id=448978

    I have found what *appears* to be a fix for this problem on
    OS X version 10.3 with gcc version 3.3.

    The error seems to stem from the lack of the error()
    function in the object files. I went back to the Coreutils
    package that dcfldd is based on and copied the error.c and
    error.h files from the lib directory into the dcfldd source
    tree. I then added error.{OBJEXT} to the Makefile's
    am_dcfldd_OBJECTS variable.

    I then tried to compile again and it appears to succeed.
    This is probably a fix but we will need to add error.c to
    the source tree and run autoconf again. Since autoconf is
    the source of all evil, I'll leave that to Nick. [grin]

     
  • Jesse Kornblum
    Jesse Kornblum
    2006-02-11

    • assigned_to: nobody --> jessekornblum
     
    • status: open --> closed
     
  • Jesse Kornblum
    Jesse Kornblum
    2006-02-12

    Logged In: YES
    user_id=448978

    Will be resolved by changing calls from generic GNU error
    function to custom dclfdd error functions. Fixed in version
    1.3.4.

     
  • Jesse Kornblum
    Jesse Kornblum
    2006-02-12

    • status: closed --> closed-fixed