Install R lgmnet package for Mac M1 chip fails - gfortran

I'm trying to install R package lgmnet but failed.
the warning message
'
make: /opt/R/arm64/bin/gfortran: No such file or directory
make: *** [coxnet5dpclean.o] Error 1
ERROR: compilation failed for package ‘glmnet’
removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/glmnet’
'
I installed gfortran as instructed in https://github.com/fxcoudert/gfortran-for-macOS/releases, but when I try to run the complier it returns error message:
'(base) MacBook-Pro:~ cheng$ gfortran
gfortran: fatal error: no input files
compilation terminated.'
I'm no pro in R or bash, could someone please help or point me to the right posts?

Related

Error while compiling HAProxy from source

I got this error while trying to compile the HAProxy 2.2 with LUA version 5.3. I'm on trying to do it on CentOS7(arm64).
[root#08d17a479616 haproxy-2.2.22]# make TARGET=linux-glibc USE_PCRE=1 USE_PCRE_JIT=1 USE_OPENSSL=1 USE_ZLIB=1 USE_LINUX_TPROXY=1 USE_REGPARM=1 USE_LUA=1 USE_THREAD=1 USE_TFO=1
CC src/version.o
LD haproxy
/usr/bin/ld: cannot find -latomic
collect2: error: ld returned 1 exit status
More logs;
attempt to open //usr/aarch64-redhat-linux/lib64/libatomic.so failed
attempt to open //usr/aarch64-redhat-linux/lib64/libatomic.a failed
attempt to open //usr/lib64/libatomic.so failed
attempt to open //usr/lib64/libatomic.a failed
attempt to open //usr/local/lib64/libatomic.so failed
attempt to open //usr/local/lib64/libatomic.a failed
attempt to open //lib64/libatomic.so failed
attempt to open //lib64/libatomic.a failed
attempt to open //usr/aarch64-redhat-linux/lib/libatomic.so failed
attempt to open //usr/aarch64-redhat-linux/lib/libatomic.a failed
attempt to open //usr/local/lib/libatomic.so failed
attempt to open //usr/local/lib/libatomic.a failed
attempt to open //lib/libatomic.so failed
attempt to open //lib/libatomic.a failed
attempt to open //usr/lib/libatomic.so failed
attempt to open //usr/lib/libatomic.a failed
ld: cannot find -latomic
[root#08d17a479616 haproxy-2.2.22]#
What I've tried until now is to create a symlink to the libatomic.so with this
ln -s /usr/lib64/libatomic.so.1.2.0 /usr/lib/libatomic.so
And installed the missing GNU library from here with the steps outline in the article.
Install CentOS SCLo RH repository:yum install centos-release-scl-rh
Install devtoolset-7-libatomic-devel rpm package:
# yum install devtoolset-7-libatomic-devel
What should I do to resolve it ?
Fixed by installing this package and it goes through to a new error, which I've outlitned in this question.
New question: New questions
To apply the fix for CentOS7 arm, use this link and the instructions on how to install the package.
Package Link
Install systemd-devel rpm package: yum install systemd-devel

Install Erlang with asdf on Mac M1 monterrey fails

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

How to fix error with CMake while installing LuaDist on Windows 10

I've been trying to install Luadist, but an error with CMake always happens and in the end it doesn't install because of it.
This seems to be a common issue on Windows 10. I've followed the instructions from https://github.com/LuaDist/Repository/wiki/LuaDist%3A-Installation and https://github.com/LuaDist/Repository/wiki/Installation-of-System-Dependencies#microsoft-windows . I've tried uninstalling it and installing it again, but it didn't work. I tried installing Lua on the same drive as LuaDist, but it still doesn't work. I think the error might be because I also have LuaRocks installed, I don't know if they are compatible together.
[ 37%] Performing configure step for 'luafilesystem'
loading initial cache file C:/Users/User/_bootstrap/_bootstrap/tmp/config.cmake
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.15/Modules/CMakeMinGWFindMake.cmake:12 (message):
sh.exe was found in your PATH, here:
C:/Program Files/Git/usr/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.
If you want to use a UNIX shell, then use MSYS Makefiles.
Call Stack (most recent call first):
CMakeLists.txt:7 (project)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
CMakeFiles\luafilesystem.dir\build.make:106: recipe for target 'luafilesystem/src/luafilesystem-stamp/luafilesystem-configure' failed
mingw32-make.exe[3]: *** [luafilesystem/src/luafilesystem-stamp/luafilesystem-configure] Error 1
CMakeFiles\Makefile2:114: recipe for target 'CMakeFiles/luafilesystem.dir/all' failed
mingw32-make.exe[2]: *** [CMakeFiles/luafilesystem.dir/all] Error 2
CMakeFiles\Makefile2:175: recipe for target 'CMakeFiles/install.dir/rule' failed
mingw32-make.exe[1]: *** [CMakeFiles/install.dir/rule] Error 2
Makefile:156: recipe for target 'install' failed
mingw32-make.exe: *** [install] Error 2
## Bootstrap done, building LuaDist using LuaDist
'C:\Users\User\_bootstrap\_bootstrap\bin\luadist.exe' is not recognized as an internal or external command,
operable program or batch file.
## LuaDist is now built and can be found in C:\Users\User\_bootstrap\_install
At the end it says that LuaDist is built in C:\Users\User_bootstrap_intall , but that folder doens't exist after the installation.

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

Resources