Closed ChangqingW closed 3 days ago
Looks like with the newer version of freetype2, tags
from FT_Outline
changed from char*
to unsigned char*
, I wonder if this is causing the error.
https://sourceforge.net/projects/freetype/files/freetype2/2.13.3/
CHANGES BETWEEN 2.13.2 and 2.13.3 (2024-Aug-11)
I. IMPORTANT CHANGES
- Some fields in the `FT_Outline` structure have been changed
from signed to unsigned type, which better reflects the actual
usage. It is also an additional means to protect against
malformed input.
https://freetype.org/freetype2/docs/reference/ft2-outline_processing.html#ft_outline https://freetype.sourceforge.net/freetype2/docs/reference/ft2-outline_processing.html#FT_Outline
- tags = outline.tags + first;
+ tags = (char*)outline.tags + first;
Casting outline.tags
to char*
seems to have resolved this for me.
Until/unless freetype2 is updated, is there a way to get around this error in R? This is blocking installation of tidyverse as well. I'm not a C++ user, but I can code - do I have to learn to hack into freetype2? Is there a way to modify the ragg installation to get around this? Sorry if this is not an appropriate question. Also, does anyone know an order of magnitude timeline for something like this to be updated in a downstream code like freetype2? Days, weeks, months? Thanks!
Until/unless freetype2 is updated, is there a way to get around this error in R? This is blocking installation of tidyverse as well. I'm not a C++ user, but I can code - do I have to learn to hack into freetype2? Is there a way to modify the ragg installation to get around this? Sorry if this is not an appropriate question. Also, does anyone know an order of magnitude timeline for something like this to be updated in a downstream code like freetype2? Days, weeks, months? Thanks!
Freetype was updated to 2.13.3
at commit https://github.com/Homebrew/homebrew-core/commit/28e294c4d21da7d03e441d569d07c38365d2d74e. Its immediate parent is https://github.com/Homebrew/homebrew-core/commit/d28afc3bfdb5d24eab02157bfffcc9e17ed6666c, which contains the script to install freetype
version 2.13.2
.
To install freetype
version 2.13.2
, download the previous installation script and manually install with brew:
curl -L https://raw.githubusercontent.com/Homebrew/homebrew-core/d28afc3bfdb5d24eab02157bfffcc9e17ed6666c/Formula/f/freetype.rb > freetype.rb && brew install freetype.rb
Then install.packages("ragg")
should work.
Thanks for the tip. I have run the code for Freetype as above, and it seems to work - it says that 2.13.2 is installed. I still get the same error when trying to install ragg, however. When I run freetype-config --version, it says 26.2.20, which the internet says is 2.13.3. So though it looks like 2.13.2 is being installed, it seems it is not? Thank you for all the help!
Based on email correspondence, @thomasp85 doesn't consider this to be worth fixing for the time being, since there are workarounds available to sufficiently sophisticated R users.
@dimino i would be grateful if you did not misrepresent what I wrote. It is definitely worth fixing, but I am having higher priorities right now. I provided you with workarounds for the time being to help you out, not to say that the issue doesn't matter
@thomasp85 apologies if there was confusion! My intention was to explain that you didn't consider this worth fixing for the time being, which is what "higher priorities" means. Worth here being applied relatively to the worth of the other work you're doing.
And strictly speaking no, you provided no workarounds to me I was not already aware of. I submitted the PR based on a workaround provided by @ChangqingW .
Further, the issue is not my specific problem, but the problem of all remaining people for whom you have not provided a sufficient workaround for, which are the people who may lack the technical sophistication to apply the workarounds discussed here.
This is obviously your call, as you have refused my offer to help merge the relevant PR and cut a release. You can decide how to prioritize your time and manage this repo however you like. But the fact remains that you consider this blocking issue (to others, not me) to be of insufficient worth to resolve in a timely manner. That is a fact worth making clear to anyone who comes here searching for a solution.
It would be more interesting if you could share the workarounds here. Personally, I cloned the original repo, I applied the patch quoted above and I installed the package from this repo.
For the time being, the PR can easily be installed with pak::pak("r-lib/ragg#171")
Be aware that I haven't looked at the changes in the PR so I can't really vouch for it's correctness, but if it works it can get you through the next couple of weeks
I am experiencing the same issue described by the OP. I am on archlinux and can confirm that re-installing freetype2
does not resolve the issue. And pak::pak("r-lib/ragg#171")
does not install ragg
successfully either.
Downgrading freetype2 to is previous version does resolve the issue
sudo pacman -U file:///var/cache/pacman/pkg/freetype2-2.13.2-2-x86_64.pkg.tar.zst
install.packages("ragg")
works normally afterwords
Hopefully this gets fixed soon.
@dimino no reason to be pedantic to the maintainer. It's not a good look. You are not entitled to their time, attention, or having your suggestions included.
Thanks for all your work on this open source package @thomasp85 <3
@chartgerink I hope I haven't upset you! I feel zero entitlement to anyone's time or attention, but when a maintainer refuses to accept the offered help, they're deliberately creating a bottleneck around their availability. This is any maintainer's prerogative, of course, but the bottleneck remains, as do those who are stuck waiting behind it.
I've been able to get ragg (and therefore tidyverse) installed using pak::pak("r-lib/ragg#171")
. Thanks to all who are working on this!
https://archive.archlinux.org/packages/f/freetype2/ 2.13.2-2 works fine after using sudo pacman -U file.tar.gz and install.packages("tidyverse") in RStudio
On Arch here, I don't need to downgrade libfreetype2.2.13.3-1 works fine with the PR (pak::pak("r-lib/ragg#171"
).
Thanks for the work and all involved!
EDIT: I don't know why other users here need to downgrade libfreetype2. I'm guessing you are running install.packages("ragg") afterwards? Note, you don't need (and absolutely don't want to do that as it will undo the ragg installation with the PR) to do that, as pak has already installed ragg. As you have installed pak, it's much more worthwhile to use it for installing packages now.
Encountered the following error during installation:
I believe I had all the required libraries installed: