upgrade make on MacOS Catalina - macos

I'm trying to upgrade make (current version 3.81) on Mac Catalina version 10.15.4.
I found this post that uses brew to do it: Updating Make Version 4.1 on Mac
brew install make --with-default-names
however, the option --with-default-names is not supported any more in the brew.
Is there a good example of how to do it?
Thanks!!

OK, this seems it worked for me:
brew install homebrew/core/make
then for using make instead of gmake added to .bash_profile:
PATH="/usr/local/opt/make/libexec/gnubin:${PATH}"

Related

OS X can't update PHP by homebrew

I want to install PHP7.2
I ran the command below:
$ brew install php#7.2
Error: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
My PC can't update anymore.
What should I do?

Unable to build and install Valgrind on macOS High Sierra

I cannot install Valgrind on macOS High Sierra. It's not available through brew. I've tried with 3.10. After make install, I get this message:
configure: error: Valgrind works on Darwin 10.x, 11.x, 12.x, 13.x and 14.x (Mac OS X 10.6/7/8/9/10)
Homebrew 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 had the problem like this.
So, I found the solving. You should install valgrind by this code
brew install --HEAD valgrind
I have created a port of valgrind 3.13.0 to work on macOS High Sierra (10.13.x). You can get it here: https://github.com/padiakalpesh/valgrind_3.13_high_sierra
Once you have obtained the source, run the following commands from inside the source directory:
./configure
make
sudo make install
brew install Valgrind has some compatibility problem when installing on latest macOS but there is a workaround with this problem. You must be getting this error message when you try to install it using brew.
$brew install valgrind
valgrind: This formula either does not compile or function as expected on macOS
versions newer than High Sierra due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build.
-------------------------------------------------------------------SOLUTION--------------------------------------------------------------
Step1: $brew edit valgrind
Step2: Find this line in the file ->(url "https://sourceware.org/git/valgrind.git")
Step3: Replace it with -> (url "git://sourceware.org/git/valgrind.git")
Step4: $brew update
Step5: $brew install --HEAD valgrind
And Done!
Let me know if it still doesn't work.
Thanks!!
I have got this working in July 2018, for reference:
https://gist.github.com/AlessandroMinali/d8316d6cc650c97027433644c2ff31ee
Edit ./configure
- 5468: applellvm-5.1|applellvm-6.*|applellvm-7.*|applellvm-8.*)
+ 5468: applellvm-5.1|applellvm-6.*|applellvm-7.*|applellvm-8.*|applellvm-9.*)
- 5879: 16.*)
+ 5879: 17.*)
Run
./autogen.sh
./configure
make
make install
Create file ~/.valgrind.supp
# false positive for any executable (it seems)
# macOS 10.12.6
# valgrind 3.13.0
{
libtrace initialization false positive
Memcheck:Param
msg->desc.port.name
fun:mach_msg_trap
fun:mach_msg
fun:task_set_special_port
fun:_os_trace_create_debug_control_port
fun:_libtrace_init
}
Create file ~/.valgrindrc
--suppressions=$HOME/.valgrind.supp
Troubleshooting
if can not read suppresion file copy and paste the contents of $HOME
if it complains about clang versions, bump the first edit up
if it complains about Darwin version, bump the second edit up
using the brew install --HEAD valgrind also worked for me, but be sure to know that it will take awhile to pull the HEAD version, and build/install.
However, no other changes were needed.
I build the git head version of Valgrind on macOS fairly regularly. If you have xcode installed then there isn't much more to it than following the instructions here.
I'll update with my build script later.
As an alternative, you might want to consider clang sanitizers. This can be enabled in xcode, or with the -fsanitize=X option (where X is address, undefined, thread, memory and a few others).
Valgrind is a rather touchy piece of software, and requires updates for each major release of macOS.
As of February 2018, there is no released version of Valgrind which supports macOS High Sierra (10.13). You will need to use a development version of Valgrind, or use alternate tools. (Apple's Instruments may have some of the functionality you are looking for.)
MacPorts version started working for me in Sep 2018!
The command, for completeness sake (completes very fast - apparently, prebuilt):
sudo port install valgrind-devel
Version:
$ valgrind --version
valgrind-3.14.0.GIT
The following worked for me using the latest Valgrind release 3.14.0 (9th October 2018) on macOS 10.13.6.
VERSION="3.14.0"
wget -O - http://www.valgrind.org/downloads/valgrind-"$VERSION".tar.bz2 | tar xjf -
cd valgrind-"$VERSION"
# use --prefix=/path/to if you want it installed somewhere in particular
./configure
make
# may need sudo
make install
# test all is working
valgrind ls -l
These instructions are taken from the README inside the Valgrind release tar ball.

Install Zathura on macOS 10.10.2

I am trying to install Zathura on a Mac OS X 10.10.2. I have downloaded Zathura 0.3.2 and tried to run make but it requires girara. Girara requires gtk 3.2 but brew install gtk+3 only installs 3.14.
Does anyone know a set of procedures to install Zathura?
Since this question and answer is about 6 years old, here's a current method for Big Sur as of writing (expanding on my edit of this answer on Ask Different).
I originally tried to compile it using the suggested method in the documentation which is this MacPorts port. Although it compiles, it gives the error Gtk-WARNING **: cannot open display when running. There are fixes for other ports of programs with the same error but instead, I found a Homebrew tap which installs it without issues.
To install:
brew tap zegervdv/zathura
brew install zathura
brew install zathura-pdf-mupdf
mkdir -p $(brew --prefix zathura)/lib/zathura
ln -s $(brew --prefix zathura-pdf-mupdf)/libpdf-mupdf.dylib $(brew --prefix zathura)/lib/zathura/libpdf-mupdf.dylib
There is work to integrate the program better into macOS but it's still in development - see here.
I solved the problem by adding the adding the following to my $PKG_CONFIG_PATH:
export $PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10
I could then make and make install without any problems.

mac os x 10.9 lua update to latest 5.2.2

On my Mac OS X 10.9 Mavericks I have lua already installed:
MacBook-Pro-Dmitri:~ dmitri$ lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
I want to upgrade it to latest 5.2.2 version..
Unfortunately brew throws an error when I'm trying to do this:
MacBook-Pro-Dmitri:~ dmitri$ brew install lua
Warning: lua-5.1.5 already installed
or:
MacBook-Pro-Dmitri:~ dmitri$ brew upgrade lua
Error: lua-5.1.5 already installed
Does this mean that I need to update only with building it myself?
Did somebody solve this issue on his/her machine?
Thanks!
5.2.2 is the latest, do yourself a favour and forget brew
wget http://www.lua.org/ftp/lua-5.2.2.tar.gz
tar -zxvf lua-5.2.2.tar.gz
cd lua-5.2.2
make macosx
sudo make install
That certainly sounds like brew does not have lua 5.2.2 available under the lua name.
That being said about two minutes worth of searching on google and reading around (to be fair I had to read the lua.rb formula but it was in a comment nearly at the very top of the file) found that there is a lua5.2 version in Homebrew-Versions.
So what I've done is:
I checked that brew already installed lua 5.1.5 and highlight is requiring it..
I installed lua 5.2.1 as:
brew install lua52
and linked it like:
brew link lua52
brew doctor is saying everythings ok and terminal runs lua version 5.2.1:
MacBook-Pro-Dmitri:bin dmitri$ lua
Lua 5.2.1 Copyright (C) 1994-2012 Lua.org, PUC-Rio
I'm not sure that my solving was correct, so put your comments please!

How to install libuuid on Mac OS X?

I'm trying to compile gearman-0.28 on Mac, but encountered the following error:
configure: error: Unable to find libuuid
I don't know how to install libuuid on Mac, my Mac is 10.7.2 version.
Any one can help me? Thanks in advance.
With Homebrew:
brew install ossp-uuid
For those who are trying to install the uuid extension from PECL, the ossp-uuid and the util-linux's uuid package shipped with Mac OSX will not work as they are out dated. You will need an updated version of uuid from util-linux. It is available on Homebrew.
brew install util-linux
But util-linux is a keg-only package and will not be symlinked to /usr/local. Hence you will have to specify the following path when prompted for uuid installation directory
/usr/local/opt/util-linux
For unattended installations, you can use
printf "/usr/local/opt/util-linux" | pecl install uuid
Install mac port like
sudo port install ossp-uuid
$configure --with-lib
As time goes by, it seems worthwhile to mention that libuuid has become part of macOS in the meantime.
If you want an up to date alternative to the brew or mac ports solutions, the following from here works great. You can also add the code to your .zshrc or .bash_profile
$ alias uuid="python -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex)' | pbcopy && pbpaste && echo"
$ uuid
34469137412242129cd908e384717794

Resources