mclements / microsimulation

R package for microsimulation
36 stars 9 forks source link

compilation fails #1

Open smartinsightsfromdata opened 5 years ago

smartinsightsfromdata commented 5 years ago

I'm on osx & R 3.5.2

Is there any plan to update the package (& fix the error)?

Thanks

> devtools::install_github("mclements/microsimulation")
Downloading GitHub repo mclements/microsimulation@master
✔  checking for file ‘/private/var/folders/9v/251f7k_x6hn8t9wsz8v21rgh0000gn/T/RtmpiYMGPo/remotes1545b5e75bb/mclements-microsimulation-63abdcc/DESCRIPTION’ ...
─  preparing ‘microsimulation’:
✔  checking DESCRIPTION meta-information
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘microsimulation_1.1.tar.gz’

Installing package into ‘/usr/local/lib/R/3.5/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘microsimulation’ ...
** libs
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -fPIC  -g -O2  -c microsimulation.cc -o microsimulation.o
In file included from microsimulation.cc:6:
In file included from ./microsimulation.h:40:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]
BOOST_MOVE_STD_NS_BEG
^
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro 'BOOST_MOVE_STD_NS_BEG'
   #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
                                                   ^
In file included from microsimulation.cc:6:
./microsimulation.h:56:49: error: expected expression
            boost::hash_combine(seed, tuple.get<Index>());
                                                       ^
./microsimulation.h:64:43: error: expected expression
          boost::hash_combine(seed, tuple.get<0>());
                                                 ^
./microsimulation.h:588:19: error: no type named 'iterator' in 'CostReport<State, Time, Cost>'
   typename This::iterator it;
   ~~~~~~~~~~~~~~~^~~~~~~~
1 warning and 3 errors generated.
make: *** [microsimulation.o] Error 1
ERROR: compilation failed for package ‘microsimulation’
* removing ‘/usr/local/lib/R/3.5/site-library/microsimulation’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/var/folders/9v/251f7k_x6hn8t9wsz8v21rgh0000gn/T//RtmpiYMGPo/file1545b186667a2/microsimulation_1.1.tar.gz’ had non-zero exit status
mclements commented 5 years ago

I need to push/copy the core branch to master, particularly as the code branch is being used with the development of the prostata model. You can use:

devtools::install_github("mclements/microsimulation", ref="core")

Note that this may create a static library which includes all of the symbols from Rcpp.

I hope that this is useful.

Sincerely, Mark.

On 21 Feb 2019 21:50, Enzo notifications@github.com wrote:

I'm on osx & R 3.5.2

Is there any plan to update the package (& fix the error)?

Thanks

devtools::install_github("mclements/microsimulation")

Downloading GitHub repo mclements/microsimulation@master

✔ checking for file ‘/private/var/folders/9v/251f7k_x6hn8t9wsz8v21rgh0000gn/T/RtmpiYMGPo/remotes1545b5e75bb/mclements-microsimulation-63abdcc/DESCRIPTION’ ...

─ preparing ‘microsimulation’:

✔ checking DESCRIPTION meta-information

─ cleaning src

─ checking for LF line-endings in source and make files and shell scripts

─ checking for empty or unneeded directories

─ looking to see if a ‘data/datalist’ file should be added

─ building ‘microsimulation_1.1.tar.gz’

Installing package into ‘/usr/local/lib/R/3.5/site-library’

(as ‘lib’ is unspecified)

** libs

clang++ -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include -I. -DVERSION=\"1.7.6\" -fPIC -g -O2 -c microsimulation.cc -o microsimulation.o

In file included from microsimulation.cc:6:

In file included from ./microsimulation.h:40:

In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:

In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:

In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:

In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:

/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]

BOOST_MOVE_STD_NS_BEG

^

/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro 'BOOST_MOVE_STD_NS_BEG'

define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD

                             ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'

