Install Erlang with asdf on Mac M1 monterrey fails - erlang

I tried to install Erlang 25.0.3 with asdf on a Monterrey mac M1, with the following command:
KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl#1.1)" asdf install erlang latest
It fails with the following error message:
Build failed.
=== Leaving application mnesia
=== Entering application crypto
make[3]: Nothing to be done for `opt'.
MAKE opt
make[4]: aarch64-apple-darwin21.2.0/Makefile: No such file or directory
make[4]: *** No rule to make target `aarch64-apple-darwin21.2.0/Makefile'. Stop.
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2
Is there a specific configuration to adapt to mac M1 ?

I finally got it working. I booted my M1 with a time machine backup from a macbook pro intel and you need to reinstall homebrew. I followed these instructions on Github and it worked:
https://github.com/asdf-vm/asdf-erlang/issues/207#issuecomment-883216342
I had to run directly
KERL_CONFIGURE_OPTIONS="--with-ssl=`brew --prefix openssl` --without-javac --disable-debug" asdf install erlang 25.0.3
instead of putting it in the .zshrc

Related

Failed OpenCV install unable to uninstall

While installing opencv_contrib (during make -j5 step), my laptop went to sleep and gave errors on the install, failing with a fatal error.
Retrying make -j5 gave the same error again. trying to uninstall opencv completely using make uninstall also completely fails with a fatal error.
How do I do a fresh install of OpenCV from here?
Error on running make uninstall:
-- Uninstalling "/usr/local/include/opencv2/cvconfig.h"
CMake Error at cmake_uninstall.cmake:20 (MESSAGE):
Problem when removing "/usr/local/include/opencv2/cvconfig.h"
CMakeFiles/uninstall.dir/build.make:57: recipe for target
'CMakeFiles/uninstall' failed
make[3]: *** [CMakeFiles/uninstall] Error 1
CMakeFiles/Makefile2:296: recipe for target
'CMakeFiles/uninstall.dir/all' failed
make[2]: *** [CMakeFiles/uninstall.dir/all] Error 2
CMakeFiles/Makefile2:303: recipe for target
'CMakeFiles/uninstall.dir/rule' failed
make[1]: *** [CMakeFiles/uninstall.dir/rule] Error 2
Makefile:234: recipe for target 'uninstall' failed
make: *** [uninstall] Error 2
You should try make clean and try to uninstall again. Also you should restart from previous steps for opencv installing
You can't directly delete files from usr/local/...etc so you try giving sudo make uninstall it will work fine!

"unable to find utility g++" while trying to compile a MobileSubstrate tweak with Theos (OSX)

OSX Yosemite 10.10.2
I recently installed Theos following this guide, got no problems. However when I try to compile a simple MS tweak, I get this error in Terminal.app:
MBP:noeditnc ned$ cd /Users/ned/noeditnc
MBP:noeditnc ned$ make
Making all for tweak NoEditNC...
Preprocessing Tweak.xm...
Compiling Tweak.xm (armv7)...
xcrun: error: unable to find utility "clang++", not a developer tool or in PATH
make[3]: *** [.theos/obj/armv7/Tweak.xm.5e67a2f0.o] Error 72
make[2]: *** [.theos/obj/armv7/NoEditNC.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [NoEditNC.all.tweak.variables] Error 2
I have Command Line Tools and Xcode both installed and updated to the latest version. Google couldn't help... What am I doing wrong?
EDIT: Clang++ is installed.
MBP:noeditnc ned$ clang++ --version
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
EDIT 2: Found a solution! I had the wrong sdk version number in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ (iPhoneOS8.1 instead of iPhoneOS8.2)

OpenCV installation issue on mac mavericks

So yesterday CleanMyMac destroyed some system files of mavericks, I repaired (reinstalled) mavericks and after that I got an error from Xcode that "assert.h" cannot be found. So I figured I install command line tools with "xcode-select --install" which I have no idea if it has solved my issue or not, and then I noticed all opencv libraries can not be found too.
I uninstalled OpenCV with "brew unisntall opencv"
I have been trying to reinstall it ever since but I had No luck.
Running "brew install opencv" tells me :
==> make
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/algorithm.cpp.o] Error 1
1 error generated.
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/array.cpp.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
Unfortunately I don't know what to do with this error,
I used cmake -j8 and I got:
[ 6%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/transupp.c.o
Linking C static library ../lib/liblibjpeg.a
[ 6%] Built target libjpeg
make: *** [all] Error 2
I tried what was my last hope, "sudo port install opencv" and I get :
Computing dependencies for opencvError: Unable to execute port: can't read "configure.cxx_stdlib": no such variable
I tried selfupdate for macports but it doesnt work either.
so now Im stuck does anybody have any idea? it would be much appreciated.
ps I have assigned my user as the owner of /usr/local just in case: "sudo chown -R $User /usr/local"
I finally fixed it,
my Xcode was 5.1 and I was trying to avoid the upgrade, but as I ran out of options, I updated to Xcode 6 and after that "brew update" found few updates and then "brew install opencv" worked like it should have done in the first place.

Linphone IOS Build Issue

I am trying to compile linphone-iphone module on Mac Mountain Lion. Xcode version 4.5.
I followed the steps given in the following link http://shallwelearn.com/blog/?p=6.
I successfully crossed upto step4.
In Step5, I executed the command
“make -f builder-iphone-simulator.mk all && make -f builder-iphone-os.mk all
&&make -f builder-iphone-os.mk delivery-sdk”
I got the following Error:
checking whether res_ndestroy is declared… yes
checking for antlr3… no
configure: error: Could not find antlr.jar. Please install antlr3
make[1]: *** [/Hub/SIP_Implementation/IOS/workspace/linphone-iphone/submodules/build/../build-i386-apple-darwin/belle-sip/Makefile] Error 1
make: *** [build] Error 2
So I downloaded the antlr.jar(version-3.5) and added classpath. But Still I am getting the same error.
Can anybody help me to fix this?
Finally I fixed the issue by executing “sudo port install antlr3″ command.
After executing this command, I execute the "make all". It is building without error

Compiling Fsharp with Mono Amazon EC2

When I try to compile F# in a standard way :
./autogen.sh --prefix=/opt/mono && make && make install
it fails with:
ilwrite: TIME 35.286 (total) 0.000 (delta) - Build String/Blob Address Tables
make[3]: *** [.libs/proto//4.0/FSharp.Compiler-proto.dll] Killed
make[3]: *** Deleting file .libs/proto//4.0/FSharp.Compiler-proto.dll
make[3]: Leaving directory /src/fsharp/src/fsharp/FSharp.Compiler-proto
make[2]: *** [do-proto] Error 2
make[2]: Leaving directory /src/fsharp/src/fsharp
make[1]: *** [all] Error 2
make[1]: Leaving directory /src/fsharp/src/fsharp
make: *** [all] Error 2
I have mono 3.11 from git master installed on my EC2 instance.
Thank you!
I've successfully compiled F# with m1.small instance and switched back to t1.micro in order to to do this you should:
1 upgrade your currently running instance with larger RAM
1.1 login to aws console
1.1.0 navigate to EC2 service
1.1.1 choose instances
1.1.1 check instance you want fsharp to be compiled on
1.1.2 click actions
1.1.3 stop instance
1.2 change instance type ( m1.small instance with 1.7 GB is enough )
1.3 boot your pumped instance (do not forget to reassign elastic IP when instance booted)
2 compile and install F# with $ ./autogen.sh --prefix=<YOUR_PREFIX> && make && as sudo make install

Resources