[R-SIG-Mac] compilation problem

3 views
Skip to first unread message

Kenneth Knoblauch

unread,
May 9, 2022, 4:27:54 AM5/9/22
to r-si...@r-project.org
Hi,

When compiling packages with C/Fortran code, I'm frequently getting the
following sort of error at the stage of testing if package can be
installed
from temporary location:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'akima' in dyn.load(file,
DLLpath = DLLpath, ...):
unable to load shared object
'/Users/ken/Library/R/x86_64/4.2/library/00LOCK-akima/00new/akima/libs/akima.so':
dlopen(/Users/ken/Library/R/x86_64/4.2/library/00LOCK-akima/00new/akima/libs/akima.so,
6): Symbol not found: ___addtf3
Referenced from: /usr/local/lib/libquadmath.0.dylib
Expected in: /usr/local/lib/libgcc_s_x86_64.1.dylib
in /usr/local/lib/libquadmath.0.dylib
Error: loading failed
Execution halted
ERROR: loading failed

Any suggestions about how to fix this? If it is a PATH problem, how do
I set that so that it is correct when I start up R?

Thank you.

best,

Ken

> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK:
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib


locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.2.0 tools_4.2.0

> Sys.getenv()
.
.
.
PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
.
.
.


--
Kenneth Knoblauch
Inserm U1208
Stem-cell and Brain Research Institute
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr/user/1453

_______________________________________________
R-SIG-Mac mailing list
R-SI...@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Prof Brian Ripley

unread,
May 9, 2022, 5:12:41 AM5/9/22
to r-si...@r-project.org
On 09/05/2022 09:27, Kenneth Knoblauch wrote:
> Hi,
>
> When compiling packages with C/Fortran code, I'm frequently getting the
> following sort of error at the stage of testing if package can be installed
> from temporary location:
>
> ** testing if installed package can be loaded from temporary location
> Error: package or namespace load failed for 'akima' in dyn.load(file,
> DLLpath = DLLpath, ...):
> unable to load shared object
> '/Users/ken/Library/R/x86_64/4.2/library/00LOCK-akima/00new/akima/libs/akima.so':
>
> dlopen(/Users/ken/Library/R/x86_64/4.2/library/00LOCK-akima/00new/akima/libs/akima.so,
>
> 6): Symbol not found: ___addtf3
> Referenced from: /usr/local/lib/libquadmath.0.dylib
> Expected in: /usr/local/lib/libgcc_s_x86_64.1.dylib
> in /usr/local/lib/libquadmath.0.dylib
> Error: loading failed
> Execution halted
> ERROR: loading failed
>
> Any suggestions about how to fix this?  If it is a PATH problem, how do
> I set that so that it is correct when I start up R?

Can you start by telling us which Fortran compiler you have installed
(the manual mentions several), and where
/usr/local/lib/libquadmath.0.dylib came from? AFAIK all the recommended
compilers install it in /usr/local/gfortran/lib.

I'd try moving /usr/local/lib/libquadmath.0.dylib aside (and any other
libs that look like those in /usr/local/gfortran/lib).
Brian D. Ripley, rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

Kenneth Knoblauch

unread,
May 10, 2022, 5:55:56 AM5/10/22
to r-sig-mac

First off, thank you very much. I followed your instructions and now
all but 2 of the packages compile without error.

To answer your questions (which are perhaps moot, now), I installed the
compiler Intel Macs: gfortran-8.2-Mojave.dmg (ca. 87MB, GNU Fortran 8.2
from F.X.Coudert) from https://mac.r-project.org/tools/. I don't know
where /usr/local/lib/libquadmath.0.dylib came from.

As you suggested, I moved aside the common packages between
/usr/local/lib and /usr/local/gfortran/lib that are in /usr/local/lib,
and as I indicated, nearly all of the packages compile. The 2 that
don't are for other reasons.

Thank you again.
> --
> Brian D. Ripley, ripley using stats.ox.ac.uk
> Emeritus Professor of Applied Statistics, University of Oxford

--
Kenneth Knoblauch
Inserm U1208
Stem-cell and Brain Research Institute
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr/user/1453

Reply all
Reply to author
Forward
0 new messages