define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {

                                               ^

In file included from microsimulation.cc:6:

./microsimulation.h:56:49: error: expected expression

        boost::hash_combine(seed, tuple.get<Index>());

                                                   ^

./microsimulation.h:64:43: error: expected expression

      boost::hash_combine(seed, tuple.get<0>());

                                             ^

./microsimulation.h:588:19: error: no type named 'iterator' in 'CostReport<State, Time, Cost>'

typename This::iterator it;



1 warning and 3 errors generated.

make: *** [microsimulation.o] Error 1

ERROR: compilation failed for package ‘microsimulation’

* removing ‘/usr/local/lib/R/3.5/site-library/microsimulation’

Error in i.p(...) :

  (converted from warning) installation of package ‘/var/folders/9v/251f7k_x6hn8t9wsz8v21rgh0000gn/T//RtmpiYMGPo/file1545b186667a2/microsimulation_1.1.tar.gz’ had non-zero exit status

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://github.com/mclements/microsimulation/issues/1>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAiBCcsrTpqh7e1TtxJkEPc3E7wyHAovks5vPwaTgaJpZM4bITKv>.

När du skickar e-post till Karolinska Institutet (KI) innebär detta att KI kommer att behandla dina personuppgifter. Här finns information om hur KI behandlar personuppgifter<https://ki.se/medarbetare/integritetsskyddspolicy>.

Sending email to Karolinska Institutet (KI) will result in KI processing your personal data. You can read more about KI’s processing of personal data here<https://ki.se/en/staff/data-protection-policy>.
andreasakarlsson commented 5 years ago

The master branch has been updated from the core branch and is now up-to-date.

Best, Andreas

smartinsightsfromdata commented 5 years ago

Still not working for me:

> devtools::install_github("mclements/microsimulation")
Downloading GitHub repo mclements/microsimulation@master
   checking for file ‘/private/var/folders/9v/251f7k_x6hn8t9wsz8v21rgh0000gn/T/RtmpSTvyzo/remotescfa4d27f766/mclements-microsimulation-✔  checking for file ‘/private/var/folders/9v/251f7k_x6hn8t9wsz8v21rgh0000gn/T/RtmpSTvyzo/remotescfa4d27f766/mclements-microsimulation-6b6100f/DESCRIPTION’
─  preparing ‘microsimulation’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘microsimulation/inst/lib’
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘microsimulation_1.1.tar.gz’

Installing package into ‘/usr/local/lib/R/3.5/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘microsimulation’ ...
** libs
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c microsimulation.cc -o microsimulation.o
In file included from microsimulation.cc:6:
In file included from ../inst/include/microsimulation.h:40:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature
      [-Wc++11-inline-namespace]
BOOST_MOVE_STD_NS_BEG
^
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro
      'BOOST_MOVE_STD_NS_BEG'
   #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
                                                   ^
1 warning generated.
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c cervical.cpp -o cervical.o
In file included from cervical.cpp:1:
In file included from ../inst/include/microsimulation.h:40:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature
      [-Wc++11-inline-namespace]
BOOST_MOVE_STD_NS_BEG
^
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro
      'BOOST_MOVE_STD_NS_BEG'
   #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
                                                   ^
1 warning generated.
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c person-r.cc -o person-r.o
In file included from person-r.cc:29:
In file included from ../inst/include/microsimulation.h:40:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature
      [-Wc++11-inline-namespace]
BOOST_MOVE_STD_NS_BEG
^
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro
      'BOOST_MOVE_STD_NS_BEG'
   #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
                                                   ^
1 warning generated.
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c calibperson-r.cc -o calibperson-r.o
In file included from calibperson-r.cc:32:
In file included from ../inst/include/microsimulation.h:40:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature
      [-Wc++11-inline-namespace]
BOOST_MOVE_STD_NS_BEG
^
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro
      'BOOST_MOVE_STD_NS_BEG'
   #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
                                                   ^
1 warning generated.
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c simple-example.cc -o simple-example.o
In file included from simple-example.cc:1:
In file included from ../inst/include/microsimulation.h:40:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature
      [-Wc++11-inline-namespace]
BOOST_MOVE_STD_NS_BEG
^
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro
      'BOOST_MOVE_STD_NS_BEG'
   #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
                                                   ^
1 warning generated.
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c simple-example2.cc -o simple-example2.o
In file included from simple-example2.cc:1:
In file included from ../inst/include/microsimulation.h:40:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature
      [-Wc++11-inline-namespace]
BOOST_MOVE_STD_NS_BEG
^
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro
      'BOOST_MOVE_STD_NS_BEG'
   #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
                                                   ^
1 warning generated.
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c illness-death.cpp -o illness-death.o
In file included from illness-death.cpp:1:
In file included from ../inst/include/microsimulation.h:40:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered_map.hpp:17:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/unordered/unordered_map.hpp:19:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/move.hpp:30:
In file included from /usr/local/lib/R/3.5/site-library/BH/include/boost/move/iterator.hpp:27:
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/iterator_traits.hpp:29:1: warning: inline namespaces are a C++11 feature
      [-Wc++11-inline-namespace]
BOOST_MOVE_STD_NS_BEG
^
/usr/local/lib/R/3.5/site-library/BH/include/boost/move/detail/std_ns_begin.hpp:18:34: note: expanded from macro
      'BOOST_MOVE_STD_NS_BEG'
   #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
                                 ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__config:445:52: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
                                                   ^
1 warning generated.
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c ssim.cc -o ssim.o
clang++  -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG  -I"/usr/local/lib/R/3.5/site-library/Rcpp/include" -I"/usr/local/lib/R/3.5/site-library/BH/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -I. -DVERSION=\"1.7.6\" -I../inst/include -fPIC  -g -O2  -c RngStream.cpp -o RngStream.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -L/usr/local/Cellar/r/3.5.2_2/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o microsimulation.so microsimulation.o cervical.o person-r.o calibperson-r.o simple-example.o simple-example2.o illness-death.o ssim.o RngStream.o -L/usr/local/Cellar/r/3.5.2_2/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
ar cr ../inst/lib/libmicrosimulation.a microsimulation.o cervical.o person-r.o calibperson-r.o simple-example.o simple-example2.o illness-death.o ssim.o RngStream.o 
ar: ../inst/lib/libmicrosimulation.a: No such file or directory
make: *** [staticLibrary] Error 1
ERROR: compilation failed for package ‘microsimulation’
* removing ‘/usr/local/lib/R/3.5/site-library/microsimulation’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/var/folders/9v/251f7k_x6hn8t9wsz8v21rgh0000gn/T//RtmpSTvyzo/filecfa1928b53/microsimulation_1.1.tar.gz’ had non-zero exit status
> 
andreasakarlsson commented 5 years ago

First I thought this might be a mac/clang issue, but it appears to build with check_on_macos() on rhub:

`> check_on_macos() ─ Building package ─ Uploading package ─ Preparing build, see status at http://builder.r-hub.io/status/microsimulation_1.1.tar.gz-ab294634cccb470c9b230b31cee94efc ─ Build started ─ Creating user useroGmV07gK ─ Downloading package ─ Setting up home directory ─ Running check ─ Installing package dependencies ─ Running R CMD check ─ using log directory ‘/Users/useroGmV07gK/microsimulation.Rcheck’ (2m 27.8s) ─ using R version 3.5.2 (2018-12-20) ─ using platform: x86_64-apple-darwin15.6.0 (64-bit) ─ using session charset: UTF-8 ✔ checking for file ‘microsimulation/DESCRIPTION’ ─ checking extension type ... Package ─ this is package ‘microsimulation’ version ‘1.1’ ✔ checking package namespace information ✔ checking package dependencies (3.3s) W checking if this is a source package Subdirectory ‘src’ contains: rngstream-boost.hpp These are unlikely file names for src files.

In addition to the above warning(s), found the following notes:

Found the following apparent object files/libraries: inst/lib/libmicrosimulation.a Object files/libraries should not be included in a source package. ✔ checking if there is a namespace ✔ checking for executable files ✔ checking for hidden files and directories ✔ checking for portable file names ✔ checking for sufficient/correct file permissions ✔ checking whether package ‘microsimulation’ can be installed (35.8s) N checking installed package size installed size is 19.9Mb sub-directories of 1Mb or more: lib 19.0Mb ✔ checking package directory ✔ checking DESCRIPTION meta-information (807ms) ✔ checking top-level files ✔ checking for left-over files ✔ checking index information ✔ checking package subdirectories ✔ checking R files for non-ASCII characters ✔ checking R files for syntax errors ✔ checking whether the package can be loaded ✔ checking whether the package can be loaded with stated dependencies ✔ checking whether the package can be unloaded cleanly (794ms) ✔ checking whether the namespace can be loaded with stated dependencies ✔ checking whether the namespace can be unloaded cleanly (803ms) ✔ checking loading without being on the library search path ✔ checking dependencies in R code ✔ checking S3 generic/method consistency (802ms) ✔ checking replacement functions (805ms) ✔ checking foreign function calls N checking R code for possible problems (2.4s) callCervical: no visible binding for global variable ‘IHE’ callCervical : reader: no visible binding for global variable ‘stateT’ callCervical : reader: no visible binding for global variable ‘gradeT’ callCervical : reader: no visible binding for global variable ‘diagnosisT’ callCervical : reader: no visible binding for global variable ‘psaT’ callCervical : : no visible binding for global variable ‘age’ callCervical: no visible binding for global variable ‘eventT’ callCervical: no visible binding for global variable ‘stateT’ callPersonSimulation: no visible binding for global variable ‘event’ callSimplePerson: no visible binding for global variable ‘event’ Undefined global functions or variables: age diagnosisT event eventT gradeT IHE psaT stateT ✔ checking Rd files ✔ checking Rd metadata ✔ checking Rd cross-references W checking for missing documentation entries Undocumented code objects: ‘advance.substream’ ‘assignList’ ‘BaseDiscreteEventSimulation’ ‘callCalibrationPerson’ ‘callCervical’ ‘callIllnessDeath’ ‘callPersonSimulation’ ‘callSimplePerson’ ‘callSimplePerson2’ ‘cervEventT’ ‘cervicalData’ ‘CervicalData’ ‘cervicalEnum’ ‘CervicalParameters’ ‘cervStateT’ ‘enum’ ‘enum<-’ ‘EventQueue’ ‘fhcrcData’ ‘frontier’ ‘Hcervical’ ‘hpvT’ ‘ICER’ ‘LdFlags’ ‘lines.frontier’ ‘microsimulation.exit’ ‘microsimulation.init’ ‘next.user.Random.substream’ ‘pop1’ ‘rnormPos’ ‘set.user.Random.seed’ ‘signed’ ‘unsigned’ ‘user.Random.seed’ Undocumented data sets: ‘fhcrcData’ Undocumented S4 classes: ‘BaseDiscreteEventSimulation’ ‘RNGStream’ ‘EventQueue’ All user-level objects in a package (including S4 classes and methods) should have documentation entries. See chapter ‘Writing R documentation files’ in the ‘Writing R Extensions’ manual. ✔ checking for code/documentation mismatches (1.6s) ✔ checking Rd \usage sections (802ms) ✔ checking Rd contents ✔ checking for unstated dependencies in examples ✔ checking contents of ‘data’ directory ✔ checking data for non-ASCII characters (797ms) ✔ checking data for ASCII and uncompressed saves ✔ checking line endings in shell scripts ✔ checking line endings in C/C++/Fortran sources/headers ✔ checking line endings in Makefiles ✔ checking compilation flags in Makevars W checking for GNU extensions in Makefiles Found the following file(s) containing GNU extensions: src/Makevars Portable Makefiles do not use GNU extensions such as +=, :=, $(shell), $(wildcard), ifeq ... endif. See section ‘Writing portable packages’ in the ‘Writing R Extensions’ manual. ✔ checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ✔ checking include directives in Makefiles ✔ checking compiled code ✔ checking examples (795ms) ✔ checking for unstated dependencies in ‘tests’ ─ checking tests ... (802ms) ✔ Running ‘testthat.R’ ✔ checking PDF version of manual (2.4s)

─ Done with R CMD check`

smartinsightsfromdata commented 5 years ago

I have the same problem on Ubuntu:

> devtools::install_github('mclements/microsimulation')
Downloading GitHub repo mclements/microsimulation@master
✔  checking for file ‘/tmp/RtmpqzhOzO/remotes12d920f40ea5/mclements-microsimulation-6b6100f/DESCRIPTION’ ...
─  preparing ‘microsimulation’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘microsimulation/inst/lib’
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘microsimulation_1.1.tar.gz’

Installing package into ‘/home/e/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘microsimulation’ ...
** libs
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c microsimulation.cc -o microsimulation.o
In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ../inst/include/microsimulation.h:149,
                 from microsimulation.cc:6:
/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
                 from /usr/include/c++/7/locale:43,
                 from /usr/include/c++/7/iomanip:43,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,
                 from ../inst/include/microsimulation.h:37,
                 from microsimulation.cc:6:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cervical.cpp -o cervical.o
In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ../inst/include/microsimulation.h:149,
                 from cervical.cpp:1:
/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
                 from /usr/include/c++/7/locale:43,
                 from /usr/include/c++/7/iomanip:43,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,
                 from ../inst/include/microsimulation.h:37,
                 from cervical.cpp:1:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c person-r.cc -o person-r.o
In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ../inst/include/microsimulation.h:149,
                 from person-r.cc:29:
/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
                 from /usr/include/c++/7/locale:43,
                 from /usr/include/c++/7/iomanip:43,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,
                 from ../inst/include/microsimulation.h:37,
                 from person-r.cc:29:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c calibperson-r.cc -o calibperson-r.o
In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ../inst/include/microsimulation.h:149,
                 from calibperson-r.cc:32:
/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
                 from /usr/include/c++/7/locale:43,
                 from /usr/include/c++/7/iomanip:43,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,
                 from ../inst/include/microsimulation.h:37,
                 from calibperson-r.cc:32:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c simple-example.cc -o simple-example.o
In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ../inst/include/microsimulation.h:149,
                 from simple-example.cc:1:
/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
                 from /usr/include/c++/7/locale:43,
                 from /usr/include/c++/7/iomanip:43,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,
                 from ../inst/include/microsimulation.h:37,
                 from simple-example.cc:1:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c simple-example2.cc -o simple-example2.o
In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ../inst/include/microsimulation.h:149,
                 from simple-example2.cc:1:
/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
                 from /usr/include/c++/7/locale:43,
                 from /usr/include/c++/7/iomanip:43,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,
                 from ../inst/include/microsimulation.h:37,
                 from simple-example2.cc:1:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c illness-death.cpp -o illness-death.o
In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ../inst/include/microsimulation.h:149,
                 from illness-death.cpp:1:
/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
                 from /usr/include/c++/7/locale:43,
                 from /usr/include/c++/7/iomanip:43,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,
                 from ../inst/include/microsimulation.h:37,
                 from illness-death.cpp:1:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c ssim.cc -o ssim.o
In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ssim.cc:27:
/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
                                        ^~~~~~~~
In file included from /usr/include/c++/7/memory:80:0,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/function_base.hpp:16,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:17,
                 from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,
                 from ../inst/include/siena/ssim.h:28,
                 from ssim.cc:27:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I"/usr/share/R/include" -DNDEBUG  -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include"   -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RngStream.cpp -o RngStream.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o microsimulation.so microsimulation.o cervical.o person-r.o calibperson-r.o simple-example.o simple-example2.o illness-death.o ssim.o RngStream.o -L/usr/lib/R/lib -lR
ar cr ../inst/lib/libmicrosimulation.a microsimulation.o cervical.o person-r.o calibperson-r.o simple-example.o simple-example2.o illness-death.o ssim.o RngStream.o 
ar: ../inst/lib/libmicrosimulation.a: No such file or directory
Makevars:12: recipe for target 'staticLibrary' failed
make: *** [staticLibrary] Error 1
ERROR: compilation failed for package ‘microsimulation’
* removing ‘/home/e/R/x86_64-pc-linux-gnu-library/3.5/microsimulation’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/tmp/RtmpqzhOzO/file12d9267a618/microsimulation_1.1.tar.gz’ had non-zero exit status
> 
mclements commented 5 years ago

I am also getting this error with remotes::install_github('mclements/microsimulation'). It may be that install_github does not cope with the static binary - but I am not certain how to debug install_github.

Can you try:

git clone https://github.com/mclements/microsimulation.git && R CMD INSTALL microsimulation

This works for me.

--- Mark

On 22/2/19 6:51 pm, Enzo wrote:

I have the same problem on Ubuntu:

devtools::install_github('mclements/microsimulation')

Downloading GitHub repo mclements/microsimulation@master

✔ checking for file ‘/tmp/RtmpqzhOzO/remotes12d920f40ea5/mclements-microsimulation-6b6100f/DESCRIPTION’ ...

─ preparing ‘microsimulation’:

✔ checking DESCRIPTION meta-information ...

─ cleaning src

─ checking for LF line-endings in source and make files and shell scripts

─ checking for empty or unneeded directories

Removed empty directory ‘microsimulation/inst/lib’

─ looking to see if a ‘data/datalist’ file should be added

─ building ‘microsimulation_1.1.tar.gz’

Installing package into ‘/home/e/R/x86_64-pc-linux-gnu-library/3.5’

(as ‘lib’ is unspecified)

** libs

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c microsimulation.cc -o microsimulation.o

In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ../inst/include/microsimulation.h:149,

             from microsimulation.cc:6:

/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template T * get_pointer(std::auto_ptr const& p)

                                    ^~~~~~~~

In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,

             from /usr/include/c++/7/locale:43,

             from /usr/include/c++/7/iomanip:43,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,

             from ../inst/include/microsimulation.h:37,

             from microsimulation.cc:6:

/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here

template class auto_ptr;

                        ^~~~~~~~

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c cervical.cpp -o cervical.o

In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ../inst/include/microsimulation.h:149,

             from cervical.cpp:1:

/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template T * get_pointer(std::auto_ptr const& p)

                                    ^~~~~~~~

In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,

             from /usr/include/c++/7/locale:43,

             from /usr/include/c++/7/iomanip:43,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,

             from ../inst/include/microsimulation.h:37,

             from cervical.cpp:1:

/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here

template class auto_ptr;

                        ^~~~~~~~

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c person-r.cc -o person-r.o

In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ../inst/include/microsimulation.h:149,

             from person-r.cc:29:

/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template T * get_pointer(std::auto_ptr const& p)

                                    ^~~~~~~~

In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,

             from /usr/include/c++/7/locale:43,

             from /usr/include/c++/7/iomanip:43,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,

             from ../inst/include/microsimulation.h:37,

             from person-r.cc:29:

/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here

template class auto_ptr;

                        ^~~~~~~~

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c calibperson-r.cc -o calibperson-r.o

In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ../inst/include/microsimulation.h:149,

             from calibperson-r.cc:32:

/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template T * get_pointer(std::auto_ptr const& p)

                                    ^~~~~~~~

In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,

             from /usr/include/c++/7/locale:43,

             from /usr/include/c++/7/iomanip:43,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,

             from ../inst/include/microsimulation.h:37,

             from calibperson-r.cc:32:

/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here

template class auto_ptr;

                        ^~~~~~~~

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c simple-example.cc -o simple-example.o

In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ../inst/include/microsimulation.h:149,

             from simple-example.cc:1:

/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template T * get_pointer(std::auto_ptr const& p)

                                    ^~~~~~~~

In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,

             from /usr/include/c++/7/locale:43,

             from /usr/include/c++/7/iomanip:43,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,

             from ../inst/include/microsimulation.h:37,

             from simple-example.cc:1:

/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here

template class auto_ptr;

                        ^~~~~~~~

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c simple-example2.cc -o simple-example2.o

In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ../inst/include/microsimulation.h:149,

             from simple-example2.cc:1:

/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template T * get_pointer(std::auto_ptr const& p)

                                    ^~~~~~~~

In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,

             from /usr/include/c++/7/locale:43,

             from /usr/include/c++/7/iomanip:43,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,

             from ../inst/include/microsimulation.h:37,

             from simple-example2.cc:1:

/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here

template class auto_ptr;

                        ^~~~~~~~

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c illness-death.cpp -o illness-death.o

In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ../inst/include/microsimulation.h:149,

             from illness-death.cpp:1:

/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template T * get_pointer(std::auto_ptr const& p)

                                    ^~~~~~~~

In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,

             from /usr/include/c++/7/locale:43,

             from /usr/include/c++/7/iomanip:43,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include/RcppCommon.h:52,

             from ../inst/include/microsimulation.h:37,

             from illness-death.cpp:1:

/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here

template class auto_ptr;

                        ^~~~~~~~

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ssim.cc -o ssim.o

In file included from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/bind/mem_fn.hpp:25:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/mem_fn.hpp:22,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:18,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ssim.cc:27:

/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/get_pointer.hpp:48:40: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]

