Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 937849

Summary: media-libs/ftgl-2.1.3_rc5-r1 - [icu-75.1] FTVectoriser.cpp: error: invalid conversion from unsigned char to char [-fpermissive]
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Games <games>
Status: CONFIRMED ---    
Severity: normal CC: gentoo.qxrin, jwthaparc, konsolebox, leonchik1976, olafitohb, ted.d.rodgers
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=938014
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt.xz
environment
etc.clang.tar.xz
etc.portage.tar.xz
logs.tar.xz
media-libs:ftgl-2.1.3_rc5-r1:20240812-220110.log
qlist-info.txt.xz
temp.tar.xz
Workaround/fix

Description Toralf Förster gentoo-dev 2024-08-13 07:12:27 UTC
too long lines were shrinked:

/bin/sh ../libtool  --tag=CXX   --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -IFTGlyph -IFTFont -IFTLayout -I../src -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -I/usr/include/freetype2  -O2 -pipe -march=native -fno-diagnostics-color -c -o libftgl_la-FTV
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -IFTGlyph -IFTFont -IFTLayout -I../src -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -I/usr/include/freetype2 -O2 -pipe -march=native -fno-diagnostics-color -c FTSize.cpp  -fPIC -DPIC -o .libs/libftgl_la-FTS
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -IFTGlyph -IFTFont -IFTLayout -I../src -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -I/usr/include/freetype2 -O2 -pipe -march=native -fno-diagnostics-color -c FTVectoriser.cpp  -fPIC -DPIC -o .libs/libftgl_
/bin/sh ../libtool  --tag=CXX   --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -IFTGlyph -IFTFont -IFTLayout -I../src -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -I/usr/include/freetype2  -O2 -pipe -march=native -fno-diagnostics-color -c -o libftgl_la-FTG
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -IFTGlyph -IFTFont -IFTLayout -I../src -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -I/usr/include/freetype2 -O2 -pipe -march=native -fno-diagnostics-color -c FTGlyph/FTGlyph.cpp  -fPIC -DPIC -o .libs/libft
FTVectoriser.cpp: In member function 'void FTVectoriser::ProcessContours()':
FTVectoriser.cpp:169:25: error: invalid conversion from 'unsigned char*' to 'char*' [-fpermissive]
  169 |         char* tagList = &outline.tags[startIndex];
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_no_multilib_systemd-20240808-180502

  UNMASKED:
    Requested by sam
  ~dev-libs/icu-75.1
  ~dev-libs/icu-layoutex-75.1

  The attached etc.portage.tar.xz has all details.
  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-14 *
clang/llvm (if any):
clang version 18.1.8
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/18
18.1.8
Python 3.12.5
Available Ruby profiles:
  [1]   ruby31 (with Rubygems)
  [2]   ruby32 (with Rubygems)
  [3]   ruby33 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.79.0
  [2]   rust-1.79.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.24_p8 [openjdk-bin-11]
2)	Eclipse Temurin JDK 17.0.12_p7 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.4_p7 [openjdk-bin-21]
4)	Eclipse Temurin JDK 8.422_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17 
  [4]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
  [1]   php8.2
  [2]   php8.3 *
go version go1.22.6 linux/amd64

  HEAD of ::gentoo
commit 0d19d230f69c2dc406a457fd039cdd1ce64095e7
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Mon Aug 12 20:34:02 2024 +0000

    2024-08-12 20:34:02 UTC

emerge -qpvO =media-libs/ftgl-2.1.3_rc5-r1
[ebuild  N    ] media-libs/ftgl-2.1.3_rc5-r1  USE="-static-libs"
Comment 1 Toralf Förster gentoo-dev 2024-08-13 07:12:28 UTC
Created attachment 900010 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-08-13 07:12:29 UTC
Created attachment 900011 [details]
emerge-history.txt.xz
Comment 3 Toralf Förster gentoo-dev 2024-08-13 07:12:30 UTC
Created attachment 900012 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2024-08-13 07:12:31 UTC
Created attachment 900013 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2024-08-13 07:12:32 UTC
Created attachment 900014 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-08-13 07:12:33 UTC
Created attachment 900015 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-08-13 07:12:34 UTC
Created attachment 900016 [details]
media-libs:ftgl-2.1.3_rc5-r1:20240812-220110.log
Comment 8 Toralf Förster gentoo-dev 2024-08-13 07:12:35 UTC
Created attachment 900017 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2024-08-13 07:12:36 UTC
Created attachment 900018 [details]
temp.tar.xz
Comment 10 konsolebox 2024-08-17 03:58:47 UTC
Created attachment 900334 [details, diff]
Workaround/fix
Comment 11 tdr 2024-08-20 14:44:46 UTC
Confirming the patch successfully works.
Tested with:
   media-libs/ftgl-2.1.3_rc5-r1
   sys-devel/gcc-15.0.0_pre20240818-r1
Comment 12 Larry the Git Cow gentoo-dev 2024-09-23 11:24:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59d4d2a90596d3dc8b23b4b07e274c0d8517c8b7

commit 59d4d2a90596d3dc8b23b4b07e274c0d8517c8b7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-23 11:21:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-23 11:21:26 +0000

    media-libs/ftgl: fix build w/ freetype-2.13.3
    
    Closes: https://bugs.gentoo.org/937849
    Thanks-to: konsolebox <konsolebox@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/ftgl-2.1.3_rc5-freetype-2.13.3.patch     | 49 ++++++++++++++++++
 media-libs/ftgl/ftgl-2.1.3_rc5-r2.ebuild           | 59 ++++++++++++++++++++++
 2 files changed, 108 insertions(+)
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-24 15:34:35 UTC
The fix breaks ABI, I'll fix it in a minute. I should've realised earlier.
Comment 14 konsolebox 2024-09-24 16:14:04 UTC
Break in what way? So you'll rely on forced casting instead?
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-24 16:19:58 UTC
(In reply to konsolebox from comment #14)
> Break in what way? So you'll rely on forced casting instead?

Argument types are part of mangled names.
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-24 16:24:48 UTC
(In reply to konsolebox from comment #14)
> Break in what way? So you'll rely on forced casting instead?

There isn't an alternative for C vs C++. libxml2 did the same thing not long ago.
Comment 17 konsolebox 2024-10-01 04:50:57 UTC
(In reply to Sam James from comment #16)
> (In reply to konsolebox from comment #14)
> > Break in what way? So you'll rely on forced casting instead?
> 
> There isn't an alternative for C vs C++. libxml2 did the same thing not long
> ago.

Is forcing dependents to be rebuilt not a solution and is there a way to?  Like perhaps adding a temporary subslot and doing a revision bump on the packages and specifying 'media-libs/ftgl:='?

I also unpacked the latest versions of every package that depends on media-libs/ftgl.  None of it references FTContour except their bundled copies of ftgl.
Comment 18 blank 2024-12-14 02:35:13 UTC
I'm still running into this one, as of 12/13/24.

I couldn't tell if there was a fix already from reading the comment thread. Just wanted to add that it does seem to still be occurring.
Comment 19 olafito18 2024-12-21 17:13:39 UTC
This bug happened to me today, 21 december 2024, when updating
Comment 20 konsolebox 2024-12-22 00:03:41 UTC
For anyone complaining the problem still occurs please post your build.log and make sure you're installing 2.1.3_rc5-r2 and not 2.1.3_rc5-r1.  Don't bother commenting if you can't.