boost: command not found on mac OS 10.10 - c++

I have been trying to install caffe Deep learning framework on my MAC OS 10.10, but there is a command which needs to be executed in this process.
boost snappy leveldb protobuf gflags glog szip lmdb homebrew/science/opencv
I installed boost library version 1.55.0 , still it gives this error.
-bash: boost: command not found
Also in this command: make pycaffe
I get this error:
fatal error: 'boost/shared_ptr.hpp' file not found
#include <boost/shared_ptr.hpp>
^
1 error generated.
make: *** [.build_release/src/caffe/layers/absval_layer.cuo] Error 1
Where am I getting wrong?
Are environment variable needed to be set for this command to run.
Also,
What is meant by changing homebrew formula?
I am newbie in python. Before posting this on stack overflow, I tried a lot to figure our this error, but it is almost a week, I am not able to overcome. If possible, some step by step guide of caffe installation on mac 10.10 will be helpful.
Thanks a lot in advance.

Related

How I install wxWidgets in msys2 correctly?

I'm having trouble installing wxWidgets in msys2, I used pacman to install the library
pacman -S mingw-w64-clang-x86_64-wxwidgets3.0-msw
But when I try to execute a test file it gives me this error
fatal error: wx/wx.h: No such file or directory
Reading online I see that are in another methods of installing the library you have to compile it, but I can't find any information in regards to installing it with pacman.
I also tried to compile it myself with Cmake following the instructions in the wxwidgets page but I failed and I want to see what should I do now.
What I need to do to get this to work?

Boost MPI flags can't be found when installing Repast HPC

Using M1 Mac, I've followed the manual install procedures to install Repast HPC.
I'm trying to run ./install.sh rhpc and the following error persists:
configure: error: cannot not find the flags to link with Boost mpi
The suggested solution says to add the compiler wrappers with the following commands:
export PATH=$BASE_DIR/MPICH/bin:$PATH
MPI_COMPILER_INVOCATION=$BASE_DIR/MPICH/bin/mpicxx
which didn't work as the command mpicxx still couldn't be invoked.
So I tried installing mpich through homebrew, where mpicxx now works outside of the install. However, the error persists.
So I tried installing boost through homebrew and directing the install to the homebrew directory, but the error persists.
So I tried installing open-mpi through homebrew, and mpicxx still works, but the error persists.
Any suggestions? I'm running out of online resources to solve the issue.

_ctermid.h: No such file or directory error on mac without Xcode

I was trying to compile my code using gcc 10.2.8 and I got this error:
scons: *** [S.os] Error 1
In file included from /usr/local/Cellar/gcc/10.2.0_2/include/c++/10.2.0/cstdio:42,
from Public_Library/C.h:10,
from Public_Library/D.h:11,
from Public_Library/RS.h:10,
from Projects/S/main.cpp:1:
/usr/local/Cellar/gcc/10.2.0_2/lib/gcc/10/gcc/x86_64-apple-darwin18/10.2.0/include-fixed/stdio.h:219:10: fatal error: _ctermid.h: No such file or directory
I found a few questions like this but the problem is I don't have Xcode on my mac and I have already updated my CommandLine tools several times and it did not work.
I'm using OSX 10.14.6 by the way.
I'm just gonna add this in case it might help others. I updated my OSX to big sure and installed Xcode but that did not help. What solved the problem for me was getting an unshallow version of brew with this command:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
and then updating and upgrading my brew.
brew update
brew upgrade

Mac OS X Yosemite C++ Eclipse error: "Error while launching command: gdb --version"

