Compiling Apple Bonjour’s mDNSResponder

Here is information from internet,

Due to the nature of GCC4.0+ in linking shared library, the current version of mDNSResponder (107.6) cannot be compiled. Error message is:

hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
 /usr/bin/ld: final link failed: Nonrepresentable section on output
 collect2: ld returned 1 exit status

Instead of modifying the makefile, the best solution is to compile it with GCC version < 4.

sudo ln -sf /usr/bin/gcc-x.x /usr/bin/gcc

Then compile as usual:

tar xzf
cd mDNSResponder-58.8/mDNSPosix
make os=linux
make install os=linux

Replace x.x with the gcc version number.

Another Solution:

Edit mDNSResponder-107.6/mDNSPosix/Makefile, and find line 271:

LD = ld -shared

and change it to:

LD = gcc -shared

reference here: http://www.offthehill.org/articles/2007/01/23/mdnsresponder-and-gcc-4-1-compiling-issues/

2 Responses to “Compiling Apple Bonjour’s mDNSResponder”

  1. pufpaf Says:

    I want to quote your post in my blog. It can?
    And you et an account on Twitter?

  2. uvan Says:

    Sure you can……nice day

Leave a Reply

*

free blog themes