Using an older version of R: compilation issues, possible alternatives?

Hi all,
I need to install an old R core for some analysis alongside my current R 4.0.1 installation. It is not present in the Arch Linux Archives, so I need to compile it from source, but I am encountering some issues.
I am following these installation instructions on the RStudio docs and doing the following:

export R_VERSION=3.4.1
curl -O https://cran.rstudio.com/src/base/R-3/R-${R_VERSION}.tar.gz
tar -xzvf R-${R_VERSION}.tar.gz
cd R-${R_VERSION}
./configure \
    --prefix=/opt/R/${R_VERSION} \
    --enable-memory-profiling \
    --enable-R-shlib \
    --with-blas \
    --with-lapack \
    --enable-shared \
    CFLAGS=-fPIC \
    CXXFLAGS=-fPIC \
    FPICFLAGS=-fPIC \
    CPICFLAGS=-fPIC 

make

but, despite adding the flags, I keep getting the same compilation error (full output below):

/usr/bin/ld: connections.o: relocation R_X86_64_PC32 against symbol `R_OutputCon' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

I tried installing the binary taken from archive.org, but installing it with pacman -U just downgrades the current R version I have (whereas I would need to use both in parallel for a while).

Have you got any idea on how I can manage to compile it? Or, in alternative, is there another way of installing it in parallelel to the current R version?

Thank you in advance!

[ inxi -Fx ] [ compilation output ]

If the code runs with an even older R version than 3.4.1 (to be more precise, version 2.15.3), have a look at this AUR package: https://aur.archlinux.org/packages/r-deprecated-215/ Otherwise, possibly you can adjust the PKGBUILD for version 3.4.1.

An older version might work, but I have a list of ~100 packages to install as dependencies that might break or—worse—alter the results. Since I need to check if the results were reproducible in the first instance to provide a report, it would be definitely be better using a version as close to 3.4.1 as possible.

What would the PKGBUILD solution be?

I tried to build version 3.4.1 using the PKGBUILD for version 2.15.3 but the linker reports errors:

...
gfortran  -fopenmp -fpic  -g -O2  -c xxxpr.f -o xxxpr.o
gcc -shared -fopenmp -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now  -o libR.so CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o radixsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o   `ls ../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/tre/libtre.a    -lblas -lgfortran -lm -lquadmath   -lreadline  -lpcre -llzma -lbz2 -lz -ltirpc -lrt -ldl -lm -licuuc -licui18n  
/usr/bin/ld: Rdynload.o:(.bss+0x40): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: Renviron.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: RNG.o:(.bss+0x10): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: agrep.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: apply.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: arithmetic.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: array.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: attrib.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: bind.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: builtin.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: character.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: coerce.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: colors.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: complex.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: connections.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: context.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: cum.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: dcf.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: datetime.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: debug.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: deparse.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: devices.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: dotcode.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: dounzip.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: dstruct.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: duplicate.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: edit.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: engine.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: envir.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: errors.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: eval.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: format.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: gevents.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: gram.o:(.bss+0x54): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: gram-ex.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: graphics.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: grep.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: identical.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: inlined.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: inspect.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: internet.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: iosupport.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: lapack.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: list.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: logic.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: main.o:(.bss+0x58): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: mapply.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: match.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: memory.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: names.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: objects.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: options.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: paste.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: platform.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: plot.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: plot3d.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: plotmath.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: print.o:(.bss+0x40): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: printarray.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: printvector.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: printutils.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: qsort.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: radixsort.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: random.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: raw.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: registration.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: relop.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: saveload.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: scan.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: seq.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: serialize.o:(.bss+0x8): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: sort.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: source.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: split.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: sprintf.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: startup.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: subassign.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: subscript.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: subset.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: summary.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: sysutils.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: times.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: unique.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: util.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: version.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: g_alab_her.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: g_cntrlify.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: g_fontdb.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: g_her_glyph.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: ../appl/optim.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: ../unix/dynload.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: ../unix/Rembedded.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: ../unix/sys-std.o:(.bss+0x8): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: ../unix/system.o:(.bss+0xc8): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: ../unix/sys-unix.o:(.bss+0x0): multiple definition of `ptr_R_ProcessEvents'; ../unix/system.o:(.bss+0x20): first defined here
/usr/bin/ld: ../unix/sys-unix.o:(.bss+0x8): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: ../unix/X11.o:(.bss+0x0): multiple definition of `R_OutputCon'; CommandLineArgs.o:(.bss+0x0): first defined here
/usr/bin/ld: connections.o: relocation R_X86_64_PC32 against symbol `R_OutputCon' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[3]: *** [Makefile:177: libR.so] Fehler 1
make[3]: Verzeichnis „/home/photon/Schreibtisch/r-deprecated-341/src/R-3.4.1/src/main“ wird verlassen
make[2]: *** [Makefile:135: R] Fehler 2
make[2]: Verzeichnis „/home/photon/Schreibtisch/r-deprecated-341/src/R-3.4.1/src/main“ wird verlassen
make[1]: *** [Makefile:28: R] Fehler 1
make[1]: Verzeichnis „/home/photon/Schreibtisch/r-deprecated-341/src/R-3.4.1/src“ wird verlassen
make: *** [Makefile:61: R] Fehler 1

Unfortunately, I don't know what causes them. I used this PKGBUILD (basically, just the 2.15.3 PKGBUILD with the version replace with 3.4.1 on some positions:

# $Id$
# Contributor:	Gergely Daróczi <gergely@snowl.net>
# Based on [r-devel@AUR](http://aur.archlinux.org/packages.php?ID=52561) by Florian Breitwieser <florian.bw@gmail.com>

pkgname=r-deprecated-341
pkgver=341
pkgrel=1
pkgdesc="Language and environment for statistical computing and graphics - deprecated version (3.4.1)"
arch=('i686' 'x86_64')
license=('GPL')
url='https://www.r-project.org/'
depends=('blas' 'lapack' 'bzip2'  'libpng' 'libjpeg' 'libtiff'
         'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
         'tk' 'libxt' 'libxmu' 'pango' 'xz')
makedepends=('gcc-fortran')
options=('!makeflags')
source=('http://cran.rapporter.net/src/base/R-3/R-3.4.1.tar.gz'
	'r-341.desktop'
	'r-341.png')
install=r-341.install

build() {
    cd ${srcdir}/R-3.4.1
    ./tools/rsync-recommended
    ./configure --prefix=/opt/r-341 \
		--enable-R-shlib \
		--with-lapack \
		--with-blas \
		F77=gfortran \
		LIBnn=lib
    make
}

package() {
    cd ${srcdir}/R-3.4.1
    make -j1 DESTDIR=${pkgdir} install

    # install some freedesktop.org compatibility
    install -Dm644 ${srcdir}/r-341.desktop ${pkgdir}/usr/share/applications/r-341.desktop
    install -Dm644 ${srcdir}/r-341.png ${pkgdir}/usr/share/pixmaps/r-341.png

    # move the config directory to /etc and create symlinks
    install -d ${pkgdir}/etc/R-341
    cd ${pkgdir}/opt/r-341/lib/R/etc
    for i in *; do
	mv -f ${i} ${pkgdir}/etc/R-341
	ln -s /etc/R-341/${i} ${i}
    done

    # links
    install -d ${pkgdir}/usr/bin
    ln -s /opt/r-341/bin/R ${pkgdir}/usr/bin/R-341
    ln -s /opt/r-341/bin/Rscript ${pkgdir}/usr/bin/Rscript-341

    # clear up stuffs
    rm -rf ${srcdir}/R-3.4.1
}

md5sums=('3a79c01dc0527c62e80ffb1c489297ea'
         '4997dd1ba89da365ada14afdd3a04196'
         'ba441e25f707d69566b84d90ca071ded')

1 Like

This is becoming annoying. I tried to source compile a more recent version (R 3.4.2) and the result was pretty much the same.
Using an old binary from the Arch Linux Archive for 3.5.2-2 provides the following error at launch:

$ R
/usr/lib64/R/bin/exec/R: error while loading shared libraries: libicuuc.so.63: cannot open shared object file: No such file or directory

Edit: I am an idiot, of course it doesn't do anything, it's a partial downgrade with a binary. I will try to install it from source now.

Edit 2:

3.5.2 fails to compile too:

gcc -shared -fopenmp -L/usr/local/lib64  -o libR.so CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o altrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o radixsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o   `ls ../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/tre/libtre.a    -lblas -lgfortran -lm -lquadmath   -lreadline  -lpcre2-8 -lpcre -llzma -lbz2 -lz -ltirpc -lrt -ldl -lm -licuuc -licui18n  
/usr/bin/ld: ../unix/sys-unix.o:(.bss+0x0): multiple definition of `ptr_R_ProcessEvents'; ../unix/system.o:(.bss+0xa0): first defined here
collect2: error: ld returned 1 exit status

I had the same error with one of my packages which built fine for a long time. Looks like some very basic dependency got updated and leads to such errors. I couldn't figure out what the root of the problem is, but it is certainly not R specific.

Any luck with this?

I tried building version 3.3.3 using the PKGBUILD for the current version (4.0.2) but with no success and same linker errors:

I could fix a similar error in a different package with make CPPFLAGS+=" -fcommon" instead of make in the PKGBUILD.

I have never tried to build an older version of R but as a side note there has been several critical changes in R itself recently.

I think your best chance to get this working is to create a container and run R inside it. This is will also ensure (if this for research purposes) that you can revisit the analysis after a typical lengthy peer review.

Thanks I'll try to do that since I can't make it work, even with the -fcommon flag

I would look up a Docker container with the correct version of Ubuntu and run the container in Manjaro. See this https://cran.r-project.org/bin/linux/ubuntu/README.html.

great thanks!!

Forum kindly sponsored by