template T * get_pointer(std::auto_ptr const& p)

                                    ^~~~~~~~

In file included from /usr/include/c++/7/memory:80:0,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/function_base.hpp:16,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function/detail/prologue.hpp:17,

             from /home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/function.hpp:30,

             from ../inst/include/siena/ssim.h:28,

             from ssim.cc:27:

/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here

template class auto_ptr;

                        ^~~~~~~~

g++ -I"/usr/share/R/include" -DNDEBUG -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include" -I"/home/e/R/x86_64-pc-linux-gnu-library/3.5/BH/include" -I. -DVERSION=\"1.7.6\" -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i39faS/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RngStream.cpp -o RngStream.o

g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o microsimulation.so microsimulation.o cervical.o person-r.o calibperson-r.o simple-example.o simple-example2.o illness-death.o ssim.o RngStream.o -L/usr/lib/R/lib -lR

ar cr ../inst/lib/libmicrosimulation.a microsimulation.o cervical.o person-r.o calibperson-r.o simple-example.o simple-example2.o illness-death.o ssim.o RngStream.o

ar: ../inst/lib/libmicrosimulation.a: No such file or directory

Makevars:12: recipe for target 'staticLibrary' failed

make: *** [staticLibrary] Error 1

ERROR: compilation failed for package ‘microsimulation’

