Search code examples
makefileundefined-symbol

Undefined symbol ___ctzdi2


I am trying to install a debugger called Valgrind on OSX 10.11.2.

While running make, I get the following error

Undefined symbols for architecture i386:
  "___ctzdi2", referenced from:
      _doRegisterAllocation in libvex-x86-darwin.a(libvex_x86_darwin_a-host_generic_reg_alloc2.o)
ld: symbol(s) not found for architecture i386
make[3]: *** [memcheck-x86-darwin] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Do you know how to fix this?


Solution

  • This may or may not work for you, as I am operating in the following environment:

    I received the same error as OP, until I used the following extra configure argument:

    ./configure --enable-only64bit