xiph / flac

Free Lossless Audio Codec
https://xiph.org/flac/
GNU Free Documentation License v1.3
1.58k stars 278 forks source link

Consider providing official statically linked builds for Windows #703

Open fgimian opened 2 months ago

fgimian commented 2 months ago

Hey there, thanks so much for your work on FLAC.

I'm aware that various people have created static builds of FLAC (e.g. RareWares), but in my testing, I have found the official builds to be faster than the most standard 3rd party builds (e.g. without AVX2 enabled).

I'd like to package FLAC for winget (I recently packaged LAME), but currently winget only supports statically linked binaries.

Would you consider making an official statically linked binary download available as an option please?

Thanks a lot Fotis

ktmf01 commented 3 weeks ago

I'm aware that various people have created static builds of FLAC (e.g. RareWares), but in my testing, I have found the official builds to be faster than the most standard 3rd party builds (e.g. without AVX2 enabled).

I have seen a lot of comparisons, and in most such static builds are on par or faster. Maybe you could share some results?

but currently winget only supports statically linked binaries.

That seems like an odd design choice?

Would you consider making an official statically linked binary download available as an option please?

I'd prefer not to, to be honest. That way I can test four executables (32-bit and 64-bit flac and metaflac) and provide binaries and DLLs. If I would also release static binaries, that would amount to double the amount of testing.

ktmf01 commented 3 weeks ago

Maybe using an executable packer would be a good idea here?

fgimian commented 3 weeks ago

Apologies for the late reply.

I have seen a lot of comparisons, and in most such static builds are on par or faster. Maybe you could share some results?

Since posting this issue, I have been in touch with John Edwards of RareWares and done several benchmarks. The reason his older builds were slower was that they were compiled with the Intel 19.0 compiler instead of GCC. John has since posted GCC builds which are on par with the official builds in terms of performance. Unfortunately, my PR to winget for the RareWares builds was merged and then removed because the RareWares builds are not from the original author. See https://github.com/microsoft/winget-pkgs/pull/155261 and https://github.com/microsoft/winget-pkgs/pull/155439

but currently winget only supports statically linked binaries.

That seems like an odd design choice?

I completely agree with you 😢

Would you consider making an official statically linked binary download available as an option please?

I'd prefer not to, to be honest. That way I can test four executables (32-bit and 64-bit flac and metaflac) and provide binaries and DLLs. If I would also release static binaries, that would amount to double the amount of testing.

I completely understand.

Maybe using an executable packer would be a good idea here?

That could work yeah. Otherwise we could wait for the following winget issue to be solved https://github.com/microsoft/winget-cli/issues/2711

Huge thanks Fotis