I am following a C++ Eclipse tutorial and learning how to debug. I filled in the sections of the Debug Configurations window as it said in the tutorial and clicked 'Debug'.
I get the error "Error while launching command: gdb --version". I found a similar post here: Mac C++/eclipse cannot debug: Error while launching command: gdb --version
and there the user said he already had GDB installed. I tried to install it using the instructions at this link: http://www.patosai.com/blog/post/installing-gdb-on-mac-os-x-yosemite
and when I entered the first command "brew install gdb" I got the following in my terminal:
Error: No available formula for gdb
==> Searching formulae...
cgdb gdbm pgdbf
==> Searching taps...
homebrew/dupes/gdb Caskroom/cask/macgdbp
I think there may have been a problem there because when I entered the final command of the "Installing GDB on Mac OS X Yosemite" tutorial above: "codesign -s gdb-cert /usr/local/bin/gdb" it said "no such file or directory.
Can anyone see where I've made an error please? Thanks :)
Seems like brew was unable to find gdb in its default search location.
The line 'Searching Taps...' means that brew is searching other git repositories for the software you are trying to install.
In this case it found two repositories that contain something useful.
homebrew/dupes/gdb and Caskroom/cask/macgdbp
homebrew/dupes/gdb would be the one you need as this is the gdb version apple used for xcode before it switched to other tools.
This site has a really good tutorial for installing gdb using either brew or macports http://ntraft.com/installing-gdb-on-os-x-mavericks/
I used this command to try to install gdb.
brew install homebrew/dupes/gdb
this should produce the following output
Installing gdb from homebrew/homebrew-dupes
Downloading http://ftpmirror.gnu.org/gdb/gdb-7.9.1.tar.xz
./configure --prefix=/usr/local/Cellar/gdb/7.9.1 --with-system-readline --with-lzma --with-python=/usr
make
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands**strong text**
make: *** [all] Error 2
The installation process failed on my macbook. This was most likely due to me using the os x 10.11 beta. But it might also be because the gdb version on brew does not work well with yosemite and higher. If this is the case you could try the macports install using the above tutorial.
I can't currently use macports because my os x version. but if you are using yosemite it should be fine.

installing c++ boost on mac osx leopard -- port fails

I'm not much of a c++ programmer, just an end-user trying to install an existing project from source.
One of the project dependencies is the boost library.
When I tried to install boost on my osx 10.5.7 using "sudo port install boost", I got the following error message:
---> Building boost with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/boost_1_35_0" && gmake all " returned error 2
Command output: Makefile:2: *** missing separator. Stop.
Error: Status 1 encountered during processing.
help?
EDIT: I suspect something is wrong with my system, though I am not sure what -- it's just a plain osx installation + the xcode CD that came with it, nothing fancy. [things are just so much easier on this front on linux!)
I did "sudo port selfupdate" and "sudo port upgrade outdated" as suggested in an answer,
and the second one ran about all night, then failed with many errors, the last few are:
Error: The following dependencies failed to build: db46
Error: Unable to upgrade port: 1
---> Extracting tiff
On Mac OS X 10.5, tiff 3.8.2 requires Xcode 3.1 or later but you have Xcode 3.0.
Error: Target org.macports.extract returned: incompatible Xcode version
Error: Unable to upgrade port: 1
---> Activating xorg-renderproto #0.9.3_0
Error: Target org.macports.activate returned: Image error: /opt/local/include/X11/extensions/render.h is being used by the active render port. Please deactivate this port first, or use 'port -f activate xorg-renderproto' to force the activation.
Error: The following dependencies failed to build: xorg-renderproto
Error: Unable to upgrade port: 1
In my experience you can easily do things with other installers that can break the port command from working correctly. Not to mention that MacPorts just breaks at the most random of times for me. Once I removed perl using the port command. It broke the whole port installation, don't even try this.
If you can I would just build Boost from source using gcc.It is actually not that difficult.
I have written an article on how to do this with some detail here.
It has a specific focus on how to do this on Mac OS X but says how to do this on Windows as well.
The two commands you will need are:
Build debug libs using GCC:
bjam toolset= darwin variant=debug threading=multi link=static
Build release libs using GCC:
bjam toolset=darwin variant=release threading=multi link=static
More detailed info on doing this here.
On Mac OS X 10.5, tiff 3.8.2 requires Xcode 3.1 or later but you have Xcode 3.0.
Isn't that the cause of port upgrade outdated failure?
Try running 'sudo port selfupdate'. You are using an outdated version of MacPorts. Once this is done run 'port upgrade outdated' to update the ports you have and then try to install boost again.
Update:
Update XCode as Paul mentioned in a post below. You can get it on the Apple Developer Site. You will probably have to signup to get a download link. As for the bug about the active render port you can safely disable this port as it has been replaced by xorg-renderproto. Deactivate it by running 'sudo port deactivate render'. Once that is done you can update again using 'port upgrade outdated' and it shouldn't take as long this time.
My experiences with MacPorts are a mixed blessing at best. Sometimes ports are out of date, or only half-done, it's very nice when it works, but unfortunatly doesn't always, so I kind of gave up on port to be honest...
That said, the default configure, bjam, ... combo from the boost distribution works flawlessly on os x, any reason you specifically want to get it working via port ?