bovee / entab

* -> TSV
MIT License
21 stars 5 forks source link

issues installing entab-r on windows #37

Closed ethanbass closed 1 year ago

ethanbass commented 1 year ago

I can't figure out how to install entab-r on Windows 10. I spent way too long today messing around with makevars.win (https://github.com/ethanbass/entab/blob/windows_dev/entab-r/src/Makevars.win). The version I have now seems to compile, but then I am getting an error at the very end: "no DLL was created" causing the installation to fail. Maybe you have some insight as someone who actually understands this stuff? I am basically just doing it by trial and error because I only have a very dim understanding of how these makevar files work.

Here's the output from the installer:

rm -Rf entab.dll ../target/x86_64-pc-windows-gnu/release/libentab.a 
mkdir -p ../target/libgcc_mock
cd ../target/libgcc_mock && \
    touch gcc_mock.c && \
    gcc -c gcc_mock.c -o gcc_mock.o && \
    ar -r libgcc_eh.a gcc_mock.o && \
    cp libgcc_eh.a libgcc_s.a
C:\rtools42\x86_64-w64-mingw32.static.posix\bin\ar.exe: creating libgcc_eh.a
# CARGO_LINKER is provided in Makevars.ucrt for R >= 4.2
export PATH="/x86_64-w64-mingw32.static.posix/bin:/usr/bin:/c/Users/eb565/AppData/Local/Programs/R/R-42~1.1/bin/x64:/x86_64-w64-mingw32.static.posix/bin:/usr/bin:/usr/bin:/usr/bin:/x86_64-w64-mingw32.static.posix/bin:/usr/bin:/c/Users/eb565/AppData/Local/Programs/R/R-4.2.1/bin/x64:/c/Windows/System32:/c/Windows:/c/Windows/System32/wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files (x86)/AOMEI/AOMEI Backupper 6.4.0:/c/Users/eb565/.cargo/bin:/c/Users/eb565/AppData/Local/Programs/Python/Python37/Scripts:/c/Users/eb565/AppData/Local/Programs/Python/Python37:/c/Users/eb565/AppData/Local/Microsoft/WindowsApps:/c/Users/eb565/AppData/Local/GitHubDesktop/bin:/c/Users/eb565/AppData/Local/Programs/Git/cmd:/c/Users/eb565/AppData/Local/Programs/Microsoft VS Code/bin/:/c/Users/eb565/Documents/.cargo/bin" && \
export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="x86_64-w64-mingw32.static.posix-gcc.exe" && \
    export LIBRARY_PATH="${LIBRARY_PATH};/c/Users/eb565/AppData/Local/Temp/RtmpQprVeS/R.INSTALL24982fdd1daa/entab/src/../target/libgcc_mock" && \
    cargo build --target=x86_64-pc-windows-gnu --lib --release --manifest-path=../Cargo.toml --target-dir ../target
    Updating git repository `https://github.com/bovee/entab`
    Updating git repository `https://github.com/extendr/extendr/`
    Updating crates.io index
   Compiling jobserver v0.1.24
   Compiling proc-macro2 v1.0.42
   Compiling winapi-x86_64-pc-windows-gnu v0.4.0
   Compiling libc v0.2.126
   Compiling winapi v0.3.9
   Compiling quote v1.0.20
   Compiling unicode-ident v1.0.2
   Compiling pkg-config v0.3.25
   Compiling autocfg v1.1.0
   Compiling syn v1.0.98
   Compiling either v1.7.0
   Compiling glob v0.3.0
   Compiling encoding_index_tests v0.1.4
   Compiling serde_derive v1.0.140
   Compiling zstd-safe v2.0.6+zstd.1.4.7
   Compiling crc32fast v1.3.2
   Compiling serde v1.0.140
   Compiling extendr-engine v0.2.0 (https://github.com/extendr/extendr/?rev=1d2e87ed49a3e0e5c1a1a2df58140b3f7824fb87#1d2e87ed)
   Compiling memchr v2.5.0
   Compiling adler v1.0.2
   Compiling cfg-if v1.0.0
   Compiling extendr-api v0.2.0 (https://github.com/extendr/extendr/?rev=1d2e87ed49a3e0e5c1a1a2df58140b3f7824fb87#1d2e87ed)
   Compiling bytecount v0.6.3
   Compiling paste v1.0.7
   Compiling lazy_static v1.4.0
   Compiling cc v1.0.73
   Compiling itertools v0.9.0
   Compiling encoding-index-singlebyte v1.20141219.5
   Compiling encoding-index-korean v1.20141219.5
   Compiling encoding-index-japanese v1.20141219.5
   Compiling encoding-index-tradchinese v1.20141219.5
   Compiling encoding-index-simpchinese v1.20141219.5
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling miniz_oxide v0.5.3
   Compiling encoding v0.2.33
   Compiling flate2 v1.0.24
   Compiling zstd-sys v1.4.18+zstd.1.4.7
   Compiling lzma-sys v0.1.19
   Compiling bzip2-sys v0.1.11+1.0.8
   Compiling libR-sys v0.2.2
   Compiling bzip2 v0.3.3
   Compiling extendr-macros v0.2.0 (https://github.com/extendr/extendr/?rev=1d2e87ed49a3e0e5c1a1a2df58140b3f7824fb87#1d2e87ed)
   Compiling xz2 v0.1.7
   Compiling zstd v0.5.4+zstd.1.4.7
   Compiling chrono v0.4.19
   Compiling entab v0.3.1 (https://github.com/bovee/entab#b4ea4cef)
   Compiling entab-r v0.3.1 (C:\Users\eb565\AppData\Local\Temp\RtmpQprVeS\R.INSTALL24982fdd1daa\entab)
    Finished release [optimized] target(s) in 38.93s
no DLL was created
ERROR: compilation failed for package 'entab'
* removing 'C:/Users/eb565/AppData/Local/Programs/R/R-4.2.1/library/entab'
bovee commented 1 year ago

Thanks for spending so much time working on this!

I really wouldn't say I understand anything about R or it's build process, but I think you just need to move entab.a back into the code directory so R can find it (i.e. the mv ./$(LIBDIR)/$(PLATFORM_STATLIB) ./$(STATLIB) line from the Mac/Linux Makevars)? That's the only thing I notice.

ethanbass commented 1 year ago

Thanks. I am away from the lab (and the windows box) for a couple of weeks, but I will take another look when I return.

ethanbass commented 1 year ago

Thanks for the hint. This was very helpful