Re: Compile sndio as static library

From: Alexandre Ratchov <>
Date: Tue, 12 Dec 2023 09:41:49 +0100

I see no reason for not providing a static library. If you've any
local patches to do so, or examples of best Linux practices, I'm

On Mon, Dec 04, 2023 at 03:21:40AM +0800, Fuzhou Chen wrote:
> Hello,
> I'm a game developer. I'm working on a project to compile the game engine I
> use, (Haxe/Hashlink) in 100% static link for Linux. I noticed the engine
> depends on openal-soft -> libsndio -> alsa-lib. I have successfully build
> openal-soft and alsa-lib as static libraries, but seems libsndio Makefile
> supports building only .so.
> I'm not an audio expert, so I'm wondering whether there's any reason that
> libsndio must be built as a shared library?
>    === Describe the scenario of my ask ===
> I want my game engine to be static linked is because I want to ensure
> -static-libgcc and -static-libstdc++ option added to all dependencies, thus my
> built binaries can be distributed to a Linux machine with older libgcc and
> libstdc++ installed. My typical scenario is when my Github CI machine is
> Ubuntu:latest while my code runs on Ubuntu Runtime.
> Thus, there are two solutions: a) I make all my dependencies static. Then I
> just need to add the two link options when building final Hashlink binary. If
> this is not possible, then b) it's also OK that I add the options when building
> libsndio. 
> I'm developing a private fix following b) for libsndio. I understand this is
> not a common option that should be enabled by default. Thus, I would like to
> ask for suggestions that which direction looks better.
> Any suggestions are appreciated.
> Regards,
> Fuzhou
Received on Tue Dec 12 2023 - 09:41:49 CET

This archive was generated by hypermail 2.3.0 : Wed Dec 13 2023 - 01:30:01 CET