Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi so I've been trying to Valgrind on mountain lion. I followed the instructions on valgrind's webpage: http://valgrind.org/docs/manual/dist.install.html

As well as the instructions on this blog: http://prateekvjoshi.com/2013/02/27/how-to-install-valgrind-on-mac-os-x/

But in either case I get the same errors when I attempt to 'make' or 'make install':

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

Does anyone know what these errors could mean? I couldn't find any help on it, even on valgrind's FAQ. Any help would be great.


Also, there were a few more lines of error that came right before the ones I mentioned above in case it's helpful:

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]
share|improve this question

migrated from stackoverflow.com Aug 11 '13 at 18:12

This question came from our site for professional and enthusiast programmers.

up vote 6 down vote accepted

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)

share|improve this answer
    
thanks this worked! – kamatama Aug 12 '13 at 0:00
    
Thanks! Here's how to automate that: for file in coregrind/m_syscall.c coregrind/m_syswrap/syswrap-darwin.c coregrind/vg_preloaded.c; do awk 'NR == 1 { print "#define private_extern extern"; } { print }' $file > $file.new; mv $file.new $file; done – anonymous Feb 9 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .