Skip to content

fix Load definition as should be long long#12

Open
cscd98 wants to merge 1 commit intowebosbrew:mainfrom
cscd98:long-long
Open

fix Load definition as should be long long#12
cscd98 wants to merge 1 commit intowebosbrew:mainfrom
cscd98:long-long

Conversation

@cscd98
Copy link
Copy Markdown

@cscd98 cscd98 commented May 5, 2026

According to AI and compiling under new GCC (64-bit), these should be long long not int64_t.

It fails to compile as is.

Compile error (64-bit).

[100%] Linking CXX executable kodi-webos
build/cores/VideoPlayer/VideoPlayer.a(MediaPipelineWebOS.cpp.o):MediaPipelineWebOS.cpp:function CMediaPipelineWebOS::Load(CDVDStreamInfo, CDVDStreamInfo):(.text+0x6244): error: undefined reference to 'StarfishMediaAPIs::Load(char const*, void (*)(int, long, char const*, void*), void*)'

I've tested this change on kodi 32-bit and 64-bit.

@throwaway96
Copy link
Copy Markdown
Member

The core issue here is that because the 32-bit GNU toolchains use long long for (std::)int64_t while 64-bit ones use long, int64_t parameters produce different mangled symbol names on 32- and 64-bit targets.

After a lengthy discussion on Discord, we determined the original type is actually GLib's gint64. Superficial research indicates appears that GLib (at least GLib 2.78.6, used by webOS 11) does define gint64 differently across platforms, analogously to how GNU handles int64_t:
https://github.com/GNOME/glib/blob/2.78.6/meson.build#L1581-L1610

Therefore, unless we want to introduce GLIb types, we should leave it as int64_t. (While I'm not sure gint64 and int64_t are the same on all platforms, they seem to be for the ones we care about.) Problems might arise when trying to link 64-bit binaries against 32-bit libraries, but we probably shouldn't be doing that.

However, as far as I know webOS 11 userspace is still 32-bit, meaning there are no 64-bit versions of the corresponding (closed-source) LG libraries. Therefore, this question is essentially academic at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants