installing tortunel missing Boost file? - boost

Following the steps in this website to install Tortunnel, on step 1 point 5 where i am suppose to run make && make install, i get the following ;
In file included from TorProxy.cpp:30:
./TorProxy.h:33:10: fatal error: 'boost/shared_ptr.hpp' file not found
#include <boost/shared_ptr.hpp>
^
1 error generated.
make: *** [TorProxy.o] Error 1
after that i made sure to install Boost with brew on Mac
and then again i ran the same command but got the same out come ?
i was able to locate the exact file in the Boot folder and confirm that it is there, but not sure if it in the right location since it is not in the tortunnel folder, and i am running the command from that folder.

Most likely Brew didn't install the boost libraries to your C compiler's include path so you'll need to specify it when you go to configure the software.
Since you said you were able to find where the Boost libs were installed, try:
CPPFLAGS="-I/path/to/boost" ./configure [opts]
In the above command, /path/to/boost would be the directory where the boost folder is located that contains shared_ptr.hpp. So say that were /opt/shared/brew/include/boost then use /opt/shared/brew/include in the configure command (I have no idea where Brew puts stuff so this path is totally made up for this answer).

Related

gnu/libtool (libltdl) installed but not found by configure script

I am trying to install guile locally on a system. It requires gnu/libtool. While installing all its dependencies, the "make check" command showed errors while installing gnu/libtool. But if I omitted the command and simply ran "make" followed by "make install", then it was able to install successfully. I was able to install the rest of the dependencies without any problem. However, when I run the following command, then I am getting the below mentioned error:
Command:
../configure --with-libltdl-prefix=$PREFIX/libtool --with-libgmp-prefix=$PREFIX/gmp --with-libunistring-prefix=$PREFIX/libunistring --with-libiconv-prefix=$PREFIX/libiconv --with-libreadline-prefix=$PREFIX/libreadline --with-libintl-prefix=$PREFIX/gettext --prefix=$PREFIX/guile
Error:
configure: error: GNU libltdl (Libtool) not found, see README.
the $PREFIX is defined and I have installed the libltdl library in the libtool folder. When I look through the include and lib sub directories of the libtool folder, I can find the libltdl folders and .so files.
So, I am unsure as to why the configure script is not able to find the locally installed version of libtool. I will be highly grateful if someone can point out the problem in the command and how to remedy this error.
I had a similar issue when trying to compile bind9 using distcc under Rasbian. I had previously installed the package libtool but I was also missing the package libtool-bin.
That solved my issue.
Try
apt list libtool* --installed
and see if both show up.

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

Error during RNNLib configuration: netcdfcpp.h cannot be found

When attempting to compile RNNLib, I got an error in NetcdfDataset.hpp:26:24 saying that Netcdfcpp.h could not be found. I looked around and found a bug report from 2011 that suggested that this was a bug, but it claimed to have been fixed. I have tried everything I can think of, including rebuilding NetCDF (a dependency of RNNLib) with various different flags, and have been unable to fix this bug. Can anyone give me a hand?
I had some trouble on a virtual machine building rnnlib.
I had to install the C and C++ version of NetCDF to get it to work.
The C version can be installed via sudo apt-get install libnetcdf-dev
I had to install the C++ version by building it.
Hope it will help. It's quite a difficult lib to install.
Maybe this helps someone: you can avoid some of the pain by installing packages from APT, and access the correct version mentioned by user3620756, which contains the netcdfcpp.h header file
. This happens through a legacy package, available on Ubuntun 16.04 (Xenial universe, see APT repository).
First install libnetcdf for C, then install libnetcdf-cxx-legacy-dev which should depend on libnetcdf-c++4 and install required C++ libraries on the go:
sudo apt install libnetcdf-dev libnetcdf-cxx-legacy-dev
The newest version doesn't have this netcdfcpp.h file anymore.
I had to use ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx-4.2.tar.gz to get it working.
I have also followed the same process and it worked for me
"The newest version doesn't have this netcdfcpp.h file anymore. I had to use ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx-4.2.tar.gz to get it working."
After downloading the folder, I had to build it by entering into the netcdf folder. I used simple command for the task :
.\configure
make
sudo make install
But in the file named as "NetcdfDataset.hpp", I have to give the complete path of the netcdfcpp.h file. For my case the path of the include file is :
#include "/Volumes/Macintosh_HD_2/WordSpottingProj/trunk/CODE C++/rnnlib_source_forge_version/netcdf-cxx-4.2/cxx/netcdfcpp.h"
I had this problem in the context of trying to use a makefile that called for netcdfcpp.h:
$ make -f makefile_MAC
c++ -O2 -o burn7.x burn7.cpp -I/opt/local/include -L/opt/local/lib -lm -lnetcdf_c++
burn7.cpp:31:10: fatal error: 'netcdfcpp.h' file not found
#include <netcdfcpp.h>
^
1 error generated.
make: *** [burn7.x] Error 1
I'm on a Mac, so I used Homewbrew to install the NetCDF package, but version 4.3.3.1 didn't appear to have netcdfcpp.h:
brew install homebrew/science/netcdf
However, I found that installing it with an additional flag resulted in this version being included:
brew install homebrew/science/netcdf --with-cxx-compat
I assume that the same is true of other installation/compilation methods, and not that this file has been taken out of versions since 4.2 as others answers state. Maybe it was a default option before and now it isn't?

