Skip to content

Installing saucer on Fedora

chibisi edited this page Dec 24, 2023 · 2 revisions

Installing R

  1. Install R development and Rmath library
dnf install R

Installing the LDC compiler

  1. Install the LDC compiler
dnf install ldc

Install devtools in R

  1. Install devtools dependencies
dnf -y install openssl-devel gnutls-devel libcurl-devel.x86_64 harfbuzz-devel fribidi-devel freetype-devel libpng-devel libtiff-devel libjpeg-devel

Now install devtools in R

install.packages("devtools")

Install saucer

Then install saucer:

devtools::install_github("chibisi/saucer", ref = "main")

Check the installation works

Run the Hello World test compilation in R:

codeExample1 = '
import std.stdio: writeln;
@Export() auto helloWorld()
{
    writeln("Hello World!");
    return;
}
'
saucer::dfunctions(codeExample1)

Then run the example.

helloWorld()

Possible ld issue encountered on Fedora

In some installations ld can not find the respective R DLL (.so) file so it must be manually symbolically linked using something like:

ln -s /usr/lib64/R/lib/libR.so /usr/lib64/libR.so