Arch linux: Cannot install R package "ragg"
3
votes
0
answers
766
views
After 10+ years using debian-based linux, I am now using Arch.
I use R for data science analysis and development. I am facing difficulties to install the R package ragg (r-ragg), which is a dependency for other libraries I use. When I try to install "ragg" from within R using the
install.packages("ragg")
command, I get the following error:
make: * [/usr/lib64/R/etc/Makeconf:204: agg/src/agg_font_freetype.o] Error 1
which leads to a compilation failure for "ragg".
I got the same error message in Arch and in an arch-based OS
Any suggestion to resolve this? (I have search a lot how to solve this, without concrete success.)
I also tried to install it via terminal using yay -S r-ragg
and I received this as feedback:
make: *** [/usr/lib64/R/etc/Makeconf:204: agg/src/agg_font_freetype.o] Error 1
ERROR: compilation failed for package ‘ragg’
removing ‘/home/machiavelli/.cache/yay/r-ragg/src/build/ragg’
==> ERROR: A failure occurred in build().
Aborting...
-> error making: r-ragg-exit status 4
-> Failed to install the following packages. Manual intervention is required:
r-ragg - exit status 4
The relevant part of the Makeconf
file is:
$ awk 'NR>200 && NR $@
.cpp.d:
@echo "making $@ from $ install.packages("ragg")
* installing *source* package ‘ragg’ ...
** package ‘ragg’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread
Using PKG_LIBS=-lfreetype -lpng16 -ltiff -ljpeg
** libs
using C++ compiler: ‘g++ (GCC) 14.2.1 20240805’
[endless compilation verbose here]
agg/src/agg_font_freetype.cpp: In instantiation of ‘bool agg::decompose_ft_outline(const FT_Outline&, bool, const trans_affine&, PathStorage&) [with PathStorage = path_storage_integer; FT_Outline = FT_Outline_]’:
agg/src/agg_font_freetype.cpp:1071:48: required from here
1071 | if(decompose_ft_outline(m_cur_face->glyph->outline,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1072 | m_flip_y,
| ~~~~~~~~~
1073 | m_affine,
| ~~~~~~~~~
1074 | m_path32))
| ~~~~~~~~~
agg/src/agg_font_freetype.cpp:182:35: error: invalid conversion from ‘unsigned char*’ to ‘char*’ [-fpermissive]
182 | tags = outline.tags + first;
| ~~~~~~~~~~~~~~^~~~~~~
| |
| unsigned char*
agg/src/agg_font_freetype.cpp: In instantiation of ‘bool agg::decompose_ft_outline(const FT_Outline&, bool, const trans_affine&, PathStorage&) [with PathStorage = path_storage_integer; FT_Outline = FT_Outline_]’:
agg/src/agg_font_freetype.cpp:1092:48: required from here
1092 | if(decompose_ft_outline(m_cur_face->glyph->outline,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1093 | m_flip_y,
| ~~~~~~~~~
1094 | m_affine,
| ~~~~~~~~~
1095 | m_path16))
| ~~~~~~~~~
agg/src/agg_font_freetype.cpp:182:35: error: invalid conversion from ‘unsigned char*’ to ‘char*’ [-fpermissive]
182 | tags = outline.tags + first;
| ~~~~~~~~~~~~~~^~~~~~~
| |
| unsigned char*
make: *** [/usr/lib64/R/etc/Makeconf:204: agg/src/agg_font_freetype.o] Error 1
ERROR: compilation failed for package ‘ragg’
-----
**ISSUE RESOLVED**
install.packages("ragg")
downloads and installs (or fails to install, in my case) ragg
version 1.3.2 from CRAN. This was not working on my workstation running arch-based Endeavour OS.
I found the source code for ragg
version 1.3.2.9000 at https://r-lib.r-universe.dev/ragg\ and it worked like a charm. No compilation needed, instant success. I loaded the library and ran a test code and it produced the expected output.
Case closed. Many thanks for your support through this!
Asked by 3mpad4
(31 rep)
Aug 23, 2024, 02:04 PM
Last activity: Aug 23, 2024, 09:49 PM
Last activity: Aug 23, 2024, 09:49 PM