Error in installation of caffe on fedora 21 - installation

I have tried to build caffe for python on my fedora 21(without GPU) for quite some time with no success. Can someone please help me on this?
Few of the commands that I have executed are:
git clone git://github.com/xianyi/OpenBLAS
cd OpenBLAS
make FC=gfortran
make PREFIX=/opt/openblas/ install
make clean
make all
On running the 'make all' command I get the result as shown on the terminal screen.
But OpenBLAS seems to be present at location /opt/openblas and I found cblas.h file at /opt/openblas/include. Then why do I get such an error?
To try to fix this, I added the following lines to my ~/.bashrc file:
export LD_LIBRARY_PATH=$HOME/opt/openblas/lib\:$LD_LIBRARY_PATH
export INCLUDE=$HOME/opt/openblas/include\:$INCLUDE
I also executed the following on the terminal and got the output as below,
[root#parags-pc Parag]# echo $PATH
/opt/openblas/bin:/bin:/usr/local/bin
Note: I have also installed atlas. But nothing has come to my rescue.
What am I missing here?

Edit Make.config file to reflect the changes. You will find a flag to select the BLAS library, set its value as 'open'. Then uncomment the library path and include path and reflect the correct values for those variables.

Related

zsh: command not found: mockgen - golang 1.18 - macOS Monterrey

I'm new to go. Currently I'm using zsh terminal in macOS, just followed the instructions pointed out here https://github.com/golang/mock when installing go mock. However when trying to execute a mockgen command I keep seeing zsh: command not found: mockgen and when navigating in the terminal to my $GOPATH/bin i see mockgen inthere, so I don't know if there's anything else needed.
These are the variables I have configured in my /.zshrc file:
#GO path
export GOPATH="$HOME/Documents/study_projects/go"
export GOBINPATH="$GOPATH/bin"
Idk if GOBINPATH is a proper name for this $GOPATH/bin variable to be exported to the PATH also, aso pointed out in https://github.com/golang/mock (mockgen/gomock) installation instructions. Does anyone of you know what else is needed here, do I need an additional configuration for this mockgen command to work with zsh?
Thank you!
Make sure run below for go 1.16+
go install github.com/golang/mock/mockgen#v1.6.0
Add users/[your_login]/go/bin to .zshrc path
add export PATH=$PATH:$(go env GOPATH)/bin in .zshrc and try again.

gfortran: error: libgfortran.spec: No such file or directory

I am attempting to install and run gfortran-8 on macOS with the following makefile. I installed it from http://hpc.sourceforge.net/ (8.3 version). I keep getting this error:
gfortran: error: libgfortran.spec: No such file or directory
I know libhfortran.spec is located in /usr/local/Cellar/gcc#8/8.4.0/lib/gcc/8/libgfortran.spec. I have added it to my etc/paths and my .bash_profile. I have also uninstalled gfortran and reinstalled it. Anyone have a clue on what I might be missing? I am attaching my makefile below.
Makefile:
https://drive.google.com/open?id=1Y_Zo2dSYI32dQpwMtdUy5rWB8avDHXor
Bellhop Macintosh Installation
Note: I know gfortran is now part of gcc but newest at version still only works with older gfotran compilers. If you have Catalina as well, don’t worry this will still work on Mojave as well as on Catalina. I had tested it.
Go to this link.
Download
Install the downloaded gfortran-8.2-Mojave.dmg, this compiler is being used by the at to create binaries for your MacOS.
Go to the path where you extracted at folder. (In Mac you don’t need windows binary, you need to compile using gfotran compiler.)
Execute the following commands in the at folder.
Once you installed. Close all the terminals.
Open new terminal. Do as follows:
In your terminal, type this:
echo $PATH
Above command give you current path in your zsh file, If you have one.
Add bellhop to your zsh file. You can use these commands in terminal:
cd
nano .zsh
Please note that there is no Bellhop in the path right now, so we are going to add that by adding the following line in the .zsh file, Copy and paste below list (change the path accordingly)
export PATH=your_local_macOS_path/at:your_local_macOS_path/at/Bellhop:$PATH$
For me, it was:
export PATH=/Users/jaypatel/Downloads/at:/Users/jaypatel/Downloads/at/Bellhop:$PATH$
Refer the screenshot below for more details.
Once you’re done, press ctrl+X and it will ask you do you want to save your file, type Y and press enter and it will save the path successfully.
And now source ~/.zsh to your terminal using this command :
source ~/.zsh
echo $PATH
This means your acoustic toolbox and bellhop.exe are in path’s now.
And now source ~/.zsh to your terminal using this command : source ~/.zsh
And Voila, Your Bellhop is successfully installed.
Reference :
You can find more details here.

How to install Make on Windows?

I'm running this code from Github:
# Modify Makefile.config according to your Caffe installation.
cp Makefile.config.example Makefile.config
make -j8
# Make sure to include $CAFFE_ROOT/python to your PYTHONPATH.
make py
make test -j8
# (Optional)
make runtest -j8
And for the line:
make -j8
The output is:
bash: make: command not found
Which is I think it is because make is not a valid command. What packages should I install and how? I tried looking for it on the internet about the error that I was getting but no luck.
I thought it was CMake that I'm missing and actually installed it. I got this in my Program Files folder:
But it still gives out the same error.
i downloaded cmake but make is still not recognizable. So I downloaded make first then cmake afterwards then include it to my environmental variables. And I had to restart my laptop.

RStudio Server doesn't find libraries for Macports R when building

I'm building the latest github version of rstudio-server to run on OSX Yosemite, but can't get it to find the macports R libraries when installing.
I run into a "Minimum R version (2.11.1) not found." error when I run
cmake -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release ..
but when I pass -DRSTUDIOVERIFYR_VERSION=0 as well, I configure successfully and make it to about 44% before the build fails:
Rogers-iMac:build roger$ sudo make install
Password:
Scanning dependencies of target gwt_build
Buildfile: /Users/roger/projects/rstudio/src/gwt/build.xml
[...]
Scanning dependencies of target rstudio-r
[ 44%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/RErrorCategory.cpp.o
[ 44%] Building CXX object src/cpp/r/CMakeFiles/rstudio-r.dir/RExec.cpp.o
In file included from /Users/roger/projects/rstudio/src/cpp/r/RExec.cpp:17:
In file included from /Users/roger/projects/rstudio/src/cpp/r/include/r/RExec.hpp:30:
In file included from /Users/roger/projects/rstudio/src/cpp/r/include/r/RSexp.hpp:33:
/Users/roger/projects/rstudio/src/cpp/r/include/r/RInternal.hpp:43:10: fatal error: 'Rinternals.h' file not found
#include <Rinternals.h>
^
1 error generated.
I was able to find Rinternals.h in /opt/local/Library/Frameworks/R.framework/Versions/3.1/PrivateHeaders/Rinternals.h (EDIT: also in /opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/include/Rinternals.h), but how do I point the build configuration to this location?
EDIT: Additionally, I experienced another problem where the build failed at about 70% with the error
/opt/local/lib/libR.dylib/Resources/R: not a directory
make[2]: *** [src/cpp/r/R/packages/library/manipulate/DESCRIPTION] Error 126
Upon further investigation, /opt/local/lib/libR.dylib/Resources/R does not exist, because /opt/local/lib/libR.dylib is actually a file.
Not sure about the specifics of cmake but you can try
$ export CPATH=$CPATH:/opt/local/Library/Frameworks/R.framework/Versions/3.1/PrivateHeaders/
$ sudo make install
to tell the compiler to look for header files in the location where you found them.
This appears to be a problem with the RStudio cmake script not properly detecting a MacPorts R installation. To fix these problems:
Point cmake to the correct location of your R executable using export RSTUDIO_WHICH_R=/opt/local/bin/R (or whatever the location is for you), as described in this RStudio Knowledge Base Article. This solves the problem with cmake failing to generate a configuration.
To solve the problems with Rinternals.h not being found, go into build/CMakeCache.txt and change the path of LIBR_INCLUDE_DIRS to reflect Rinternals.h's actual location, as described in this RStudio Support Forum Question.
Ensure that LIBR_EXECUTABLE, LIBR_HOME, and LIBR_DOC_DIR all point to the correct location. You can get the correct locations by doing R.home(component="home") (or component="doc") in an R interactive prompt, as described on this webpage. This will solve the build error at 44%, and the additional error I had at 70-ish%.
Add -I /opt/local/Library/Frameworks/R.framework/Versions/3.1/PrivateHeaders/ to the compiler's command line.
Alternatively, you can set CPLUS_INCLUDE_PATH in the environment to tell the compiler where to search for additional headers when compiling C++ code. You may also want to set C_INCLUDE_PATH for C if needed.
$ export CPLUS_INCLUDE_PATH=/opt/local/Library/Frameworks/R.framework/Versions/3.1/PrivateHeaders
$ make

Xlib.h not found when building graphviz on Mac OS X 10.8 (Mountain Lion)

When using homebrew to install graphviz, the script gets to the point of "Making install in tkstubs" and then throws the following fatal error:
In file included from tkStubLib.c:15:
/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
I have installed XQuartz as X11 has been dropped in Mountain Lion, but I'm unsure if it is installed correctly. The location of Xlib.h is:
/opt/X11/include/X11/Xlib.h
There are also two symlinks to /opt/X11, they are:
/usr/X11
/usr/X11R6
Does this look like the correct setup to you? I've never dealt with X11 or XQuartz until yesterday.
Cheers.
After installing XQuartz you may add a symlink to your X11 installation folder by just entering
ln -s /opt/X11/include/X11 /usr/local/include/X11
in terminal. That will fix the problem as well without changing any ruby script.
You need to tell the tkstubs build (and possibly other bits in the package as well) to look for headers in /opt/X11/include; this is not on the standard include path.
Usually this is achieved by passing -I/opt/X11/include as an additional compiler flag, the method to do so is however dependent on the build system.
For reasonably modern configure scripts, the best approach is to pass it in the environment variable CPPFLAGS; if the package uses another build system or this doesn't work for another reason, then you need to look at the Makefile in the build directory.
You can enter in your shell before the compile/link (or brew) command:
export CPPFLAGS=-I/opt/X11/include
The export line will tell the compile/linker to look in /opt/X11/include for the X11 include files
Had the same issue and running this command on terminal
xcode-select --install
worked for me. Run this command after installing xQuartz.
If you need this to work in your CMake builds:
if(APPLE)
include_directories(AFTER "/opt/X11/include")
endif()
That worked well for me.
I got it to install by copying the x11 header file directory to the /opt/local/include directory. Probably not the best way to work around it but quick and easy.
I found this thread while trying to compile ffmpeg from source on OS X. I needed --enable-x11grab and the homebrew build does not support this option.
I had XQuartz installed already but I kept getting errors from ./configure: ERROR: Xlib not found. I thought the answers here would solve my problem, but they did not!
So, if anyone is ever in the same boat, my solution was this:
I opened up the generated config.log and found lots of errors referring to various includes and header files, including X11/Xlib.h - this is misleading. At the very bottom of the logfile was the key, pkg-config was complaining about looking for xbc.pc, and requested that it be put on the path. However, the error message that is displayed on the terminal says nothing about pkg-config or xbc!
The solution is to add to your PKG_CONFIG_PATH environment variable. Mine was nonexistent, so I just did export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ (the folder where I found xbc.pc).
I reran configure and everything worked like a charm!
TL;DR: check config.log - don't trust the terminal output!
Since the make file is looking for X11/xlib.h i.e., it is looking for X11 folder in the current directory, one way to solve this problem is to simply copy the /opt/X11/include/X11 directory to the directory that contains make file.

Resources