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

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.

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?

_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.

The tools required to build C++ code for R were not found

OS: Ubuntu 14.04
g++: g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
R version: 3.2.0 (2015-04-16) -- "Full of Ingredients"
Rcpp: 0.11.6
Today I apt-get dist-upgrade my system, and the g++ was also been upgraded.
Then when I am trying to use "Rcpp" package in R, the code is the simplest test code >>evalCpp("1+1") . An error as follows occurred:
Error in frameTypes(env) : not a proper evaluation environment
Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
Error in sourceCpp(code = code, env = env, rebuild = rebuild,showOutput = showOutput, :
Error 1 occurred building shared library.
WARNING: The tools required to build C++ code for R were not found.
Please install GNU development tools including a C++ compiler.
I have did google for it. The following links are all about Mac OSX:
Error when with Xcode 5.0 and Rcpp (Command Line Tools ARE installed)
g++ errors when trying to compile c++11 with Rcpp
From the answers and comments, I can not tell what is the real problem.
Appreciate your help!
UPDATE: I finally solved this problem by reinstalling all the R related deb packages. And one thing we should keep in mind is that I also did what #Dirk suggested first apt-get build-dep r-base-dev. I can not confirm which one is the key step.
You need
sudo apt-get build-dep r-base
to install the all the build dependencies for R itself.
But we even built an explicitly helper package r-base-dev so in most cases (and in your use case of Rcpp) you just need
sudo apt-get install r-base-dev
There is something wrong/missing in your system configuration. First of all, I doubt that you are really running Ubuntu 14.04 (after the dist-upgrade) because the the other versions that you listed wouldn't be available (unless you have pulled them in from a non-default repository). You might also consider running a full-upgrade to try to straighten out your configuration.
You might gain some insights by running with showOutput=1...
library(Rcpp)
evalCpp("1+1",showOutput=1,rebuild=1)
...but actually, it looks like the problem is related specifically to a parameter called env (Error in frameTypes(env) : not a proper evaluation environment) which is likely evaluated prior-to attempting to compile.
For what it is worth, I was able to run this without r-base-dev installed, but maybe installing r-base-dev will pull in the correct, and updated, versions of what you need. I would be inclined to just reinstall all R-related packages.

Compiler Not Found

I am getting this error when i tried to compile my program
-bash: g++: command not found
Also I have only been getting this error after I formatted my Mac Book Pro
This error came after I did this
g++ functions.cpp
Please help me.
Thank You
Here is a cleanest solution than installing XCode just for Gcc.
STEP 1 > install this:
[HomeBrew Web Site] (http://brew.sh/)
All the informations concerning the installation and the utility of such a program are on the site itself.
It's a package manager, but for Mac. It's like apt-get or yaourt, if you ever used Ubuntu or Arch Linux.
STEP 2 > Go to the Terminal application and type :
$> homebrew search gcc
Then choose from the version you want, and type again in Terminal:
$> homebrew install [choosen version]
Gcc is now installed.