https://github.com/cpanse/mono.issue.21320
code snippet to reproduce mono isse 21320
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.3%) to scientific vocabulary
Repository
code snippet to reproduce mono isse 21320
Basic Info
- Host: GitHub
- Owner: cpanse
- Language: C++
- Default Branch: main
- Homepage: https://github.com/mono/mono/issues/21320
- Size: 23.4 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
mono.issue.21320
code snippet to reproduce https://github.com/mono/mono/issues/21320
- requirements:
- Linux
- current mono (v6.12)
- g++
- R 4.1 and package Rcpp
using plain C++ code
$ msbuild && make
g++ -c main.cpp `pkg-config --cflags mono-2` -std=gnu++14 -DMONO_EMBED_CPP_MAIN -fPIC
g++ -c -o hello.o hello.cpp `pkg-config --cflags mono-2` -lm -std=gnu++14 -DMONO_EMBED_CPP_MAIN -fPIC
gcc -shared -o libhello.so hello.o `pkg-config --libs mono-2` -std=gnu++14 -DMONO_EMBED_CPP_MAIN -fPIC
g++ -o main main.o -std=gnu++14 -DMONO_EMBED_CPP_MAIN -fPIC -L`pwd` -lhello
cpanse@fgcz-c-073:~/__checkouts/mono.issue.21320 > make && ./main
g++ -c main.cpp `pkg-config --cflags mono-2` -std=gnu++14 -DMONO_EMBED_CPP_MAIN -fPIC
g++ -c -o hello.o hello.cpp `pkg-config --cflags mono-2` -lm -std=gnu++14 -DMONO_EMBED_CPP_MAIN -fPIC
gcc -shared -o libhello.so hello.o `pkg-config --libs mono-2` -std=gnu++14 -DMONO_EMBED_CPP_MAIN -fPIC
g++ -o main main.o -std=gnu++14 -DMONO_EMBED_CPP_MAIN -fPIC -L`pwd` -lhello
DomainName=rawrrrHello
hello.h
OpenFile...
INFO[0]: file:///home/cpanse/__checkouts/mono.issue.21320/helloRcpp.exe
INFO[1]: 995
INFO[2]: System.Diagnostics.Process (/home/cpanse/__checkouts/mono.issue.21320/main)
INFO[3]: currentProcess.Id: 39317
INFO[4]: PrivateMemorySize64 (KB): 34400
INFO[5]: Error message:
INFO[6]: raw file name: hello.h
using Rcpp and mono v6.12 ❌
``` $ export MONOLOGLEVEL=debug $ export MONOLOGMASK=dll,cfg $ R --no-save < Hello.R
...
R> R$openFile() OpenFile... Mono: DllImport attempting to load: '/usr/lib/../lib/libmono-native.so'. Mono: DllImport error loading library '/usr/lib/../lib/libmono-native.so': '/usr/lib/../lib/libmono-native.so: undefined symbol: monoaddinternalcallwithflags'. Mono: DllImport error loading library '/usr/lib/../lib/libmono-native.so': '/usr/lib/../lib/libmono-native.so: undefined symbol: monoaddinternalcallwithflags'. Mono: DllImport error loading library '/usr/lib/../lib/libmono-native.so': '/usr/lib/../lib/libmono-native.so: undefined symbol: monoaddinternalcallwithflags'. Mono: DllImport error loading library '/usr/lib/../lib/libmono-native.so': '/usr/lib/../lib/libmono-native.so: undefined symbol: monoaddinternalcallwithflags'. Mono: DllImport error loading library '/usr/lib/../lib/libmono-native.so': '/usr/lib/../lib/libmono-native.so: undefined symbol: monoaddinternalcallwith_flags'. Mono: DllImport unable to load library '/usr/lib/../lib/libmono-native.so'. Mono: DllImport attempting to load: '/usr/lib/../lib/libmono-native.so'. ...
```

using Rcpp and mono v5.18 ✅
``` cpanse@fgcz-c-073:~/__checkouts/mono.issue.21320 (main)> R --no-save < Hello.R
R version 4.1.1 (2021-08-10) -- "Kick Things" Copyright (C) 2021 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.
R> #R
R>
R> Sys.setenv("PKGCPPFLAGS"="pkg-config --cflags mono-2 -O3")
R> Sys.setenv("PKGCXXFLAGS"="pkg-config --cflags mono-2 -O3")
R> Sys.setenv("PKG_LIBS"="pkg-config --libs mono-2")
R>
R>
R> Rcpp::sourceCpp("hello.cpp", cacheDir = "/tmp/cpanse/Hello/", showOutput=TRUE, verbose=TRUE, rebuild = TRUE)
Generated extern "C" functions
include
ifdef RCPPUSEGLOBAL_ROSTREAM
Rcpp::Rostream
endif
Generated R functions
.sourceCpp_39_DLLInfo <- dyn.load('/tmp/cpanse/Hello/sourceCpp-x8664-pc-linux-gnu-1.0.7/sourcecppaecb61c06d74/sourceCpp_40.so')
library(Rcpp)
populate( Rcpp::Module("RawrrMod",.sourceCpp_39_DLLInfo), environment() )
rm(.sourceCpp_39_DLLInfo)
Building shared library
DIR: /tmp/cpanse/Hello/sourceCpp-x8664-pc-linux-gnu-1.0.7/sourcecppaecb61c06d74
/usr/lib/R/bin/R CMD SHLIB --preclean -o 'sourceCpp40.so' 'hello.cpp'
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG pkg-config --cflags mono-2 -O3 -I"/home/cpanse/R/x8664-pc-linux-gnu-library/4.1/Rcpp/include" -I"/home/cpanse/checkouts/mono.issue.21320" pkg-config --cflags mono-2 -O3 -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -DFORTIFYSOURCE=2 -g -c hello.cpp -o hello.o
g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-z,relro -o sourceCpp40.so hello.o -L/usr/lib/pkgconfig/../../lib -lmono-2.0 -lm -lrt -ldl -lpthread -L/usr/lib/R/lib -lR
R>
R> f <- "hello.h"
R>
R>
R> R <- new(Rawrr)
R> R$setDomainName("Hello")
DomainName=rawrrrHello
R> R$createObject()
monoobjectnew ... [DONE]
monoruntimeobjectinit ... [DONE]
R> R$setRawFile(f)
hello.h
R> R$get_info()
INFO[0]: file:///home/cpanse/checkouts/mono.issue.21320/helloRcpp.exe
INFO[1]:
INFO[2]: System.Diagnostics.Process (/usr/lib/R/bin/exec/R)
INFO[3]: currentProcess.Id: 44747
INFO[4]: PrivateMemorySize64 (KB): 96716
INFO[5]: Error message:
INFO[6]: raw file name: hello.h
[1] 0
R> R$openFile()
OpenFile...
R> R$getinfo()
INFO[0]: file:///home/cpanse/checkouts/mono.issue.21320/helloRcpp.exe
INFO[1]: 995
INFO[2]: System.Diagnostics.Process (/usr/lib/R/bin/exec/R)
INFO[3]: currentProcess.Id: 44747
INFO[4]: PrivateMemorySize64 (KB): 96716
INFO[5]: Error message:
INFO[6]: raw file name: hello.h
[1] 0
R>
R> packageVersion("Rcpp")
[1] '1.0.7'
R> # Sys.getenv()
R>
cpanse@fgcz-c-073:~/_checkouts/mono.issue.21320 (main)>
```
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0