Ошибки установки Valgrind на OSX 10.8

2394
kamatama

Привет, так что я пытался Вальгринд на горного льва. Я следовал инструкциям на веб-странице valgrind: http://valgrind.org/docs/manual/dist.install.html

А также инструкции в этом блоге: http://prateekvjoshi.com/2013/02/27/how-to-install-valgrind-on-mac-os-x/

Но в любом случае я получаю те же ошибки, когда пытаюсь «сделать» или «сделать установку»:

make[3]: *** [libcoregrind_amd64_darwin_a-m_syscall.o] Error 1 make[2]: *** [install] Error 2 make[1]: *** [install-recursive] Error 1 make: *** [install] Error 2 

Кто-нибудь знает, что могут означать эти ошибки? Я не смог найти никакой помощи, даже в FAQ Вальгринда. Любая помощь будет отличной.


Кроме того, перед тем, как я упомянул выше, появилось еще несколько строк ошибок:

m_syscall.c:525:1: error: unknown type name '__private_extern__' m_syscall.c:526:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'do_syscall_unix_WRK' m_syscall.c:549:1: error: unknown type name '__private_extern__' m_syscall.c:550:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'do_syscall_mach_WRK' m_syscall.c: In function 'vgPlain_do_syscall': m_syscall.c:703:10: warning: implicit declaration of function 'do_syscall_unix_WRK' [-Wimplicit-function-declaration] m_syscall.c:708:10: warning: implicit declaration of function 'do_syscall_mach_WRK' [-Wimplicit-function-declaration] 
3

1 ответ на вопрос

8
ckhan

From: http://jeetworks.org/node/151: This error:

m_syscall.c:525:1: error: unknown type name '__private_extern__' m_syscall.c:526:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'do_syscall_unix_WRK' m_syscall.c:549:1: error: unknown type name '__private_extern__' m_syscall.c:550:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'do_syscall_mach_WRK' m_syscall.c: In function 'vgPlain_do_syscall': m_syscall.c:703:10: warning: implicit declaration of function 'do_syscall_unix_WRK' [-Wimplicit-function-declaration] m_syscall.c:708:10: warning: implicit declaration of function 'do_syscall_mach_WRK' [-Wimplicit-function-declaration] make[3]: *** [libcoregrind_amd64_darwin_a-m_syscall.o] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 

This can be fixed by adding the line:

#define __private_extern__ extern 

to the following files:

  • coregrind/m_syscall.c
  • coregrind/m_syswrap/syswrap-darwin.c
  • coregrind/vg_preloaded.c

(Found this by Googling for : unknown type name '__private_extern__' valgrind)

Спасибо! Вот как это можно автоматизировать: для файла в coregrind / m_syscall.c coregrind / m_syswrap / syswrap-darwin.c coregrind / vg_preloaded.c; do awk 'NR == 1 '$ file> $ file.new; mv $ file.new $ file; сделанный anonymous 8 лет назад 0