-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: invalid redefinition of constant with R library #418
Comments
I'm able to replicate on recent Julia, R and RCall: julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 8 × Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
julia> using Pkg; Pkg.status()
Status `/private/var/folders/yy/nyj87tsn7093bb7d84rl64rh0000gp/T/jl_LF3K4R/Project.toml`
[6f49c342] RCall v0.14.1
julia> reval("version")
RObject{VecSxp}
_
platform aarch64-apple-darwin20.0.0
arch aarch64
os darwin20.0.0
system aarch64, darwin20.0.0
status
major 4
minor 3.3
year 2024
month 02
day 29
svn rev 86002
language R
version.string R version 4.3.3 (2024-02-29)
nickname Angel Food Cake |
If we disable name normalization, then things seem to work: julia> ape = rimport("ape"; normalizenames=false)
Main.__anonymous__
julia> using .ape
julia> node_depth_edgelength
RObject{VecSxp}
$name
[1] "node_depth_edgelength"
$address
<pointer: 0x6000010dbd60>
attr(,"class")
[1] "RegisteredNativeSymbol"
$dll
DLL name: ape
Filename:
/Users/palday/.julia/conda/3/aarch64/lib/R/library/ape/libs/ape.dylib
Dynamic lookup: FALSE
$numParameters
[1] 5
attr(,"class")
[1] "CRoutine" "NativeSymbolInfo" But that actually hiding the real problem: |
I wonder if |
@ararslan That would be a breaking change (which I'm not adverse to), but I would like to gather a few more breaking changes first. |
Hello!
I am trying to load the r package ape from within julia using
RCall
.It fails when trying to load it with the
@rlibrary
macro:however, it works when calling library inside an R string (i.e., using
R""
):My guess is that something happens when loading ape's namespace but I don't understand why the macro fails while the R string does not. I have been unable to find a similar case in earlier issues.
Thanks in advance,
Gustavo
The text was updated successfully, but these errors were encountered: