LouisBrunner / valgrind-macos

A valgrind mirror with latest macOS support
GNU General Public License v2.0
1.15k stars 59 forks source link

Library not loaded: /usr/lib/libSystem.B.dylib on Big Sur (macOS 11.0) #21

Closed Nimon77 closed 4 years ago

Nimon77 commented 4 years ago

When I want to start valgrind I got this message :

❯ valgrind ./a.out
==92575== Memcheck, a memory error detector
==92575== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==92575== Using Valgrind-3.17.0.GIT and LibVEX; rerun with -h for copyright info
==92575== Command: ./a.out
==92575==
--92575-- run: /usr/bin/dsymutil "./a.out"
dyld: Library not loaded: /usr/lib/libSystem.B.dylib
  Referenced from: /Users/nsimon/Documents/42-projects/minishell_parser/./a.out
  Reason: image not found
[1]    92575 killed     valgrind ./a.out

and if I checked libSystem is not present :

❯ ls -la /usr/lib/lib*
-rwxr-xr-x  1 root  wheel   137824  1 jan  2020 /usr/lib/libLeaksAtExit.dylib
-rwxr-xr-x  1 root  wheel  2850896  1 jan  2020 /usr/lib/libMTLCapture.dylib
-rwxr-xr-x  1 root  wheel   104112  1 jan  2020 /usr/lib/libffi-trampolines.dylib
-rwxr-xr-x  1 root  wheel   177616  1 jan  2020 /usr/lib/libgmalloc.dylib
lrwxr-xr-x  1 root  wheel       27  1 jan  2020 /usr/lib/libhunspell-1.2.0.dylib -> libhunspell-1.2.0.0.0.dylib
lrwxr-xr-x  1 root  wheel       27  1 jan  2020 /usr/lib/libhunspell-1.2.dylib -> libhunspell-1.2.0.0.0.dylib
lrwxr-xr-x  1 root  wheel       21  1 jan  2020 /usr/lib/libiodbc.2.dylib -> libiodbc.2.1.18.dylib
lrwxr-xr-x  1 root  wheel       21  1 jan  2020 /usr/lib/libiodbc.dylib -> libiodbc.2.1.18.dylib
lrwxr-xr-x  1 root  wheel       25  1 jan  2020 /usr/lib/libiodbcinst.2.dylib -> libiodbcinst.2.1.18.dylib
lrwxr-xr-x  1 root  wheel       25  1 jan  2020 /usr/lib/libiodbcinst.dylib -> libiodbcinst.2.1.18.dylib
-rwxr-xr-x  1 root  wheel   268144  1 jan  2020 /usr/lib/libobjc-trampolines.dylib
lrwxr-xr-x  1 root  wheel       18  1 jan  2020 /usr/lib/libpython.dylib -> libpython2.7.dylib
lrwxr-xr-x  1 root  wheel       68  1 jan  2020 /usr/lib/libpython2.7.dylib -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/Python
lrwxr-xr-x  1 root  wheel       21  1 jan  2020 /usr/lib/libstdc++.6.dylib -> libstdc++.6.0.9.dylib
lrwxr-xr-x  1 root  wheel       17  1 jan  2020 /usr/lib/libstdc++.dylib -> libstdc++.6.dylib
LouisBrunner commented 4 years ago

Hi @Nimon77,

Big Sur is currently unsupported. (see #19)

DiegoMagdaleno commented 3 years ago

This is gonna be a big issue, this is due to a change Apple made where the system doenst have copies of the libraries anymore but rather a DYLD cache.

LouisBrunner commented 3 years ago

This isn't the first time Apple has changed the way of doing dylib loading, it might still be possible to get it working, I'll definitely try when I have access to a Big Sur computer.

xiaoyang2000 commented 2 years ago

Finally,how do you solve this problem?