<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi All,<div><br></div><div>So I tried to create a github repo : <a href="https://github.com/2005m/RLibTorrent">https://github.com/2005m/RLibTorrent</a></div><div><br></div><div>As suggested by Ralf, I started on Ubuntu and installed libtorrent.</div><div>I have few issues</div><div><br></div><div>When I do R CMD build RLibTorrent and then R CMD check RLibTorrent_1.0.tar.gz , I get an error:</div><div><br></div><div><div>* using log directory ‘/home/morgan/Documents/Packages/RLibTorrent.Rcheck’</div><div>* using R version 3.5.1 (2018-07-02)</div><div>* using platform: x86_64-pc-linux-gnu (64-bit)</div><div>* using session charset: UTF-8</div><div>* checking for file ‘RLibTorrent/DESCRIPTION’ ... OK</div><div>* checking extension type ... Package</div><div>* this is package ‘RLibTorrent’ version ‘1.0’</div><div>* checking package namespace information ... OK</div><div>* checking package dependencies ... OK</div><div>* checking if this is a source package ... OK</div><div>* checking if there is a namespace ... OK</div><div>* checking for executable files ... OK</div><div>* checking for hidden files and directories ... OK</div><div>* checking for portable file names ... OK</div><div>* checking for sufficient/correct file permissions ... OK</div><div>* checking whether package ‘RLibTorrent’ can be installed ... ERROR</div><div>Installation failed.</div><div>See ‘/home/morgan/Documents/Packages/RLibTorrent.Rcheck/00install.out’ for details.</div><div>* DONE</div><div><br></div><div>Status: 1 ERROR</div><div>See</div><div>  ‘/home/morgan/Documents/Packages/RLibTorrent.Rcheck/00check.log’</div><div>for details.</div></div><div><br></div><div>In the file 00Install.out, I have the following:</div><div><br></div><div><div>* installing *source* package ‘RLibTorrent’ ...</div><div>** libs</div><div>g++  -I"/usr/share/R/include" -DNDEBUG -I"/usr/lib/x86_64-linux-gnu" -I"/usr/include/libtorrent" -I"/usr/include/boost" -I"/usr/include" -I"/home/morgan/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include"    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-1SEA_D/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o</div><div>g++  -I"/usr/share/R/include" -DNDEBUG -I"/usr/lib/x86_64-linux-gnu" -I"/usr/include/libtorrent" -I"/usr/include/boost" -I"/usr/include" -I"/home/morgan/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include"    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-1SEA_D/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c get_torrent_info.cpp -o get_torrent_info.o</div><div>g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RLibTorrent.so RcppExports.o get_torrent_info.o -L/usr/lib/R/lib -lR</div><div>installing to /home/morgan/Documents/Packages/RLibTorrent.Rcheck/RLibTorrent/libs</div><div>** R</div><div>** byte-compile and prepare package for lazy loading</div><div>** help</div><div>*** installing help indices</div><div>** building package indices</div><div>** testing if installed package can be loaded</div><div>Error: package or namespace load failed for ‘RLibTorrent’ in dyn.load(file, DLLpath = DLLpath, ...):</div><div> unable to load shared object '/home/morgan/Documents/Packages/RLibTorrent.Rcheck/RLibTorrent/libs/RLibTorrent.so':</div><div>  /home/morgan/Documents/Packages/RLibTorrent.Rcheck/RLibTorrent/libs/RLibTorrent.so: undefined symbol: _ZN10libtorrent6to_hexEPKciPc</div><div>Error: loading failed</div><div>Execution halted</div><div>ERROR: loading failed</div><div>* removing ‘/home/morgan/Documents/Packages/RLibTorrent.Rcheck/RLibTorrent’</div></div><div><br></div><div>I am struggling to solve this issue! Google it but it i didn't help me solve it, because I didn't understand the explanation or the proposed solution was not working for me.</div><div><br></div><div>Any idea what I am doing wrong?</div><div><br></div><div>Thank you</div><div><br></div><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 11, 2019 at 12:01 PM Ralf Stubner <<a href="mailto:ralf.stubner@daqana.com">ralf.stubner@daqana.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11.02.19 10:29, Morgan Morgan wrote:<br>
> I use ubuntu and windows. But the idea would be to make the package<br>
> available to all users including Mac OS.<br>
<br>
I would start with Ubuntu, since there it should be sufficient to use<br>
<br>
sudo apt-get install libtorrent-dev<br>
<br>
together with<br>
<br>
PKG_LDFLAGS=-ltorrent<br>
<br>
in src/Makevars. After that I would focus on the functions to put into<br>
the package. Once the package has a clearer shape, I would tackle the<br>
cross-platform issues.<br>
<br>
cheerio<br>
ralf<br>
<br>
-- <br>
Ralf Stubner<br>
Senior Software Engineer / Trainer<br>
<br>
daqana GmbH<br>
Dortustraße 48<br>
14467 Potsdam<br>
<br>
T: +49 331 23 61 93 11<br>
F: +49 331 23 61 93 90<br>
M: +49 162 20 91 196<br>
Mail: <a href="mailto:ralf.stubner@daqana.com" target="_blank">ralf.stubner@daqana.com</a><br>
<br>
Sitz: Potsdam<br>
Register: AG Potsdam HRB 27966<br>
Ust.-IdNr.: DE300072622<br>
Geschäftsführer: Dr.-Ing. Stefan Knirsch, Prof. Dr. Dr. Karl-Kuno Kunze<br>
<br>
</blockquote></div>