Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 10.15 (Catalina) support #1

Closed
rib3ye opened this issue Sep 29, 2019 · 23 comments
Closed

macOS 10.15 (Catalina) support #1

rib3ye opened this issue Sep 29, 2019 · 23 comments

Comments

@rib3ye
Copy link

rib3ye commented Sep 29, 2019

Humble request for macOS 10.15 support ahead of the official release:

➜  Downloads brew install --HEAD https://raw.githubusercontent.com/sowson/valgrind/master/valgrind.rb
######################################################################## 100.0%
Warning: You are using macOS 10.15.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.

==> Cloning https://github.com/sowson/valgrind.git
Cloning into '/Users/noahtsutsui/Library/Caches/Homebrew/valgrind--git'...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
==> ./autogen.sh
Error: An exception occurred within a child process:
  Utils::InreplaceError: inreplace failed
coregrind/Makefile.in:
  expected replacement of /(\s)(?=\/usr\/include\/mach\/)/ with "\\1/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"
@AivanF
Copy link

AivanF commented Oct 24, 2019

@sowson I hope you are going to solve this 😅 10.15 is an official release already...
Also, I have almost no experience with so large build systems, but maybe I can be helpful to you?

@elizatlawy
Copy link

Please solve this issue, it is very important.

@sowson
Copy link
Owner

sowson commented Nov 10, 2019

Well, I do not have Catalina and because of disabled 32-bit apps I do not plan to upgrade... ever :D... however I added few things that may help you on that issue... please retry and let me know :D.

@elizatlawy
Copy link

It works for me, thank you very much!

@rib3ye
Copy link
Author

rib3ye commented Nov 10, 2019

It works!

@rib3ye rib3ye closed this as completed Nov 10, 2019
@jenfredwell
Copy link

Just tried this on MacOs 10.15.1 with brew install --HEAD https://raw.githubusercontent.com/sowson/valgrind/master/valgrind.rb

make[2]: *** No rule to make target /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach/mach_vm.defs', needed by m_mach/mach_vmUser.c'. Stop.

Full output:
`brew install --HEAD https://raw.githubusercontent.com/sowson/valgrind/master/valgrind.rb

Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 20cf2afed to 7b77dc4d0.
No changes to formulae.

######################################################################## 100.0%
==> Cloning https://github.com/sowson/valgrind.git
Updating /Users/jennifer/Library/Caches/Homebrew/valgrind--git
From https://github.com/sowson/valgrind

  • 8f6e97c...7ad3109 master -> origin/master (forced update)
    ==> Checking out branch master
    Already on 'master'
    Your branch and 'origin/master' have diverged,
    and have 7 and 16332 different commits each, respectively.
    (use "git pull" to merge the remote branch into yours)
    HEAD is now at 7ad3109 sync with original
    ==> ./autogen.sh
    ==> ./configure --prefix=/usr/local/Cellar/valgrind/HEAD-7ad3109 --enable-only64bit --build=amd64-darwin
    ==> make
    Last 15 lines from /Users/jennifer/Library/Logs/Homebrew/valgrind/03.make:
    clang -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../include -I../VEX/pub -I../VEX/pub -DVGA_amd64=1 -DVGO_darwin=1 -DVGP_amd64_darwin=1 -DVGPV_amd64_darwin_vanilla=1 -Ipriv -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -mmacosx-version-min=10.6 -Wbad-function-cast -fstrict-aliasing -c -o priv/libvex_amd64_darwin_a-host_mips_defs.o test -f 'priv/host_mips_defs.c' || echo './'priv/host_mips_defs.c
    clang -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../include -I../VEX/pub -I../VEX/pub -DVGA_amd64=1 -DVGO_darwin=1 -DVGP_amd64_darwin=1 -DVGPV_amd64_darwin_vanilla=1 -Ipriv -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -mmacosx-version-min=10.6 -Wbad-function-cast -fstrict-aliasing -c -o priv/libvex_amd64_darwin_a-host_nanomips_defs.o test -f 'priv/host_nanomips_defs.c' || echo './'priv/host_nanomips_defs.c
    clang -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../include -I../VEX/pub -I../VEX/pub -DVGA_amd64=1 -DVGO_darwin=1 -DVGP_amd64_darwin=1 -DVGPV_amd64_darwin_vanilla=1 -Ipriv -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -mmacosx-version-min=10.6 -Wbad-function-cast -fstrict-aliasing -c -o priv/libvex_amd64_darwin_a-host_mips_isel.o test -f 'priv/host_mips_isel.c' || echo './'priv/host_mips_isel.c
    clang -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../include -I../VEX/pub -I../VEX/pub -DVGA_amd64=1 -DVGO_darwin=1 -DVGP_amd64_darwin=1 -DVGPV_amd64_darwin_vanilla=1 -Ipriv -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -mmacosx-version-min=10.6 -Wbad-function-cast -fstrict-aliasing -c -o priv/libvex_amd64_darwin_a-host_nanomips_isel.o test -f 'priv/host_nanomips_isel.c' || echo './'priv/host_nanomips_isel.c
    clang -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../include -I../VEX/pub -I../VEX/pub -DVGA_amd64=1 -DVGO_darwin=1 -DVGP_amd64_darwin=1 -DVGPV_amd64_darwin_vanilla=1 -Ipriv -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign -Wno-tautological-compare -mmacosx-version-min=10.6 -Wbad-function-cast -fstrict-aliasing -c -o priv/libvexmultiarch_amd64_darwin_a-multiarch_main_main.o test -f 'priv/multiarch_main_main.c' || echo './'priv/multiarch_main_main.c
    rm -f libvexmultiarch-amd64-darwin.a
    /usr/bin/ar cru libvexmultiarch-amd64-darwin.a priv/libvexmultiarch_amd64_darwin_a-multiarch_main_main.o
    ranlib libvexmultiarch-amd64-darwin.a
    rm -f libvex-amd64-darwin.a
    /usr/bin/ar cru libvex-amd64-darwin.a priv/libvex_amd64_darwin_a-main_globals.o priv/libvex_amd64_darwin_a-main_main.o priv/libvex_amd64_darwin_a-main_util.o priv/libvex_amd64_darwin_a-ir_defs.o priv/libvex_amd64_darwin_a-ir_inject.o priv/libvex_amd64_darwin_a-ir_match.o priv/libvex_amd64_darwin_a-ir_opt.o priv/libvex_amd64_darwin_a-guest_generic_bb_to_IR.o priv/libvex_amd64_darwin_a-guest_generic_x87.o priv/libvex_amd64_darwin_a-guest_x86_helpers.o priv/libvex_amd64_darwin_a-guest_x86_toIR.o priv/libvex_amd64_darwin_a-guest_amd64_helpers.o priv/libvex_amd64_darwin_a-guest_amd64_toIR.o priv/libvex_amd64_darwin_a-guest_ppc_helpers.o priv/libvex_amd64_darwin_a-guest_ppc_toIR.o priv/libvex_amd64_darwin_a-guest_arm_helpers.o priv/libvex_amd64_darwin_a-guest_arm_toIR.o priv/libvex_amd64_darwin_a-guest_arm64_helpers.o priv/libvex_amd64_darwin_a-guest_arm64_toIR.o priv/libvex_amd64_darwin_a-guest_s390_helpers.o priv/libvex_amd64_darwin_a-guest_s390_toIR.o priv/libvex_amd64_darwin_a-guest_mips_helpers.o priv/libvex_amd64_darwin_a-guest_mipsdsp_toIR.o priv/libvex_amd64_darwin_a-guest_mips_toIR.o priv/libvex_amd64_darwin_a-guest_nanomips_helpers.o priv/libvex_amd64_darwin_a-guest_nanomips_toIR.o priv/libvex_amd64_darwin_a-host_generic_regs.o priv/libvex_amd64_darwin_a-host_generic_simd64.o priv/libvex_amd64_darwin_a-host_generic_simd128.o priv/libvex_amd64_darwin_a-host_generic_simd256.o priv/libvex_amd64_darwin_a-host_generic_maddf.o priv/libvex_amd64_darwin_a-host_generic_reg_alloc2.o priv/libvex_amd64_darwin_a-host_generic_reg_alloc3.o priv/libvex_amd64_darwin_a-host_x86_defs.o priv/libvex_amd64_darwin_a-host_x86_isel.o priv/libvex_amd64_darwin_a-host_amd64_defs.o priv/libvex_amd64_darwin_a-host_amd64_isel.o priv/libvex_amd64_darwin_a-host_ppc_defs.o priv/libvex_amd64_darwin_a-host_ppc_isel.o priv/libvex_amd64_darwin_a-host_arm_defs.o priv/libvex_amd64_darwin_a-host_arm_isel.o priv/libvex_amd64_darwin_a-host_arm64_defs.o priv/libvex_amd64_darwin_a-host_arm64_isel.o priv/libvex_amd64_darwin_a-host_s390_defs.o priv/libvex_amd64_darwin_a-host_s390_isel.o priv/libvex_amd64_darwin_a-s390_disasm.o priv/libvex_amd64_darwin_a-host_mips_defs.o priv/libvex_amd64_darwin_a-host_nanomips_defs.o priv/libvex_amd64_darwin_a-host_mips_isel.o priv/libvex_amd64_darwin_a-host_nanomips_isel.o
    ranlib libvex-amd64-darwin.a
    Making all in coregrind
    make[2]: *** No rule to make target /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/mach/mach_vm.defs', needed by m_mach/mach_vmUser.c'. Stop.
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!`

