Code Monkey home page Code Monkey logo

rtools-packages's People

Contributors

aadler avatar astamm avatar atheriel avatar eddelbuettel avatar gaborcsardi avatar gnguy avatar grimbough avatar ihnorton avatar ilia-kosenkov avatar javierluraschi avatar jcohen02 avatar jeffreyhanson avatar jeroen avatar jonkeane avatar krlmlr avatar lazka avatar mjwoods avatar muschellij2 avatar nealrichardson avatar rdinnager avatar richardbeare avatar shelnutt2 avatar thisisnic avatar wjones127 avatar xhochy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rtools-packages's Issues

Switching compiler/GCC version

I am getting a window compiler warning which I suspect is a false positive for my package httpgd. This prevents me currently from submitting to CRAN.

Is it possible to upgrade GCC in the rtools msys2 build?

I already tried replacing the mirror links in the mingw directories with the official msys2 mirrors but that upgrades GCC to version 10+ which does not seem work at all. Now I would like to try and upgrade to GCC 8.4 or some GCC 9 version.

Is there a schedule when the next GCC update will be released for Rtools?

Very minor suggestion: delete the .DS_Store file

Thanks indeed for all your brilliant work on Windows packages for R.

A very minor point. I notice in #251 you've committed a .DS_Store file into the repo. As far as I understand those are some kind of macOS system file and you never really want those in repos. So suggest deleting it.

ld error and binutils versioning best practice?

Hi @jeroen, do we need to declare a dependency on "${MINGW_PACKAGE_PREFIX}-binutils" in order to have a (relatively) stable binutils version?

We are hitting a build error while testing a release candidate -- this is in the cmake compiler checks, before even generating the project:

D:/a/_temp/msys/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: unrecognized option '--default-image-base-high'

As far as I can tell, this is quite similar to this issue which is caused by a change in the binutils default LDFLAGS.

I see that you are pulling in msys2 binutils by default here, which I suppose means that the msys2 binutils is used unless a package explicitly mentions binutils in makedepends?

Add gendef.exe

Hi,

