Skip to content
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

lzstd library cannot be found during installation #24

Open
FrancescoNegri opened this issue Apr 24, 2024 · 1 comment
Open

lzstd library cannot be found during installation #24

FrancescoNegri opened this issue Apr 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@FrancescoNegri
Copy link

Describe the bug

unigd package compilation failing due to 'lzstd' missing.

To Reproduce

Run install.packages("unigd") inside R terminal.

Expected behavior

unigd package is expected to successfully finish the building process.

Screenshots

Environment

  • OS: Windows 11
  • R version: 4.1.3
  • unigd version: 0.1.1

Additional context

I am trying to set up R in a conda virtual environment, employing Visual Studio Code as IDE. Therefore, unigd is a dependency for "httpgd", that is required for the VS Code R extension plot viewer.

Whenever I try to run the install.packages("unigd") or install.packages("httpgd") command the following error is returned and the compilation is aborted.

g++ -shared -s -o unigd.dll tmp.def base_64.o compress.o cpp11.o draw_data.o page_store.o plot_history.o r_thread_posix.o r_thread_win32.o renderer_cairo.o renderer_json.o renderer_meta.o renderer_strings.o renderer_svg.o renderer_tikz.o renderers.o unigd.o unigd_dev.o unigd_external.o uuid.o -L../windows/harfbuzz-2.7.4/lib/x64 -lpng -lz -L../windows/cairo-1.16.0/lib/x64 -lcairo -lfreetype -lpixman-1 -lharfbuzz -lbz2 -liconv -lgdi32 -ltiff -ltiffxx -ljpeg -lzstd -lwebp -lsharpyuv -llzma -LC:/Users/FRANCE~1/MAMBAF~1/envs/R_env/lib/R/bin/x64 -lR
C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lzstd: No such file or directory
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'unigd'
* removing 'C:/Users/Francesco/mambaforge/envs/R_env/Lib/R/library/unigd'
@FrancescoNegri FrancescoNegri added the bug Something isn't working label Apr 24, 2024
@HenningLorenzen-ext-bayer
Copy link

HenningLorenzen-ext-bayer commented Jun 10, 2024

I would make sure that the proper 3rd-party C/C++ libraries are installed within RTools, using the pacman command.

The snippet below should do the trick in this case:

pacman -S mingw64/mingw-w64-x86_64-zstd mingw32/mingw-w64-i686-zstd

Related: #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants