mac os x 10.9 lua update to latest 5.2.2 - macos

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!

Related

upgrade make on MacOS Catalina

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}"

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.

Update cedet in emacs on Mac

I installed emacs using Home Brew but later I found the cedet bundled with emacs is out dated.
But when I followed the instructions in cedet official site, downloaded the tar file, un-tar it and run make in that dir, then I got 2 errors telling me ssomething is wrong with eieio... The version I want to install is cedet1.1...
How can I solve this?
Just update emacs to the newest version using homebrew, which should be 24.5.1. The cedet bundled with it is V2.0, which is the same as sf.

updating octave: linking the installation

I have OSX 10.10.5 with Octave 3.4.0 running (installed, who knows how, I did it a million different ways through port, file extraction, ftp, homebrew…). I tried to update my Programme (brew install octave or sudo port install octave) and Terminal spits out:
Warning: octave-3.8.2 already installed, it's just not linked
Okay, great. So I have a better programme somewhere installed. What now? How on earth am I supposed to “just link” the newer installation?
If you install octave with Homebrew and it doesn't link it it should tell you why. You can force Homebrew to link octave with
$ brew link --overwrite octave
You can also add the --dry-run option to check and see what Homebrew will do to link octave
$ brew link --overwrite --dry-run octave
A possible reason for Homebrew not linking octave is that you've installed it by another method, MacPorts for instance. It is not recommended that you use both Homebrew and MacPorts on the same system.

How can I install qpdf on Mac 10.8.3?

When running R CMD check on packages on a Mac build server, I'm getting a warning
‘qpdf’ is needed for checks on size reduction of PDFs
I can't seem to get qpdf installed and on the system. I tried installing via the fink package manager, but according to the package database (http://pdb.finkproject.org/pdb/package.php/qpdf), qpdf doesn't seem to have been built since osx 10.6, and I'm on 10.8.3.
Can anyone point me to qpdf mac install or build instructions? Or is there a way to disable the warning when checking R packages?
This is somewhat related to the question qpdf.exe for compactPDF?, although they were on a windows machine and I'm on a mac.
You can install qpdf with homebrew:
brew install qpdf
MacPorts can help you. Download MacPorts from http://www.macports.org/ and run sudo port install qpdf.

Resources