Install OpenSSL Support for self-compiled Ruby Installation

I unpacked and compiled Ruby 2.1 and installed several support tools.
But OpenSSL won't install while I have libssl-dev installed.
I get this error when making the openssl support:
make: *** No rule to make target `/thread_native.h', needed by `ossl.o'. Stop.
What to do?
I ran into the same problem. Turns out, the last line of the extconf.rb-generated Makefile reads
ossl.o: $(top_srcdir)/thread_native.h $(top_srcdir)/thread_$(THREAD_MODEL).h
However, top_srcdir isn't defined anywhere in the Makefile.
I figured out where the missing header files were by running
sudo find / -name thread_native.h
which returned (approximately)
~/.rbenv/versions/2.1.0/thread_native.h
There's a line at the top that says something like
topdir = ~/.rbenv/versions/2.1.0/include/ruby-2.1.0
so I just added a line below it pointing to the directory from the find:
top_srcdir = $(topdir)/../..
After all that, I did a make clean in the ext/openssl directory and then make ran without the error.
Why don't you use rvm? It compiles, configures, installs and manages the chosen version of the most popular ruby interpreters for you.
Anyway, try using --with-openssl-dir.

Need help to build Boost from source for MinGW

I was trying to build Boost library from source for MinGW. The Boost website says no guarantee but there seem to be people done it successfully. However I couldn't find much instructions on the web.
I updated the title to better reflect my problem right now.
======================== Original post ==============================
I downloaded Boost 1.53.0, unzipped it and cd to the folder in MinGW shell. It failed at the very first step I tried:
$ ./bootstrap.sh mingw
Building Boost.Build engine with toolset gcc...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
Inside the bootstrap.log the errors are:
builtins.c:33:23: fatal error: sys/wait.h: No such file or directory
compilation terminated.
execunix.c:17:26: fatal error: sys/resource.h: No such file or directory
compilation terminated.
fileunix.c:98:17: fatal error: ar.h: No such file or directory
compilation terminated.
Please help! Thanks!
================== End of original and beginning of update =====================
Update: I found this detailed instruction on line:
http://vijay.axham.com/blog/478/building-boost-binaries-on-mingw
I followed it along and now got stuck in the final build step that is supposed to take a long time but I got an error instead:
$ b2 --build-dir=$BOOST_BUILD_DIR --prefix=$BOOST_INSTALL_DIR toolset=gcc variant=release link=static threading=multi runtime-link=static install 2>&1 | tee $BOOST_BUILD_DIR/build.log
error: Unable to find file or target named
error: 'boost/tr1/tr1/bcc32'
error: referred from project at
error: '.'
but the directory is there (it should be since it's just extracted from the zip file)
$ ls boost/tr1/tr1/bcc32/
array.h random.h regex.h tuple.h type_tra.h unordere.h
Getting closer but still need help! Thanks!
OK I got it working. The trick was to download the tar.bz2 file, not the zip file from sourceforge (specifically http://sourceforge.net/projects/boost/files/boost/1.53.0/). Even though both the zip and the tar.bz2 files are listed under the same file folder for the same version of Boost, the contents are different. There are some missing folders in the zip file, and the line ending conventions of the compressed files are different. At any rate after I downloaded and extracted the tar.bz2 file. I followed the instructions given here:
http://vijay.tech/articles/wiki/Programming/Cpp/Boost/BuildingBoostOnMinGw
and successfully built the Boost library from source using MinGW shell (mintty to be exact). There were some failures but probably not important: has_icu_test, has_iconv, has_icu_obj, has_icu64_obj, .masm. At the end it says
...failed updating 2 targets...
...skipped 3 targets...
...updated 10623 targets...
Hope this will help others in the future.
Do not use bash. Build it using cmd.exe.
bootstrap.bat gcc
Compiler executable should be on PATH.
Do not use bash. Build it using cmd.exe as described below:
Install MinGw on your system. I recommend using the same bit system as your processor is. Then set the path in System Environment to the bin folder which contains g++, ... (Compiler executable should be on PATH.) files. Now you are ready to go.
For obvious reasons, start a fresh terminal (cmd.exe), don't use the already open terminals that doesn't know your new setting.
Download boost, the latest stable release, unzip it and in the command window follow the path too the main directory of the extracted boost.
Run this command: bootstrap mingw
Run this command afterwards, which will install in the folder you select as your destination.
b2 install --prefix=c:\boost\custominstallationfolder\gcc toolset=gcc
Like said above, but more specifically for me compiling boost-1.54 with gcc-mingw-4.8.1
Using a Windows shell (cmd.exe) navigate to root of boost directory directory then
bootstrap.bat gcc
b2.exe toolset=gcc

Resources