Installing valgrind on Mac OS X Catalina [duplicate] - macos

I tried to install Valgrind with the command "brew install valgrind" and I get a message that says:
"valgrind: This formula either does not compile or function as expected on macOS versions newer than Sierra due to an upstream incompatibility. Error: An unsatisfied requirement failed this build."
I also tried to "brew edit valgrind" and replace "sourceware.org/git/valgrind.git" with "git://sourceware.org/git/valgrind.git" in head section of the code, then wrote on Iterm "brew install --HEAD valgrind" but it gives me:
Last 15 lines from /Users/m/Library/Logs/Homebrew/valgrind/02.configure:
checking for gcc-ar... no
checking for perl... /usr/bin/perl
checking for gdb... /no/gdb/was/found/at/configure/time
checking dependency style of clang... none
checking for diff -u... yes
checking for clang option to accept ISO C99... none needed
checking for a supported version of gcc... ok (clang-11.0.0)
checking build system type... x86_64-pc-darwin
checking host system type... x86_64-pc-darwin
checking for a supported CPU... ok (x86_64)
checking for a 64-bit only build... yes
checking for a 32-bit only build... no
checking for a supported OS... ok (darwin)
checking for the kernel version... unsupported (19.0.0)
configure: error: Valgrind works on Darwin 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x and 17.x (Mac OS X 10.6/7/8/9/10/11 and macOS 10.12/13)
READ THIS: https://docs.brew.sh/Troubleshooting

See https://github.com/LouisBrunner/valgrind-macos/.
Either try
brew tap LouisBrunner/valgrind
brew install --HEAD LouisBrunner/valgrind/valgrind
Or compile it from the source, if the above method doesn't work. (But they should have fixed the above method just recently.)
git clone https://github.com/LouisBrunner/valgrind-macos.git
cd valgrind-macos
./autogen.sh
./configure --prefix=/where/you/want/it/installed --enable-only64bit
make
sudo make install
Enjoy!

https://github.com/sowson/valgrind
brew install --HEAD https://raw.githubusercontent.com/sowson/valgrind/master/valgrind.rb
MacOS Catalina (10.15.4), I was able to confirm the operation.

Related

PyEnv BUILD FAILED installing Python on MacOS Ventura 13.2.1

I'm working on a project from https://github.com/luigifreda/pyslam which uses only python 3.6.9, so I tried to install it:
pyenv install 3.6.9
and encountered a build failed:
python-build: use openssl#1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.6.9.tar.xz...
-> https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz
Installing Python-3.6.9...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 13.2.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/01/bx2q2rbn099ch5d1gr1zm5fc0000gn/T/python-build.20230216230654.91605
Results logged to /var/folders/01/bx2q2rbn099ch5d1gr1zm5fc0000gn/T/python-build.20230216230654.91605.log
Last 10 log lines:
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking for --with-cxx-main=<compiler>... no
checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a bug report
make: *** No targets specified and no makefile found. Stop.
MacOS Venture 13.2.1
Pyenv: 2.3.13
Home brew 4.0.1
Available python versions: 3.6.8
I have tried uninstalling and reinstalling and followed the installation from https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv, but it's still not working. Any suggestions?

C compiler can't create executables

I'm trying to install the elastic beanstalk cli, like so:
./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
But I'm getting the following error:
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
python-build: use readline from homebrew
BUILD FAILED (OS X 11.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557
Results logged to /var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557.log
Last 10 log lines:
checking for python3.7... python3.7
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
checking whether the C compiler works... no
configure: error: in `/var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557/Python-3.7.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
Exiting due to failure
For some reason, the installation script isn't detecting the C compiler. Of course, both the gcc and the cc commands work in the terminal. I'm using macOS 11.1. How do I fix this?
You need to run the commands using Roseta, and arch command can be used to run commands via Rosetta:
arch -x86_64 ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer

Configure error installing Ruby 1.9.3 on Mac OS 10.10 with rvm and Homebrew

Note for those thinking of marking this duplicate: yes, my XCode tools are installed and up to date.
I started this morning with a system having neither rvm or Homebrew, and was able to install rvm and Ruby 1.9.3 successfully after overriding the default Homebrew installation directory, changing it from /usr/local to /opt/brew.
This afternoon, though, after seeing various warnings about possible weird behavior for some Homebrew recipes if installed anywhere other than /usr/local, I decided to blow all that away and reinstall with Homebrew in the default location.
Now, what worked this morning doesn't work: I get the error below (from configure.log):
[2015-02-04 15:39:24] ./configure
current path: /Users/dmoles/.rvm/src/ruby-1.9.3-p551
PATH=/usr/local/opt/gcc48/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/dmoles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/ImageMagick/bin:/opt/bin:/opt/apache-ant-1.9/bin:/opt/apache-maven-3/bin:/opt/apache-tomcat-8.0.15/bin:/Users/dmoles/.rvm/bin:/usr/local/bin
command(7): ./configure --prefix=/Users/dmoles/.rvm/rubies/ruby-1.9.3-p551 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... x86_64-apple-darwin14.1.0
checking host system type... x86_64-apple-darwin14.1.0
checking target system type... x86_64-apple-darwin14.1.0
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/Users/dmoles/.rvm/src/ruby-1.9.3-p551':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
My guess is that this morning it was using the XCode toolchain, and this afternoon it's using Homebrew's, which for some reason isn't working. But it's not clear to me just how that would happen, since I can see above that rvm is playing various games with $PATH. (My usual $PATH: /Users/dmoles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/ImageMagick/bin:/opt/bin:/opt/apache-ant-1.9/bin:/opt/apache-maven-3/bin:/opt/apache-tomcat-8.0.15/bin:/Users/dmoles/.rvm/bin -- without all the /usr/local/opt at the beginning or the extra /usr/local/bin at the end.)
My rvm version is 1.26.10; gcc-48 is Homebrew gcc48 4.8.4.

Mac OS X Lion Xcode problems using RVM

I had Xcode 4.1 preview 5 working fine but decided to upgrade to the final xcode 4.1 thru the App store. I uninstalled Xcode first...
sudo /Developer/Library/uninstall-devtools –mode=all
Then installed Xcode thru the app store and rebooted.
I also removed RVM completely but... now whenever I try and install a version of Ruby it fails. In the error file i get this:
[2011-07-27 18:29:25] ./configure --prefix="/Users/holden/.rvm/usr"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/holden/.rvm/src/yaml-0.1.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
There is no gcc-4.2 or any other gcc in the /usr/bin directory.
What's up with Xcode?
Apparently even after downloading and "installing" XCode from the Appstore and despite the long process after downloading where it appears to install it and the words "Installed" eventually become displayed next to it in the store. You must still manually install it again within your applications folder before it will work.
Odd.
Just bought a Mac,
what I had to do to make it work after installing Xcode and seeing that /usr/bin doesn't have gcc, was:
Enter Xcode preferences going over to the downloads tab and install Command Line Tools.
After setting up my developer account and downloading the tools I opened terminal and typed
rvm install 1.9.3 --with-gcc=clang
and everything compiled and works.
Note - after running "Install Xcode" I still only have "gcc" in /usr/bin, not gcc-4.2. But still worked fine, /usr/bin/gcc was a symlink to /usr/bin/llvm-gcc-4.2
Guy's answer above seems to fix the problem compiling Ruby in RVM with XCode 4.2 installed completely, and removed for me to install GCC from https://github.com/kennethreitz/osx-gcc-installer . This is preferable for users needing to have both RVM and XCode 4.2 installed.

Error when updating my Ruby version using RVM on Mac OS X 10.6.6

I tried to update Ruby in my Mac OS X 10.6.6 system. Now I have 1.8.7, and I want to update to 1.9.2.
When I typed rvm install 1.9.2 I got:
gal-harths-iMac:~ galharth$ rvm install 1.9.2
/Users/galharth/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...
ruby-1.9.2-p136 - #fetching
ruby-1.9.2-p136 - #extracted to /Users/galharth/.rvm/src/ruby-1.9.2-p136 (already extracted)
ruby-1.9.2-p136 - #configuring
Error running ' ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared ', please read /Users/galharth/.rvm/log/ruby-1.9.2-p136/configure.log
There has been an error while running configure. Halting the installation.
I installed XCode and it still doesn't work.
This is the configure.log file:
[2011-02-08 17:10:04] ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/galharth/.rvm/src/ruby-1.9.2-p136':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[2011-02-08 17:23:19] ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/galharth/.rvm/src/ruby-1.9.2-p136':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[2011-02-08 20:44:14] ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/galharth/.rvm/src/ruby-1.9.2-p136':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[2011-02-08 21:02:55] ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/galharth/.rvm/src/ruby-1.9.2-p136':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
There are some oddities in your log file output. Your question shows you have Mac OS 10.6.6, but the log shows the OS is i386. Mac OS 10.6.6 should be x86_64. This means for some reason your system thinks it's 32-bit when it should be 64bit. Your version of XCode needs to be current, so if you didn't just download it and install it, then do so. The version of XCode on the Snow Leopard disk was buggy, and the version for Mac OS prior to Snow Leopard is out of date once you install 10.6 on your machine.
Here's some things to try. If one works you're done, otherwise try the next one.
Do rvm -v and note the version number, then rvm get head followed by rvm reload if the version number displayed after updating has changed. Try running rvm install 1.9.2-p136.
Delete the files in your ~/.rvm/src/ruby-1.9.2-p136 directory using rm ~/.rvm/src/ruby-1.9.2-p136, then try installing using the install command in #1.
Manually download a copy of Ruby 1.9.2-p136 into your ~/.rvm/archives directory and extract it into your ~/.rvm/src/ruby-1.9.2-p136 directory. You can cd ~/.rvm/archives, delete any existing old version of the archive, then use curl -O ftp://ftp.ruby-lang.org:21//pub/ruby/1.9/ruby-1.9.2-p136.tar.gz or wget ftp://ftp.ruby-lang.org:21//pub/ruby/1.9/ruby-1.9.2-p136.tar.gz to pull in a new version. Then cd ~/.rvm/src then the rm command from #2 above followed by tar zxvf ../archives/ruby-1.9.2-p136.tar.gz to extract the files, then try running the RVM install command in #1.
I have a machine that's behind a proxy that won't allow RVM to get to the Ruby repositories, causing the archive to actually be the proxy's failure notice. When RVM tried burst the tar file, it would fail, but not catch the problem, then would try to configure and fail. The fix was to manually download the archive and burst it into the src directory.
Using the command rvm install 1.9.3 --with-gcc=clang worked for me.
When this happened to me, I inserted the Snow Leopard disk, selected Optional Installs and installed the Xcode package. That solved the missing C compiler problem as described here. Thanks to this blog: http://www.brianp.net/2009/09/05/snow-leopards-ate-my-c-compiler/
In my case, once I solved the compiler problem I got a permissions error. Running as root in bash gave rvm the appropriate permissions.
If you are running Lion check to make sure you have the Command Line Tools installed. They separated them from XCode so they are a separate download now. You can find them here:
https://developer.apple.com/downloads/index.action

Resources