[Rcpp-devel] Using cmake to build RInside examples (segfault)

Gaurav Veda vedagaurav at gmail.com
Wed Oct 7 08:51:26 CEST 2015


Hi Dirk,

In general, please do not cross post. If you decide this is the better
> venue,
> maybe delete the post on SO?
>

Just deleted the post on SO.


> | standard directory to /home/thenoob/tmp/RInside/src_cmake. Create a
> separate
> | build directory /home/thenoob/tmp/RInside/build and run cmake
> ../src_cmake/
> | cmake . This runs without any error. Then run make. This spits out a
> bunch of
> | warnings, but builds the executable.
> |
> | <code>
>
> [... snip ...]
>
> Those look like harmless compiler warnings.
>

I see. I was surprised that these warnings do not show up when I used the
provided Makefile. That build finished without any warnings. Even though
that's the only way that's supported, I'm hoping someone here uses cmake
successfully to use RInside, and will be kind enough to help :)


> | However, as soon as I run the executable, it throws a segmentation
> fault. I
> | should mention that my R_HOME variable is not set and my LD_LIBRARY_PATH
> | contains
> /statdev/ext/r/current/lib64/R/lib:/statdev/ext/r/current/lib64/R/
> | library/RInside/lib.
>
> Your non-standard locations are the like source of trouble.
>
> | Any pointers would be great.
>
> You can try to study what happens with the Makefile, and try to to make the
> CMake file do the same.
>
> In general, try to remain with the assumptions, eg see the these lines at
> the
> top of GNUmakefile:
>
> ## comment this out if you need a different version of R,
> ## and set set R_HOME accordingly as an environment variable
> R_HOME :=               $(shell R RHOME)
>
>
> That would appear to apply to your situation.
>

Thanks Dirk. I'll try to go down this path and post a solution on this list
if I find one.


> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20151006/1b82bb04/attachment.html>


More information about the Rcpp-devel mailing list