Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error when including a boost::multiprecision header #327

Open
yulanvanoppen opened this issue Sep 18, 2020 · 0 comments
Open
Labels

Comments

@yulanvanoppen
Copy link

Description:

A compilation error is generated upon including the boost/multiprecision/cpp_dec_float.hpp

Reproducible Steps:

Compiling (running library(TMB); compile("file.cpp") in R) the following C++ code currently generates a compilation error:

#include <TMB.hpp>

#include <boost/multiprecision/cpp_dec_float.hpp>       // high precision floats

template<class Type>
Type objective_function<Type>::operator() () {
    return Type(0);
}

However, this is not an issue when including boost/multiprecision/cpp_bin_float.hpp instead.

Current Output:

make: *** [/usr/lib/R/etc/Makeconf:177: file.o] Error 1
Error in compile("mwe.cpp") : Compilation failed

Expected Output:

g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o file.so file.o -L/usr/lib/R/lib -lR

TMB Version:

1.7.18

R Version:

R version 3.6.3 (2020-02-29)

Operating System:

Ubuntu 20.04 LTS

@euclaise euclaise added the Bug label Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants