[R-pkg-devel] Can't build package but can load it with devtools::load_all()

Satyaprakash Nayak sn248 at cornell.edu
Mon Aug 1 06:32:20 CEST 2016


Just an update - I re-installed libSBML and now

devtools::load_all()


is giving an error

> devtools::load_all()
> Loading Rcppsbml
> Error in dyn.load(dllfile) :
>   unable to load shared object '/<PATH-TO-DIR>/Rcppsbml/src/Rcppsbml.so':
>   dlopen(/<PATH-TO-DIR>/Rcppsbml/src/Rcppsbml.so, 6): Symbol not found:
> __ZN7libsbml10SBMLReader16readSBMLFromFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE


<PATH-TO-DIR> is the path to package directory

Thank you
Satyaprakash Nayak

On Sun, Jul 31, 2016 at 11:32 PM, Satyaprakash Nayak <sn248 at cornell.edu>
wrote:

> Hi
>
> I am trying to build a package with interfaces with C library libSBML
> <http://sbml.org/Software/libSBML> (although a package libSBML exists).
> When I try to build the package using "Clean and Rebuild" command in
> RStudio, I am getting the following error
>
> ** R
>> ** preparing package for lazy loading
>> ** help
>> *** installing help indices
>> ** building package indices
>> ** testing if installed package can be loaded
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>   unable to load shared object
>> '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcppsbml/libs/Rcppsbml.so':
>>
>> dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcppsbml/libs/Rcppsbml.so,
>> 6): Library not loaded: libsbml.5.dylib
>>   Referenced from:
>> /Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcppsbml/libs/Rcppsbml.so
>>   Reason: image not found
>> Error: loading failed
>> Execution halted
>> ERROR: loading failed
>> * removing
>> ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcppsbml’
>> Exited with status 1.
>
>
> However, if I issue the command
>
> devtools::load_all()
>
> after "Clean and Rebuild" command, I get the message
>
> Loading Rcppsbml
>
>
> and I can also use the functions defined in the package! However, as soon
> as I restart my R session, I cannot load the library (understandable, as I
> don't think the package is built correctly).
>
> Based on the error shown, I think libsbml.5.dylib is not being loaded,
> however, it is there in the /usr/local/lib folder.
>
> The code for this package can be found at
>
> https://github.com/sn248/Rcppsbml
>
> Any help in resolving this error would be highly appreciated!
>
> Thank you
> Satyaprakash Nayak
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list