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: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Conrad Kostecki
URL: https://github.com/OpenRCT2/OpenRCT2/...
Whiteboard:
Keywords:
Depends on:
Blocks: musl-1.2.4 musl-1.2.4-stable
  Show dependency tree
 
Reported: 2023-05-23 11:44 UTC by Agostino Sarubbo
Modified: 2024-01-05 04:17 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.
Comment 5 Larry the Git Cow gentoo-dev 2024-01-04 21:08:23 UTC
The bug has been closed via the following commit(s):

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

commit ca9c069f8fa8b9d2d52db549f8116c2b12df1c6c
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2024-01-04 21:06:55 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2024-01-04 21:08:09 +0000

    games-simulation/openrct2: fix musl build
    
    Closes: https://bugs.gentoo.org/906989
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 .../openrct2/files/openrct2-0.4.7-musl.patch       | 55 ++++++++++++++++++++++
 games-simulation/openrct2/openrct2-0.4.7.ebuild    |  1 +
 2 files changed, 56 insertions(+)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-05 04:17:27 UTC
cheers conikost!