Opened 3 years ago

Closed 3 years ago

#24240 closed defect (fixed)

Upgrade freetype to 2.8.1.

Reported by: charpent Owned by:
Priority: major Milestone: sage-8.1
Component: packages: standard Keywords: r-project graphics interfaces
Cc: Merged in:
Authors: Emmanuel Charpentier Reviewers: Andrey Novoseltsev
Report Upstream: N/A Work issues:
Branch: 7cde142 (Commits) Commit: 7cde1424f39327192dfd72e7ca9ca0cb1db21895
Dependencies: Stopgaps:

Description (last modified by charpent)

[ Title modified at novoselt's suggestion ] :

Motivation : in Sage 8.1.rc2, R can't plot (at least on Debian testing, whose X is Wayland by default) :

> capabilities()
       jpeg         png        tiff       tcltk         X11        aqua 
      FALSE       FALSE       FALSE        TRUE       FALSE       FALSE 
   http/ftp     sockets      libxml        fifo      cledit       iconv 
       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE 
        NLS     profmem       cairo         ICU long.double     libcurl 
       TRUE       FALSE       FALSE        TRUE        TRUE        TRUE 
Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  impossible de charger l'objet partagé '/usr/local/sage-8/local/lib/R//modules//R_X11.so':
  /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates
> q("no")

Contrast with the system's R :

> capabilities()
       jpeg         png        tiff       tcltk         X11        aqua 
       TRUE        TRUE        TRUE        TRUE        TRUE       FALSE 
   http/ftp     sockets      libxml        fifo      cledit       iconv 
       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE 
        NLS     profmem       cairo         ICU long.double     libcurl 
       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE 
> q("no")

The fix is to upgrade freetype to 2.8.1. Upstream tarball is : https://download.savannah.gnu.org/releases/freetype/freetype-2.8.1.tar.bz2

Change History (17)

comment:1 follow-up: Changed 3 years ago by jdemeyer

"has no graphics capabilities" is pretty vague. What do you consider to be the bug precisely?

comment:2 Changed 3 years ago by charpent

  • Branch set to u/charpent/fix_R_graphics_again

comment:3 Changed 3 years ago by git

  • Commit set to 7cde1424f39327192dfd72e7ca9ca0cb1db21895

Branch pushed to git repo; I updated commit sha1. New commits:

7cde14224240 : Updated freetype to 2.8.1.

comment:4 in reply to: ↑ 1 Changed 3 years ago by charpent

  • Authors set to Emmanuel Charpentier
  • Description modified (diff)
  • Status changed from new to needs_review

Replying to jdemeyer:

"has no graphics capabilities" is pretty vague. What do you consider to be the bug precisely?

Precisely what it means : capabilities() show that all the imaging engines of R(jpeg, png, tiff, tcltk, X11, cairo) are disabled. In a terminal, plot(<something>) does nothing and yelds an error message from X11, which complaints of a missing function in a library called harfbuzz. Similar results in the Jupyter notebook.

This might been due to recent changes in system's X11 (Debian now uses Wayland by default), which might have triggered an hitherto unknown bug.

It turns out that updating freetype to 2.8.1 fixes the problem.

The resulting Sage passes ptestlong without any error whatsoever ; R sirt-of-passing its own test suite as usual.

==>needs_review. I'll try to test it on Windows (but that means an overnight run...)

Last edited 3 years ago by charpent (previous) (diff)

comment:5 follow-up: Changed 3 years ago by novoselt

Shouldn't this be a blocker for 8.1?

comment:6 in reply to: ↑ 5 Changed 3 years ago by charpent

Replying to novoselt:

Shouldn't this be a blocker for 8.1?

It should. I considered it. But I doubt somehow that this opinion would be shared by the core developers, given the popularity of R among them...

Anyway, feel free to review my patch ;-).

comment:7 follow-up: Changed 3 years ago by novoselt

Well, the patch works in terms of upgrading freetype, but on Debian Stretch I don't see the problem before or after. So I can give positive review to a ticket titled "Upgrade freetype".

comment:8 in reply to: ↑ 7 ; follow-up: Changed 3 years ago by charpent

Replying to novoselt:

Well, the patch works in terms of upgrading freetype, but on Debian Stretch I don't see the problem before or after. So I can give positive review to a ticket titled "Upgrade freetype".

Do you run Xorg or Wayland ? I'm running testing, where X11 defaults to Wayland : that might be the source of the diffeernces in vbehaviour.

Can you plot from a terminal running "sage -R" ? For example, try "curve(sin(x), -pi, pi)".

Using graphics in the R librar interface from Sage is a bit more intricate. More on this later...

comment:9 Changed 3 years ago by charpent

  • Description modified (diff)
  • Summary changed from R 3.4.2 has no graphics capabilities to Upgrade freetype to 2.8.1.

comment:10 in reply to: ↑ 8 Changed 3 years ago by novoselt

  • Reviewers set to Andrey Novoseltsev
  • Status changed from needs_review to positive_review

Replying to charpent:

Do you run Xorg or Wayland ? I'm running testing, where X11 defaults to Wayland : that might be the source of the diffeernces in vbehaviour.

I am on stable, so presumably Xorg.

Can you plot from a terminal running "sage -R" ? For example, try "curve(sin(x), -pi, pi)".

I can as in it does not cause errors and there is a PDF file created with a plot. I am far from being an expert on the topic - my only interest in R graphics is to make sure that it keeps working for SageMathCell.

comment:11 Changed 3 years ago by charpent

  • Status changed from positive_review to needs_review

Resetting to needs_review to grap patchbots' attention. I'll reset the state according to the results.

comment:12 follow-up: Changed 3 years ago by novoselt

How is it supposed to test this ticket that needs a new package placed into upstream?

comment:13 in reply to: ↑ 12 ; follow-up: Changed 3 years ago by jhpalmieri

Replying to novoselt:

How is it supposed to test this ticket that needs a new package placed into upstream?

Download the tarball linked in the description and place it into upstream. Or is that not what you meant?

Edit: Oh, you mean the patchbots. I have heard that they are supposed to do this somehow, but I don't know if that's true.

Last edited 3 years ago by jhpalmieri (previous) (diff)

comment:14 Changed 3 years ago by novoselt

Yes, I was curious how patchbot is supposed to guess it, although perhaps it reads the description and understands it sufficiently.

comment:15 in reply to: ↑ 13 Changed 3 years ago by charpent

Replying to jhpalmieri:

Replying to novoselt:

How is it supposed to test this ticket that needs a new package placed into upstream?

Download the tarball linked in the description and place it into upstream. Or is that not what you meant?

Edit: Oh, you mean the patchbots. I have heard that they are supposed to do this somehow, but I don't know if that's true.

Apparently, one of them did early this morning. But it seems to have just patched the sources (successfully), but didn't try to rebuild Sage.

comment:16 Changed 3 years ago by charpent

  • Status changed from needs_review to positive_review

Okay. This one has been (positively) checked by 5 patchbots (while none of them did much : this is considered as an SPKG).

I revert to the positive review given by Andrey Novoseltsev .

comment:17 Changed 3 years ago by vbraun

  • Branch changed from u/charpent/fix_R_graphics_again to 7cde1424f39327192dfd72e7ca9ca0cb1db21895
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.