I've been trying to install XGboost GPU for R for the last couple of days. Actually gendef.exe, which was in Rtools 3.5, is lacking in Rtools 4.0 and I couldn't build the package with cmake.
Fortunately, it is possible to install Rtools 3.5 without conflict and make the build, but it makes the installation of XGboost a bit painfull. So I suggest to add gendef.exe in rtools40 (but to be honest, I'm quite new to this and it may be a bad idea).

Sincerely,
Maxime

Add ccache

for regular compiles and for building packages.

  • Define ccache package
    • upstream msys2 package works out of the box, perhaps remove man pages
  • Install ccache
    • It seems necessary to install in both {mingw32,mingw64}/{bin,lib}; installing via pacman -U puts it into /usr/{bin,lib}, makepkg-mingw doesn't seem to pick it up from there
  • Update makepkg*.conf
    • sed "/^BUILDENV/ s/!ccache/ccache/"
    • Add `PATH="/mingw{32,64}/lib/ccache/bin:${PATH}"
  • Add /usr/lib/ccache/bin to $PATH
  • Document how to turn off ccache (set CCACHE_DISABLE environment var)

Would you support that? How can I help?

Additional link options when using UCRT libraries?

Thanks for the work in maintaining these packages, they've been really helpful to me. I'm trying to update openssl and libssh2 to debug some issues I'm having with Rhdf5lib under the new ucrt tool chain.

I've successfully built updated versions of both libraries (https://github.com/grimbough/rtools-packages/tree/openssl) and can use them locally. However on my Github action workflow I get linker errors with libcrypto.a reporting undefined reference to sscanf'` (see the "Install dependent packages" section here)

sscanf() seems like its part of the C runtime, and I was wondering if you'd seen this before and whether there was some additional link setting I'm missing. Since it works locally, I guess maybe it's just that my actions runner is configured incorrectly. However I don't run into this issue if I try to use the x64-ucrt libraries you already distribute. With all the various version of R-devel and rtools floating around it's a pretty confusing time in the R for Windows world.

R 4.0 Path to rtools in Windows

  • Uninstalled old R-Tools, removed all PATH related to rtools

  • Uninstalled R 3.5

  • Installed R 4.0 RC, updated libraries all ok when no rebuild required.

  • Installed rtools in default directors rtools40 with windows installer.

  • Added path to C:\rtools40\mingw64\bin. c++ and g++ can be called from command line

  • https://cloud.r-project.org/bin/windows/testing/rtools40.html: No path set in .Renviron

  • Rtools from R not found. Tried dozens of paths variants

> pkgbuild::with_build_tools()
Fehler: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
> devtools::find_rtools()
WARNING: Rtools is required to build R packages, but the version of Rtools previously installed in C:/rtools40 has been deleted.
Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/.

Installing CMake or Other Dependencies

I understand that I can install CMake via pacman in the rtools bash interface. However, is there a recommended way to run pacman on windows from withing R 4.0 or via the installation script of my package?

Is putting a pacman command in configure.win recommended? (I suspect that it should be avoided.)

ZSTD support for GDAL GeoTIFF

It would be nice to have ZSTD compression support for GDAL GeoTIFF (see this issue).

ZSTD is available since GDAL 2.3 when using internal libtiff and if GDAL built against libzstd >=1.0, or if built against external libtiff with zstd support link.

And some discussion here

Rtools cmake not get detected

hello everyone,

I am trying to install/run a Linux compatible static library in windows using Rtools.
I installed all the necessary dependencies required for my library using rtools msys2 shell.
The dependencies include: cmake, python3, libffi
Also, I added everything to the PATH.
I did use find_rtools() it gives me the path to C:/rtools/usr/bin
But when I run the system("cmake ../") it says cmake not found in Rstudio.
Am I doing this right way? How can I use rtools to get cmake running in Rstudio on windows?
How does these dependencies work when using my static library?
Can someone please help me with this?

Thanks

Compiling RStan with 4.0: "string table overflow, file too big"

When trying to compile RStan from Source on CRAN, after a few dozens of files going through I get: (file too big). I have plenty of space on disk, and 24 GByte of Memorey on Windows 10.

C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/as.exe: stan/lang/grammars/term_grammar_inst.o: section .text$_ZN5boost6fusion9extension10deref_implINS0_19struc
t_iterator_tagEE5applyINS0_14basic_iteratorIS3_NS0_27random_access_traversal_tagEN4stan4lang13integrate_odeELi1EEEE4callB5cxx11ERKSB_: string table overflow at offset 10000061                                
C:\Users\Dieter\AppData\Local\Temp\cckn5HZc.s: Assembler messages:                                                                                                                                             
C:\Users\Dieter\AppData\Local\Temp\cckn5HZc.s: Fatal error: can't close stan/lang/grammars/term_grammar_inst.o: file too big                                                                                   
make: *** [C:/R/etc/x64/Makeconf:229: stan/lang/grammars/term_grammar_inst.o] Error 1     


                                                                                                                     

Managing library size

Hi,
This one may be a bit off the wall. I'm still working on the SimpleITK package build. While I have success on local systems I struggle to get the build to complete in time on Azure pipelines. One option that makes things considerably faster on linux is to build ITK and SimpleITK as shared libraries, which leads to the final .so file in R being about 7M instead of 700M. Copying all the shared objects into the package hierarchy produces a working package. I am struggling to achieve the same thing under rtools. My problem at the moment is the various low level itk shared libraries all end up exporting pthreads functions and I get errors when I attempt to link higher level ITK libraries. I've tried various options to disable the linking of system libraries (such as -nodefaultlibs) with the aim of including the necessary libs when linking the final executable. However I then get stuck with missing symbols while building the problem libraries, and no combination of -Wl,--unresolved-symbols=ignore that I can find will fix the problem. As far as I can see, all the rtools packages create libXXX.a files, without any shared libraries outside the R package. Does any of this sound remotely familiar, and if so, what approaches should I look into?

Thanks

ucrt rebuilds

Things to look into

  • Updated winpthreads, gcc, icu, (binutils?)
  • Updated ncurses to 6.2 because the 6.1 url was no longer available
  • python fails a test, test disabled for now
  • pcre2 fails a test, test disabled for now
  • libssh does not build
  • argtable does not build: sed -i.bak 's/EOVERFLOW/MYEOVERFLOW/g' src/arg_int.c
  • aws-sdk-cpp does not build: Remove the -D_WIN32_WINNT hack from the recipe
  • Modify libtiff with --disable-zstd to prevent linking errors from other pkgs
  • Cairo: needs patch: https://github.com/freedesktop/cairo/commit/a75f8df.patch. Also need to disable FORTIFY_SOURCE to prevent SSP linking errors in other pkgs
  • gdbm need CFLAGS+=" -fcommon" (until we upgrade it)
  • cyrus-sasl: source url is broken, replace with other source, still fails
  • gpgme: does not build
  • hdf4: disable fortran support, which is broken
  • libxml2 is missing libxml2-UCRT64.install
  • drmingw does not build
  • gdb does not build even with -fcommon
  • gdal requires fix to remove hardcoded MSVCRT macros

Packages to fix: libssh, drmingw, gdb, gpgme
Packages to consider removing: fontconfig, jags, ruby, rhash, cyrus-sasl

grep on windows 10

Sorry, I am not sure to be on the right list but I am struggling since hours about how to use grep with rtools to find a character sequence in files. For instance with

grep plot *.r

I get all what I want, with all the lines of *.r files having "plot" inside, BUT with

grep plot *.Rmd
/Rtools/bin/grep: *.Rmd: No such file or directory

I thought it was a matter of regular expression, but even with this (or any equivalent) I meet trouble

grep plot '*\.Rmd$'
/Rtools/bin/grep: *.Rmd$: No such file or directory

As anyone an idea where the problem comes from?

Thanks in advance,

Rebuild curl and ssh2 with the latest openssl

#243 upgrades OpenSSL 1 to 3. They are ABI incompatible.
Could you rebuild curl and ssh2 with the latest openssl package?

The current curl and ssh2 packages still refer OpenSSL 1 and we can't use them with OpenSSL 3. Here is an example error in apache/arrow:

https://github.com/apache/arrow/actions/runs/5569960293/jobs/10173921571?pr=36710#step:12:91

C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/arrow-12.0.1.9000/lib/x64-ucrt/libcurl.a(libcurl_la-openssl.o):(.text+0x2af2): undefined reference to `EVP_PKEY_id'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/arrow-12.0.1.9000/lib/x64-ucrt/libcurl.a(libcurl_la-openssl.o):(.text+0x53b5): undefined reference to `SSL_get_peer_certificate'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/arrow-12.0.1.9000/lib/x64-ucrt/libcurl.a(libcurl_la-openssl.o):(.text+0x5e0a): undefined reference to `SSL_get_peer_certificate'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/arrow-12.0.1.9000/lib/x64-ucrt/libcurl.a(libcurl_la-openssl.o):(.text+0x5fe9): undefined reference to `EVP_PKEY_id'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/arrow-12.0.1.9000/lib/x64-ucrt/libssh2.a(crypto.o):(.text+0x3e62): undefined reference to `EVP_PKEY_id'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/arrow-12.0.1.9000/lib/x64-ucrt/libssh2.a(crypto.o):(.text+0x5676): undefined reference to `EVP_PKEY_id'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/arrow-12.0.1.9000/lib/x64-ucrt/libssh2.a(crypto.o):(.text+0x5b50): undefined reference to `EVP_PKEY_id'

Problems with LTO

Compiling arrow fails with:

lto1.exe: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:155
libbacktrace could not find executable to open

Possible fix: msys2/MINGW-packages#5261


Compiling sf fails with:

 internal error ../../binutils-2.33.1/ld/ldlang.c 6899

Edit: this seems to be due to static libs compiled with gcc-4.9-3.

mingw-w64-python3 does not find libffi

As a workaround it is currently built with a bundled libffi. Somehow it works fine for me locally. Perhaps a problem with pkg-config (libffi headers are in an unusual place).

Build failure: nasm 2.13

Fails to build with gcc-8 full log

In file included from ./include/nasm.h:46,
                 from asm/nasm.c:47:
./include/nasmlib.h:194:1: error: 'pure' attribute on function returning 'void' [-Werror=attributes]
 void pure_func seg_init(void);
 ^~~~

Maybe fixed by to nasm 2.14

mariadb_config is broken

This makes no sense:

mariadb_config.exe --libs
# -L/mingw64//lib/mariadb -lmariadb

Should yield something like this:

-lmariadbclient -lssl -lcrypto -lcrypt32 -lgdi32 -lz -lws2_32 -pthread

I vaguely remember I have reported this upstream before. Perhaps it's fixed in mariadb-connector-c 3.x

Remaining rwinlib ucrt updates

cran2git <- read.csv('https://r-universe-org.github.io/cran-to-git/crantogit.csv')
txt <- readLines('https://www.r-project.org/nosvn/winutf8/ucrt3/patches/CRAN/')
pt <- '.*href="(.*).diff".*'
txt <- txt[grepl(pt, txt)]
pkgs <- sub(pt, '\\1', txt)

test_for_rwinlib <- function(pkg){
  has_rwinlib <- url_exists(sprintf('https://raw.githubusercontent.com/cran/%s/master/tools/winlibs.R', pkg))
  has_ucrt <- url_exists(sprintf('https://raw.githubusercontent.com/cran/%s/master/src/Makevars.ucrt', pkg))
  if(!has_ucrt){
    giturl <- cran2git$url[cran2git$package == pkg]
    if(length(giturl)){
      base <- sub("https://github.com/", "", giturl)
      has_ucrt <- url_exists(sprintf('https://raw.githubusercontent.com/%s/master/src/Makevars.ucrt', base))
    }
  }
  return(has_rwinlib && !has_ucrt)
}

url_exists <- function(url){
  req <- curl::curl_fetch_memory(url)
  return(req$status == 200)
}

todo <- Filter(test_for_rwinlib, pkgs)

opencv

are there any plans to adding opencv?

Multilib on Windows with Rtools 4.0

I have an in-development package that wraps a C/C++ library. That library depends on CMake to compile a bundled library. My understanding is that it was not possible to generate both 32-bit and 64-bit libraries on windows in the configuration. Has Rtools 4.0 changed anything? Are their recommendations to getting this to succeed?

Segmentation fault rtools 4.0

Installed R 4.0 and Rtools 4.0 today, rtools/usr/bin is first on path to be sure.

Sys.which("make")
# "C:\\rtools40\\usr\\bin\\make.exe"

install.packages("jsonlite", type = "source")

* installing *source* package 'jsonlite' ...                                                                                                        
** Paket 'jsonlite' erfolgreich entpackt und MD5 Summen überprüft                                                                                   
** using staged installation                                                                                                                        
** libs                                                                                                                                             
"C:/rtools40/mingw64/bin/"gcc  -I"C:/R/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -msta
krealign -c base64.c -o base64.o                                                                                                                    
"C:/rtools40/mingw64/bin/"gcc  -I"C:/R/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -msta
krealign -c collapse_array.c -o collapse_array.o                                                                                                    
"C:/rtools40/mingw64/bin/"gcc  -I"C:/R/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -msta
krealign -c collapse_object.c -o collapse_object.o                                                                                                  
Exception: STATUS_ACCESS_VIOLATION at rip=001800A5BFD                                                                                               
rax=0000000000030000 rbx=0000000000000002 rcx=0000000180320640                                                                                      
rdx=0000000000410000 rsi=0000000180320668 rdi=00000001005CF86C                                                                                      
"C:/rtools40/mingw64/bin/"gcc  -I"C:/R/include" -DNDEBUG -Iyajl/api       -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -msta
krealign -c collapse_pretty.c -o collapse_pretty.or8 =00000000FFFFC89C r9 =0000000000000000 r10=0000000100000000                                    
r11=0000000100429FB2 r12=00000000FFFFC930 r13=0000000180320640                                                                                      
r14=00000000FFFFCC80 r15=0000000180320C48                                                                                                           
rbp=000000000000002D rsp=00000000FFFFC810                                                                                                           
program=C:\rtools40\usr\bin\sh.exe, pid 1943, thread main                                                                                           
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B                                                                                                     
make: *** [C:/R/etc/x64/Makeconf:222: base64.o] Segmentation fault (core dumped)                                                                    
make: *** Waiting for unfinished jobs....                                                                                                           
make: *** [C:/R/etc/x64/Makeconf:222: collapse_array.o] Segmentation fault (core dumped)                                                            
Exception: STATUS_ACCESS_VIOLATION at rip=001800A5BFD                                                                                               
rax=0000000000030000 rbx=0000000000000002 rcx=0000000180320640                                                                                      
rdx=0000000000410000 rsi=0000000180320668 rdi=00000001005CF86C                                                                                      
r8 =00000000FFFFC89C r9 =0000000000000000 r10=0000000100000000                                                                                      
r11=0000000100429FB2 r12=00000000FFFFC930 r13=0000000180320640                                                                                      
r14=00000000FFFFCC80 r15=0000000180320C48                                                                                                           
rbp=000000000000002D rsp=00000000FFFFC810                                                                                                           
program=C:\rtools40\usr\bin\sh.exe, pid 1945, thread main                                                                                           
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B                                                                                                     
make: *** [C:/R/etc/x64/Makeconf:222: collapse_pretty.o] Segmentation fault (core dumped)                                                           
make: *** [C:/R/etc/x64/Makeconf:222: collapse_object.o] Segmentation fault (core dumped)                                                           
ERROR: compilation failed for package 'jsonlite'                                                                                                    
* removing 'C:/R/library/jsonlite'                                                                                                                  
* restoring previous 'C:/R/library/jsonlite'                                                                                                        
                                                                                                                                                    
Die heruntergeladenen Quellpakete sind in                                                                                                           
        'C:\Users\Dieter\AppData\Local\Temp\RtmpQX8g2K\downloaded_packages'                                                                         

Add Rust and Cargo to Rtools?

Since there will be a new version of Rtools released, is it possible to get Rust & Cargo to be atleast available to be downloaded in Rtools?

Bug report: unable to install source packages with Rtools installed

Hi all.

I installed the latest R and Rtools, and I followed the guidelines to test the installation of Rtools (rtools40v2-x86_64.exe for windows10) . I verified that make can be found, but I still could not install an R package from source.

Does that mean Rtools is not been install successfully? I recently failed to install a package from Github, thus I wondered it's related to the function of Rtools.

warnings for can not installing package from source:

Sys.which("make")
make
"c:\rtools40\usr\bin\make.exe"
install.packages("jsonlite", type = "source",dependencies=TRUE)
还安装相依关系‘proxy’, ‘e1071’, ‘wk’, ‘R.cache’, ‘classInt’, ‘DBI’, ‘s2’, ‘units’, ‘plyr’, ‘R.rsp’, ‘sf’

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/proxy_0.4-26.tar.gz'
Content type 'application/octet-stream' length 116286 bytes (113 KB)
downloaded 113 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/e1071_1.7-8.tar.gz'
Content type 'application/octet-stream' length 581347 bytes (567 KB)
downloaded 567 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/wk_0.5.0.tar.gz'
Content type 'application/octet-stream' length 138686 bytes (135 KB)
downloaded 135 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/R.cache_0.15.0.tar.gz'
Content type 'application/octet-stream' length 34692 bytes (33 KB)
downloaded 33 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/classInt_0.4-3.tar.gz'
Content type 'application/octet-stream' length 403884 bytes (394 KB)
downloaded 394 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/DBI_1.1.1.tar.gz'
Content type 'application/octet-stream' length 743802 bytes (726 KB)
downloaded 726 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/s2_1.0.6.tar.gz'
Content type 'application/octet-stream' length 1605788 bytes (1.5 MB)
downloaded 1.5 MB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/units_0.7-2.tar.gz'
Content type 'application/octet-stream' length 855840 bytes (835 KB)
downloaded 835 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/plyr_1.8.6.tar.gz'
Content type 'application/octet-stream' length 401191 bytes (391 KB)
downloaded 391 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/R.rsp_0.44.0.tar.gz'
Content type 'application/octet-stream' length 823684 bytes (804 KB)
downloaded 804 KB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/sf_1.0-2.tar.gz'
Content type 'application/octet-stream' length 3645982 bytes (3.5 MB)
downloaded 3.5 MB

trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/jsonlite_1.7.2.tar.gz'
Content type 'application/octet-stream' length 421716 bytes (411 KB)
downloaded 411 KB

Warning in install.packages :
installation of package ‘proxy’ had non-zero exit status
Warning in install.packages :
installation of package ‘wk’ had non-zero exit status
Warning in install.packages :
installation of package ‘R.cache’ had non-zero exit status
Warning in install.packages :
installation of package ‘DBI’ had non-zero exit status
Warning in install.packages :
installation of package ‘units’ had non-zero exit status
Warning in install.packages :
installation of package ‘plyr’ had non-zero exit status
Warning in install.packages :
installation of package ‘jsonlite’ had non-zero exit status
Warning in install.packages :
installation of package ‘e1071’ had non-zero exit status
Warning in install.packages :
installation of package ‘s2’ had non-zero exit status
Warning in install.packages :
installation of package ‘R.rsp’ had non-zero exit status
Warning in install.packages :
installation of package ‘classInt’ had non-zero exit status
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\xiaoy\AppData\Local\Temp\RtmpAjZyyX\downloaded_packages’

session info:

sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936

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

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

Implement libgcc_eh "hack" for mingw64

We attempt to bridge R and rust and use rtools for building rust code.
However, we encountered a linker error reporting there is no libgcc_eh when targeting x86_64.

Preliminary googling suggested that if gcc is built with --disabled-shared, libgcc_eh is not emitted.

--disable-shared --enable-static \

We found that mingw32 version of gcc contains libgcc_eh, which is an exact copy of libgcc, and rust libraries targeting i686 can be successfully built with the help of rtools.

PKGBUILD of gcc contains a "hack" implemented for mingw32 (comment suggests it is needed for rust compiler), but no such hack is present for mingw64.

# Hack for rustc hardcoding -lgcc_eh
if [ "${MINGW_CHOST}" = "i686-w64-mingw32" ]; then
cp ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/libgcc.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/libgcc_eh.a
fi
}

We confirm that our linking issues are resolved by duplicating libgcc as libgcc_eh in mingw64 gcc folder.
Therefore, we would like to have this "hack" implemented for mingw64 as well.

A possible implementation based on existing mingw32 code:

  if [ "${MINGW_CHOST}" = "x86_64-w64-mingw32" ]; then
    cp ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/libgcc.a ${pkgdir}${MINGW_PREFIX}/lib/gcc/${MINGW_CHOST}/${pkgver}/libgcc_eh.a
  fi
}

Alternatively, if condition can be removed so the cp command is executed for both architectures.

Relevant discussions can be found in extendr/rextendr#19.

Use chocolately python for building stuff

Instead of packaging up a ton of python crap only for building other stuff, perhaps we can just use the python from choco install python a build-time dependency.

rtools failed to zip tar.gz file

I'm building binaries for my package on a AWS EC2 Windows 19 machine. I have R v3.6 and Rtools version 3.5.
While building, I see this output:

zip error: Nothing to do! (try: zip -r9Xq C:/cygdrive/c/jenkins/workspace/PythonEmbedInR-staging/label/windows-RVERS-3.6/PythonEmbedInR_0.3.34.zip . -i PythonEmbedInR)
running 'zip' failed

The PythonEmbedInR_0.3.34.tar.gz file is created. However, it failed to create the PythonEmbedInR_0.3.34.zip.

My other build for R v.3.5 with Rtools v3.4 succeed with the zip file created.

What should I do to build my package on R v3.6? downgrade Rtools? upgrade Rtools?
Any help would be greatly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.