Error in i.p(...) :

(converted from warning) installation of package ‘/tmp/RtmpqzhOzO/file12d9267a618/microsimulation_1.1.tar.gz’ had non-zero exit status

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/mclements/microsimulation/issues/1#issuecomment-466485319, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAiBCdQtRSModFXgnyHO6SeTblL6eHxCks5vQC4fgaJpZM4bITKv.

När du skickar e-post till Karolinska Institutet (KI) innebär detta att KI kommer att behandla dina personuppgifter. Här finns information om hur KI behandlar personuppgifterhttps://ki.se/medarbetare/integritetsskyddspolicy.

Sending email to Karolinska Institutet (KI) will result in KI processing your personal data. You can read more about KI’s processing of personal data herehttps://ki.se/en/staff/data-protection-policy.

andreasakarlsson commented 5 years ago

I came to the same conclusion. It can be built from shell, but not from devtools.

I am also getting this error with remotes::install_github('mclements/microsimulation'). It may be that install_github does not cope with the static binary - but I am not certain how to debug install_github. Can you try: git clone https://github.com/mclements/microsimulation.git && R CMD INSTALL microsimulation This works for me. --- Mark On 22/2/19 6:51 pm, Enzo wrote: I have the same problem on Ubuntu:

andreasakarlsson commented 5 years ago

Devtools version 2.0.1 is recent on CRAN. If I install the previous devtools version, 1.13.6, installing the microsimulation package using devtools works as expected again. I'm not sure if this change is intended. If you wish to install the previous version you can use this:

install.packages("https://cran.r-project.org/src/contrib/Archive/devtools/devtools_1.13.6.tar.gz", repos=NULL, type="source")

andreasakarlsson commented 5 years ago

Submitted this as a devtools issue: https://github.com/r-lib/devtools/issues/2001#issue-414162114

mclements commented 3 years ago

This is an unresolved upstream issue with devtools due to our compiling a static library. As the microsimulation package is now on CRAN, this bug may be less of an issue -- either install from CRAN for a slightly older version or pull/clone from GitHub and install locally.

We could resolve this issue if we moved to a header-only library, but that may be difficult with the use of static variables for linking with R's random numbers.