Anyone else get this?

@sowson
Copy link
Owner

sowson commented Nov 12, 2019

do you have the latest Xcode installed? thanks!

@biocyberman
Copy link

@sowson The mismatch between macOS version and valgrind supported version is a big deal breaker. I've been running docker as a workaround. But docker is bloated on macOS. So thanks for your work on this.
I am still using Mojave, and got the same error as reported above: #1 (comment)
Should the configure step try to determine macOS version and update the coregrind/Makefile.am accordingly?

@biocyberman
Copy link

@bryanvlierop
Copy link

bryanvlierop commented Nov 12, 2019

When I try to run valgrind on my project:
CleanShot 2019-11-12 at 12 17 23@2x

When I try to run valgrind on an hello world app:
CleanShot 2019-11-12 at 12 15 22@2x

The hello world app seems to work, but I get some strange errors. My own project can't build usign valgrind.

@elizatlawy
Copy link

When I try to run valgrind on my project:
CleanShot 2019-11-12 at 12 17 23@2x

When I try to run valgrind on an hello world app:
CleanShot 2019-11-12 at 12 15 22@2x

The hello world app seems to work, but I get some strange errors. My own project can't build usign valgrind.

I got the same issue.

@jenfredwell
Copy link

do you have the latest Xcode installed? thanks!

@sowson I have only runxcode-select --install. I'm guessing that's not enough?

@kirilltitov1
Copy link

When I try to run valgrind on my project:
CleanShot 2019-11-12 at 12 17 23@2x

When I try to run valgrind on an hello world app:
CleanShot 2019-11-12 at 12 15 22@2x

The hello world app seems to work, but I get some strange errors. My own project can't build usign valgrind.

me too

ssrlive referenced this issue in ssrlive/valgrind Jan 5, 2020
C++ function names can contain substrings like "{lambda()#1}".  But
callgrind_annotate and cg_annotate interpret the '#'-character as a
comment marker anywhere on each input line, and thus truncate such names
there.

On the other hand, the documentation in docs/cl-format.xml, states:

  Everywhere, comments on own lines starting with '#' are allowed.

This seems to imply that a comment line must start with '#' in the first
column.  Thus skip exactly such lines in the input file and don't handle
'#' as a comment marker anywhere else.

Signed-off-by: Philippe Waroquiers <philippe.waroquiers@skynet.be>
@gnagyml
Copy link

gnagyml commented Jan 16, 2020

I got Valgrind installed on Mac OS with:
brew install --HEAD https://raw.githubusercontent.com/sowson/valgrind/master/valgrind.rb
My app runs fine from the command line and in lldb, but Valgrind crashes in the dynamic linker:

==65345== Process terminating with default action of signal 11 (SIGSEGV)
==65345==  Access not within mapped region at address 0x8
==65345==    at 0x10006A3EE: cerror_nocancel (in /usr/lib/dyld)
==65345==    by 0x10006A893: kdebug_is_enabled (in /usr/lib/dyld)
==65345==    by 0x10002787D: dyld3::kdebug_trace_dyld_marker(unsigned int, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg) (in /usr/lib/dyld)
==65345==    by 0x1000170C7: dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) (in /usr/lib/dyld)
==65345==    by 0x100017024: _dyld_start (in /usr/lib/dyld)

This happens even with a simple, self-contained "hello world" app.

@evandrix
Copy link

bump

@jlouazel
Copy link

jlouazel commented Apr 3, 2020

@sowson Any news on this topic? Is there anything I can help with?
Would like to do my part here 😄

@sowson
Copy link
Owner

sowson commented Apr 3, 2020 via email

@jlouazel
Copy link

jlouazel commented Apr 4, 2020

If you can I can add you as a contributor, I do not care about Valgrind anymore, even on High Sierra macOS it does not work. If you know how you may make it working, sorry I am not such smart hacker… :-/.

@sowson Yes, please! I'll do my best here.

@sowson
Copy link
Owner

sowson commented Apr 5, 2020 via email

@find1dream
Copy link

find1dream commented Apr 22, 2020

Works amazingly!! see LouisBrunner/valgrind-macos#5.

Not Homebrew, you need to compile it from source, but it's not so difficult.

1. git clone https://github.com/LouisBrunner/valgrind-macos.git
2. cd valgrind
3. sudo ./autogen.sh
4. sudo ./configure --prefix=/where/you/want/it/installed --enable-only64bit
5. copy the content of https://github.com/apple/darwin-xnu/blob/master/libsyscall/mach/mig_strncpy.c  to ./coregrind/m_mach/mach_basics.c
6. sudo make 
7. sudo make install

enjoy!

@sowson
Copy link
Owner

sowson commented Apr 22, 2020 via email

@jose-joaquim
Copy link

Hello everyone. I tried find1dream answer in my macOS 10.15.4, but I failed in the make command with undefined symbols... Any ideas? Thanks in advance. Here's the output:

Undefined symbols for architecture x86_64: "_NDR_record", referenced from: __kernelrpc_mach_vm_allocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_deallocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_protect in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_inherit in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_read in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_read_list in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_write in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) ... "_mach_msg_destroy", referenced from: __kernelrpc_mach_vm_allocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_deallocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_protect in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_inherit in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_read in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_read_list in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_write in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) ... "_mach_task_self_", referenced from: _parse_procselfmaps in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-aspacemgr-linux.o) _vgSysWrap_darwin_host_request_notification_before in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-syswrap-darwin.o) _vgSysWrap_darwin_mach_port_insert_right_before in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-syswrap-darwin.o) _vgSysWrap_darwin_vm_remap_before in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-syswrap-darwin.o) _vgSysWrap_darwin_bsdthread_create_before in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-syswrap-darwin.o) _vgSysWrap_darwin_bsdthread_create_after in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-syswrap-darwin.o) _vgSysWrap_darwin_mach_msg_task_before in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-syswrap-darwin.o) ... (maybe you meant: _vgSysWrap_darwin_mach_task_self_before, _vgSysWrap_darwin_mach_task_self_after ) "_mach_thread_self", referenced from: _vgPlain_gettid in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-m_libcproc.o) _wqthread_hijack in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-syswrap-amd64-darwin.o) (maybe you meant: _vgSysWrap_darwin_mach_thread_self_after, _vgSysWrap_darwin_mach_thread_self_before ) "_mig_dealloc_reply_port", referenced from: __kernelrpc_mach_vm_allocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_deallocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_protect in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_inherit in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_read in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_read_list in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_write in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) ... "_mig_get_reply_port", referenced from: __kernelrpc_mach_vm_allocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_deallocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_protect in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_inherit in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_read in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_read_list in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_write in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) ... "_mig_put_reply_port", referenced from: __kernelrpc_mach_vm_allocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_deallocate in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_protect in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_inherit in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) __kernelrpc_mach_vm_read in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_read_list in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) _mach_vm_write in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-mach_vmUser.o) ... "_vgPlain_mach_init", referenced from: _valgrind_main in libcoregrind-amd64-darwin.a(libnolto_coregrind_amd64_darwin_a-m_main.o) _sched_fork_cleanup in libcoregrind-amd64-darwin.a(libcoregrind_amd64_darwin_a-scheduler.o) ld: symbol(s) not found for architecture x86_64 make[3]: *** [memcheck-amd64-darwin] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2

Works amazingly!! see LouisBrunner/valgrind-macos#5.

Not Homebrew, you need to compile it from source, but it's not so difficult.

1. git clone https://github.com/LouisBrunner/valgrind-macos.git
2. cd valgrind
3. sudo ./autogen.sh
4. sudo ./configure --prefix=/where/you/want/it/installed --enable-only64bit
5. copy the content of https://github.com/apple/darwin-xnu/blob/master/libsyscall/mach/mig_strncpy.c  to ./coregrind/m_mach/mach_basics.c
6. sudo make 
7. sudo make install

enjoy!

@yudizhangzyd
Copy link

When I try to run valgrind on my project:
CleanShot 2019-11-12 at 12 17 23@2x

When I try to run valgrind on an hello world app:
CleanShot 2019-11-12 at 12 15 22@2x

The hello world app seems to work, but I get some strange errors. My own project can't build usign valgrind.

Hey, just wondering did you fix this? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests