Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888998 - app-text/mupdf-1.21.1 fails to compile (lto): thirdparty/freeglut/include/GL/freeglut_std.h:230:18: error: type of ‘glutStrokeRoman’ does not match original declaration [-Werror=lto-type-mismatch]
Summary: app-text/mupdf-1.21.1 fails to compile (lto): thirdparty/freeglut/include/GL/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Philipp Rösner
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-12-30 16:11 UTC by Kostadin Shishmanov
Modified: 2023-01-04 05:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info and build log (build.log,314.18 KB, text/x-log)
2022-12-30 16:11 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2022-12-30 16:11:54 UTC
Created attachment 845932 [details]
emerge --info and build log

app-text/mupdf-1.21.1 fails to compile with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror-strict-aliasing

thirdparty/freeglut/include/GL/freeglut_std.h:230:18: error: type of ‘glutStrokeRoman’ does not match original declaration [-Werror=lto-type-mismatch]
  230 |     extern void* glutStrokeRoman;
      |                  ^
thirdparty/freeglut/src/x11/fg_glutfont_definitions_x11.c:94:27: note: ‘glutStrokeRoman’ was previously declared here
   94 | struct freeglutStrokeFont glutStrokeRoman ;
      |                           ^
thirdparty/freeglut/src/x11/fg_glutfont_definitions_x11.c:94:27: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
thirdparty/freeglut/include/GL/freeglut_std.h:231:18: error: type of ‘glutStrokeMonoRoman’ does not match original declaration [-Werror=lto-type-mismatch]
  231 |     extern void* glutStrokeMonoRoman;
      |                  ^
thirdparty/freeglut/src/x11/fg_glutfont_definitions_x11.c:95:27: note: ‘glutStrokeMonoRoman’ was previously declared here
   95 | struct freeglutStrokeFont glutStrokeMonoRoman ;
      |                           ^
thirdparty/freeglut/src/x11/fg_glutfont_definitions_x11.c:95:27: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
Comment 1 Kostadin Shishmanov 2022-12-30 22:02:08 UTC
I think this is the same thing as https://bugs.gentoo.org/859847, which has already been solved upstream with https://github.com/FreeGLUTProject/freeglut/pull/112 but the submodule in mupdf hasn't been updated yet
Comment 2 Larry the Git Cow gentoo-dev 2023-01-04 05:50:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6208b6698adad4d24c7cad780efb95349fb5e2da

commit 6208b6698adad4d24c7cad780efb95349fb5e2da
Author:     Philipp Rösner <rndxelement@protonmail.com>
AuthorDate: 2022-12-30 22:22:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-04 05:48:12 +0000

    app-text/mupdf-1.21.1: patch aliasing violation
    
    Add patch fixing an aliasing violation build error
    in the thirdparty freeglut module.
    
    See: https://bugs.gentoo.org/859847
    See: https://github.com/FreeGLUTProject/freeglut/pull/112/commits/8c6f6bf3ad2fd33d15de6ee96175cd29bf804d9f
    
    Closes: https://bugs.gentoo.org/888998
    Suggested-by: Matt Turner <mattst88@gentoo.org>
    Signed-off-by: Philipp Rösner <rndxelement@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/28903
    Signed-off-by: Sam James <sam@gentoo.org>

 .../mupdf-1.21.1-fix-aliasing-violation.patch      | 63 ++++++++++++++++++++++
 app-text/mupdf/mupdf-1.21.1.ebuild                 |  1 +
 2 files changed, 64 insertions(+)