Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906989 - games-simulation/openrct2-0.4.5 fails to compile (MUSL-SYSTEM): FileStream.cpp:25:20: error: ftello64 was not declared in this scope
Summary: games-simulation/openrct2-0.4.5 fails to compile (MUSL-SYSTEM): FileStream.cp...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Conrad Kostecki
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 903611
  Show dependency tree
 
Reported: 2023-05-23 11:44 UTC by Agostino Sarubbo
Modified: 2023-05-31 19:24 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,271.27 KB, text/plain)
2023-05-23 11:44 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-05-23 11:44:39 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: games-simulation/openrct2-0.4.5 fails to compile (MUSL-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc but this bug MAY or MAY NOT BE related to musl.
Comment 1 Agostino Sarubbo gentoo-dev 2023-05-23 11:44:42 UTC
Created attachment 862264 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-05-23 11:44:43 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: CMakeFiles/libopenrct2.dir/src/openrct2/core/FileStream.cpp.o 
/var/tmp/portage/games-simulation/openrct2-0.4.5/work/OpenRCT2-0.4.5/src/openrct2/core/FileStream.cpp:25:20: error: 'ftello64' was not declared in this scope; did you mean 'ftello'?
Comment 3 Conrad Kostecki gentoo-dev 2023-05-31 16:21:37 UTC
@sam: Any idea for this one?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-31 19:24:08 UTC
(In reply to Conrad Kostecki from comment #3)
> @sam: Any idea for this one?

See https://bugs.gentoo.org/903611#c0.

At https://github.com/OpenRCT2/OpenRCT2/blob/e6bee21682d36af5b5580b5f14f8e065a847b350/src/openrct2/core/FileStream.cpp#L24, we *unconditionally* use ftello64 and friends on Linux, but this isn't right.

On glibc, we can set FILE_OFFSET_BITS=64 to make ftello-act-LFS aware.
On musl, ftello is already LFS aware.

So, lines 24-27 can be removed if in the build system, we can add -D_FILE_OFFSET_BITS=64 somewhere.