CLI: Renjin package

13 views
Skip to first unread message

per.n...@gmail.com

unread,
Jul 10, 2021, 12:34:35 PMJul 10
to Renjin
Hi,

Alex showed me something nice yesterday that I have been trying to replicate.

The Renjin cli can convert a CRAN package to a Renjin package. I cannot get it to work however. This is what I did:

1. Download a package from CRAN (i took bssm_1.1.5.tar.gz from https://cran.r-project.org/src/contrib/bssm_1.1.5.tar.gz)
2. Unzip it to a local directory
3. cd into that directory
4. type renjin package

result is
```
~/Downloads/bssm$ renjin package
[INFO]  Resolving dependencies...
[INFO]  Resolving transitive dependencies...
[INFO]  Downloading dependencies...
java.lang.UnsupportedOperationException: TODO
at org.renjin.cli.build.PackageBuild.setupNativeCompilation(PackageBuild.java:114)
at org.renjin.packaging.PackageBuilder.compileNativeSources(PackageBuilder.java:99)
at org.renjin.packaging.PackageBuilder.build(PackageBuilder.java:59)
at org.renjin.cli.build.Builder.buildPackage(Builder.java:60)
at org.renjin.cli.build.PackageBuildCommand.tryRun(PackageBuildCommand.java:32)
at org.renjin.cli.build.BuildCommand.run(BuildCommand.java:26)
at org.renjin.cli.build.Builder.execute(Builder.java:54)
at org.renjin.cli.Main.main(Main.java:51)
```
Looking in the source for PackageBuild on master line 114 indeed says 
public void setupNativeCompilation() {
    throw new UnsupportedOperationException("TODO");
But I am pretty sure Alex showed it working during the google meetup yesterday. Is there some other way (e.g. it is implemented in another branch or I should use some other command) to get this to work?

Best regards,
Per

Bertram, Alexander

unread,
Jul 11, 2021, 3:45:56 AMJul 11
to renji...@googlegroups.com
Hi Per,

The command line tool doesn't yet support packages with C/C++/Fortran sources. 

My idea was for the command line tool to launch Vagrant to run configure and make, but it's a bit tricky because Renjin's C headers need to be unpacked and made accessible on the Vagrant file system.

Might be worth publishing a separate Vagrant box with everything set up?


We could just host the box on renjin.org, might be easier than setting up deployment to Vagrant cloud.

Alex



--
You received this message because you are subscribed to the Google Groups "Renjin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to renjin-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/renjin-dev/59f19fe5-fa97-400e-9f3f-a29257772bbbn%40googlegroups.com.

per.n...@gmail.com

unread,
Jul 13, 2021, 4:16:16 AMJul 13
to Renjin
I see, thank you for the explanation!

Have you explored the idea of creating static versions of gcc that could be used in the "Renjin native code compiler"? If we have that then there would be no need for Vagrant I think. Not sure how feasible that would be to do for Windows but a quick search revealed that it has been done on Linux for several versions of gcc before (4.6 and 5.3)...

Best regards,
Per

Reply all
Reply to author
Forward
0 new messages