josherrickson / rlemon

rlemon - R interface to C++ LEMON graph library
http://errickson.net/rlemon/
8 stars 3 forks source link

Errors from `check` #1

Closed josherrickson closed 4 years ago

josherrickson commented 4 years ago

In case this helps with debugging, when trying to run devtools::check() on my system (Mac), I receive the following

> check()
Updating minCostFlow documentation
First time using roxygen2. Upgrading automatically...
Warning: roxygen2 requires Encoding: UTF-8
Loading minCostFlow
Re-compiling minCostFlow
─  installing *source* package ‘minCostFlow’ ...
   ** using staged installation
   ** libs
   g++-9 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I/usr/local/include  -Ilemon_minFlowAlgs -fPIC  -mtune=native -g -O2 -Wall -pedantic -Wconversion -c RcppExports.cpp -o RcppExports.o
   In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/utils/tinyformat.h:40,
                    from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/RcppCommon.h:70,
                    from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp.h:27,
                    from RcppExports.cpp:4:
   /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/utils/tinyformat/tinyformat.h:928:21: warning: conversion from 'long unsigned int' to 'int' may change value [-Wconversion]
     928 | detail::FormatListN<sizeof...(Args)> makeFormatList(const Args&... args)
         |                     ^~~~~~~~~~~~~~~
   /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/utils/tinyformat/tinyformat.h: In function 'tinyformat::detail::FormatListN<sizeof... (Args)> tinyformat::makeFormatList(const Args& ...)':
   /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/utils/tinyformat/tinyformat.h:930:32: warning: conversion from 'long unsigned int' to 'int' may change value [-Wconversion]
     930 |     return detail::FormatListN<sizeof...(args)>(args...);
         |                                ^~~~~~~~~~~~~~~
   In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/Vector.h:69,
                    from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp.h:40,
                    from RcppExports.cpp:4:
   /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/String.h: In member function 'SEXPREC* Rcpp::String::get_sexp_impl() const':
   /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/String.h:376:62: warning: conversion from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
     376 |             return Rf_mkCharLenCE(buffer.c_str(), buffer.size(), enc);
         |                                                   ~~~~~~~~~~~^~
   g++-9 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o minCostFlow.so RcppExports.o min_cost_flow.rcpp.o -Ilemon_minFlowAlgs -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
   ld: warning: ignoring file min_cost_flow.rcpp.o, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )
   installing to /private/var/folders/5n/z5pz3bnx16sfm9kqx6cg2zb00000gn/T/Rtmpyteqdk/devtools_install_14cf154ba9a76/00LOCK-package_minCostFlow/00new/minCostFlow/libs
   ** checking absolute paths in shared objects and dynamic libraries
─  DONE (minCostFlow)
Error in dyn.load(dllfile) :
  unable to load shared object '/Users/josh/repositories/R/rlemon/package_minCostFlow/src/minCostFlow.so':
  dlopen(/Users/josh/repositories/R/rlemon/package_minCostFlow/src/minCostFlow.so, 6): Symbol not found: __Z7minFlowSt6vectorIiSaIiEES1_S1_S1_S1_
  Referenced from: /Users/josh/repositories/R/rlemon/package_minCostFlow/src/minCostFlow.so
  Expected in: flat namespace
 in /Users/josh/repositories/R/rlemon/package_minCostFlow/src/minCostFlow.so