using C++ and fortran to build R packages, Mac - c++

I have been trying to get an R package downloaded that requires clang and go fortran to be built. I have neither installed on this computer, and since I am using a common computer I do not have the ability to install Xcode.
I downloaded the clang and fortran packages supplied by R at:
https://cran.r-project.org/bin/macosx/tools/
After installing them I still get the same error: configure: error: C compiler cannot create executables
I am new to creating path modifications and such and wondered if anyone could help?

I saw that his was not answered still, what I ended up doing was installing clang and gofortran through Homebrew, which worked.

Related

How to compile and install LLVM 13 from source on windows 10?

I want to install LLVM 13.0.1 in my local windows (64 bit) system to use it for creating a working enviorment for open source project. I downloaded and install from here but I found it is not complete It is missing many library files and cmake files that are required and getting errors while building. so I want now to install LLVM 13.0.1 from source.
I am very early in learning LLVM , Clang so don't have any idea of doing so. Can anyone give me the entire step / commands to do so.

Cmake doesn't find boost windows

I'm trying to run this code:
https://github.com/snukky/news-translit-nmt
I've installed boost and got the following messages:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:\Program Files\boost\boost_1_67_0
The following directory should be added to linker library paths:
C:\Program Files\boost\boost_1_67_0\stage\lib
By the comment of #kenba I've added the following environment variables:
Try 1
When I try to run the following cmd:
cmake .. -DCMAKE_BUILD_TYPE=Release
I get:
-- Could NOT find Boost (missing: timer iostreams filesystem system chrono) (found version "1.67.0")
CMake Error at CMakeLists.txt:290 (message):
Cannot find Boost libraries. Terminating.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring incomplete, errors occurred!
See also "D:/ThesisResources/previous_works/news-translit-nmt-master/tools/marian-dev/build/CMakeFiles/CMakeOutput.log".
Try 2
When I try to give a custom boost by this ref
https://marian-nmt.github.io/docs/#custom-boost:
I run the following cmd:
cmake .. -DBOOST_ROOT="C:\Program Files\boost\boost_1_67_0"
I get the same error.
I've also tried working with Linux WSL (But problems with CUDA installation overthere, their team is working on it), Linux VirtualBox (Not enough resources), and Ubuntu 17.10 I have installed (But Cuda requires Ubuntu 16.04 / 18.04)
What am I missing here? I'm trying any suggestion, stuck on it for a few days. Thanks!
Edit:
I reinstalled Ubuntu 16.04 and the problem was solved. Still don't know how to solve it in windows, but i'll continue use Ubuntu 16.04.
I had this problem earlier while trying to build the Windows version of Marian NMT (the same component that you're having trouble with). I can't remember the exact steps to solve the problem, but the root cause is that the Marian NMT build for Windows does not work with newer versions of Boost, since the source code uses some deprecated calling conventions for timer and chrono libraries (maybe some others as well).
The error message kind of confirms this: it can't find Boost, but on the other hand it says it finds your version 1.67.0. The solution is to use an older version of boost, I've confirmed that it works with 1.60.0.
If you just require a Marian NMT decoder that works in Windows, a project I work on has released a plugin for the Trados Studio translation tool, which contains a compiled marian-decoder executable for Windows: https://object.pouta.csc.fi/fiskmo/TradosStudio/FiskmoTranslationProvider.sdlplugin. You can access the executable by unzipping the sdlplugin file, the StartMtPipe.bat shows how to use the decoder.

Acado toolkit matlab installation

I'm trying to install ACADO Toolkit to use it with Matlab and have troubles.
In user manual (page:8) (can be seen here), it says to install Visual C++ compiler and restart the computer. I did that part. As a second step, it says that write mex -setup on Matlab and when I did that it gives errors:
Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64
Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2016b/win64.html.
I also tried to install MinGW-w64 compiler and it wasn't installed and give installation error and said:
"There was a problem installing the third-party software".
What should I do to fix it?

How to install camlp4 pre-processor in Cygwin / Windows?

I'm trying to build OPAM within Cygwin in Windows 8. Here is the error information during the configure stage:
configure: error: You must install the Camlp4 pre-processor. On some
operating systems, these are separate packages from the main OCaml
compiler, such as camlp4-extra on Debian.
I've searched cygwin repository using keywords "caml" and installed all the packages provided; however, the configuration still shows this error message. How can I install this Camlp4 pre-processor?
As long as OPAM doesn't work on windows, you can try GODI (windows port). It has basic windows support and you can install the most common packages through it.
I don't think OPAM works with windows quite yet. I've installed it on OSX and Linux and love it. On windows, though, there is a compilation error with unix_waitpid. This is because ocp-build/ocp-build.boot is a binary packaged with the OPAM source that requires the unix_waitpid instead of the win_waitpid function. I'm not exactly sure why they did this. But, after that their could be other issues.
Regarding the camlp4, running setup.exe of cygwin, I was easily able to find ocaml-camlp4 under interpreters. Depending on the tool-chain, I found it easy enough to just use the mingw binaries found through the ocaml website.

Lua C++ development files on Linux (/usr/bin/ld: cannot find -llua5.1)

I am building a C++ application that embeds the Lua scripting engine. I am developing on Linux (Ubuntu).
I have already installed Lua on my dev machine (by imstalling the lua5.1 package). I can run the Lua intepreter succesfully (via the cmd line).
However, when building, I get the following link error:
/usr/bin/ld: cannot find -llua5.1
I have searched the Ubuntu forums/package repositories etc but I cannot seem to find the required package. Can anyone help?
PS: I also need to install the development files for tolua++ (I'm not sure which Ubuntu package is the required one either).
I am on Ubuntu 10.0.4
Install the liblua5.1-dev package, and if that does not work compile Lua from sources.
Or you can try -llua instead of -llua5.1.
on Fedora 17 problem fixed:
sudo ln /usr/lib/liblua-5.1.so /usr/lib/liblua5.1.so
For tolua++, it looks like libtolua++5.1-dev is the package you want.