Skip to content

Fixed various incompatibilities so it would compile for Termux#20

Open
visagemsc wants to merge 7 commits into
ComposersDesktop:mainfrom
visagemsc:main
Open

Fixed various incompatibilities so it would compile for Termux#20
visagemsc wants to merge 7 commits into
ComposersDesktop:mainfrom
visagemsc:main

Conversation

@visagemsc

@visagemsc visagemsc commented Aug 29, 2025

Copy link
Copy Markdown

Trying to find some way of replicating the timer function in dev/externals/fastconv/fconv.cpp since sys/timeb.h doesn't exist in Android's bionic C library nor in OpenBSD but this is all that made it compile in my phone up to that poimt

@visagemsc visagemsc changed the title Fixed varipus incompatibilities so it would compile for Termux Fixed various incompatibilities so it would compile for Termux Aug 29, 2025
@visagemsc

Copy link
Copy Markdown
Author

So apparently <sys/timeb.h> has been scrapped from Glibc since 2023 and now I'm trying to change over all usage of <sys/timeb.h> with clock_gettime().

@richarddobson

richarddobson commented Aug 31, 2025 via email

Copy link
Copy Markdown
Contributor

@visagemsc

Copy link
Copy Markdown
Author

Considering clock_gettime() is the current standard way of gathering information about time, I think we should handle this with CMake via either checking for <sys/timeb.h> or a simple -DNO_TIMEB option.

@richarddobson

richarddobson commented Aug 31, 2025 via email

Copy link
Copy Markdown
Contributor

@visagemsc

Copy link
Copy Markdown
Author

I do understand it if you don't want to directly support Android and now I see that ftime holds a bigger place in the world than I thought but please do consider adding those first 3 commits in. There are distros like Alpine Linux and glaucus which don't use GLIBC as their main C runtime. I don't really have any justification for S_IWUSR and S_IRUSR besides just being up-to-date with the current POSIX conventions as you can never guess when they'll be removed too.

@robertkirkman

robertkirkman commented Sep 1, 2025

Copy link
Copy Markdown

Alpine Linux

I started making a build script for CDP8 for Alpine Linux and the similar distro Chimera Linux, but it would take a long time to set up because Alpine Linux and Chimera Linux do not provide packages containing builds of the static library of portaudio, only the shared library (and this is something that this PR does not currently address), so my preferred solutions to that are one of the following:

I could either edit CDP8 to link to the shared library instead of the static library, or I could write steps for downloading the source code of each operating system, recompiling its portaudio package with the static libraries enabled, and reinstalling the package.

I'm not personally a big fan of other solutions like compiling an entire copy of all of the source code of PortAudio within the build system of CDP8 instead of the build system of the operating system, because some operating systems add specialized patches or settings into their packages of PortAudio that would not be present unless specifically preserved, which could cause that copy of PortAudio, and therefore also the build of CDP8 linked to it, to not work in ways that might be difficult to predict. However, it is possible to set up that way as a last resort, because an alternative approach that would work is to first set it up that way, and then write steps showing how to manually collect and apply any operating-system-specific PortAudio patches and build settings into the vendored PortAudio on a case-by-case basis.

I have paused working on ports of CDP8 to Alpine Linux, Chimera Linux, FreeBSD and OpenBSD because I noticed that nobody has asked for CDP8 on those operating systems, so there might be no users, but if someone wants it on one of those they can ping me and I might make it for them.

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.

3 participants