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

Error with gcc-7.2 #1

Closed
e-molitor opened this issue Nov 17, 2017 · 2 comments
Closed

Error with gcc-7.2 #1

e-molitor opened this issue Nov 17, 2017 · 2 comments

Comments

@e-molitor
Copy link

Dear PKPDSim creators,

thank you loads for a most useful package. With current versions of gcc-7.2 and stdlib, I ran into an error message. Using the introductory example

p <- list(CL = 1, V = 10, KA = 0.5)
pk1 <- new_ode_model("pk_1cmt_oral")

led to the following list of error messages, each one nagging at ambiguous overload operators:

file4b7eba8cc03.cpp: In Funktion »Rcpp::List sim_wrapper_cpp(Rcpp::NumericVector, Rcpp::List, Rcpp::List, Rcpp::NumericVector, double)«:
file4b7eba8cc03.cpp:89:21: Fehler: ambiguous overload for »operator=« (operand types are »std::vector« and »Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19>}«)
times = design["t"];
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/vector.tcc:179:5: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:461:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = double; _Alloc = std::allocator]
operator=(initializer_list<value_type> __l)
^~~~~~~~
file4b7eba8cc03.cpp:90:24: Fehler: ambiguous overload for »operator=« (operand types are »std::vector« and »Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19>}«)
doses = design["dose"];
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/vector.tcc:179:5: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:461:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = double; _Alloc = std::allocator]
operator=(initializer_list<value_type> __l)
^~~~~~~~
file4b7eba8cc03.cpp:91:23: Fehler: ambiguous overload for »operator=« (operand types are »std::vector« and »Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19>}«)
evid = design["evid"];
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/vector.tcc:179:5: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:461:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator]
operator=(initializer_list<value_type> __l)
^~~~~~~~
file4b7eba8cc03.cpp:92:23: Fehler: ambiguous overload for »operator=« (operand types are »std::vector« and »Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19>}«)
dummy = design["dum"];
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/vector.tcc:179:5: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:461:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = double; _Alloc = std::allocator]
operator=(initializer_list<value_type> __l)
^~~~~~~~
file4b7eba8cc03.cpp:93:24: Fehler: ambiguous overload for »operator=« (operand types are »std::vector« and »Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19>}«)
rates = design["rate"];
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/vector.tcc:179:5: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:461:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = double; _Alloc = std::allocator]
operator=(initializer_list<value_type> __l)
^~~~~~~~
file4b7eba8cc03.cpp:94:31: Fehler: ambiguous overload for »operator=« (operand types are »std::vector« and »Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19>}«)
dose_cmt = design["dose_cmt"];
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/vector.tcc:179:5: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:461:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator]
operator=(initializer_list<value_type> __l)
^~~~~~~~
file4b7eba8cc03.cpp:95:28: Fehler: ambiguous overload for »operator=« (operand types are »std::vector« and »Rcpp::Vector<19>::NameProxy {aka Rcpp::internal::generic_name_proxy<19>}«)
dose_type = design["type"];
^
In file included from /usr/include/c++/7/vector:69:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/vector.tcc:179:5: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/local/lib64/R/library/Rcpp/include/RcppCommon.h:59,
from /usr/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
from file4b7eba8cc03.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:461:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:482:7: Anmerkung: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator]
operator=(initializer_list<value_type> __l)
^~~~~~~~
make: *** [file4b7eba8cc03.o] Fehler 1
g++ -I/usr/local/lib64/R/include -DNDEBUG -I"/usr/local/lib64/R/library/Rcpp/include" -I"/usr/local/lib64/R/library/BH/include" -I"/tmp/RtmpD8fySg/sourceCpp-x86_64-pc-linux-gnu-0.12.13" -I/usr/local/include -w -fpic -g -O2 -c file4b7eba8cc03.cpp -o file4b7eba8cc03.o
/usr/local/lib64/R/etc/Makeconf:166: die Regel für Ziel „file4b7eba8cc03.o“ scheiterte
Fehler in Rcpp::sourceCpp(code = sim_func, rebuild = TRUE, env = globalenv(), :
Error 1 occurred building shared library.

@ronkeizer
Copy link
Contributor

Can reproduce with this particular compiler version, so seems due to a change in the compiler. Works fine with older gcc (currently using 4.8.2) or clang (any), so please use that for now. Will look for fix a.s.a.p.

@ronkeizer
Copy link
Contributor

Should be fixed with latest revision, please check. Tested with g++ 7.2.0 on Mac.

@kkradtke kkradtke mentioned this issue Nov 8, 2019
karawoo pushed a commit that referenced this issue Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants