LMS-Community / slimserver-vendor

Third-party software used with Lyrion Music Server
https://lyrion.org
42 stars 68 forks source link

libicu does not compile on clang #16

Closed mnd999 closed 7 years ago

mnd999 commented 7 years ago

Presumably fixed in a more recent libicu

uspoof.cpp:369:22: error: ordered comparison between pointer and zero ('int32_t *' (aka 'int *') and 'int')
        if (position > 0) {
            ~~~~~~~~ ^ ~
mherger commented 7 years ago

You're on FreeBSD, aren't you? Did you try a newer version?

mnd999 commented 7 years ago

Yes, on FreeBSD. It's easily fixed, and was fixed by libicu about 5 years ago:

https://ssl.icu-project.org/trac/changeset/32912

Probably LMS needs to update libicu.

mnd999 commented 7 years ago

A current libicu may well work, but it's a difficult upgrade to do as the build seems to include it's own data file. The comment says:

Replace huge data file with smaller one containing only our collations

There is no indication (AFAICT) how the smaller file was generated or what it contains so it's not easy to see how to proceed other than getting rid of this step and sticking with the original file.

mherger commented 7 years ago

Did you see @fsbruva's series of pull requests for FreeBSD? They might help you get over this issue.

mnd999 commented 7 years ago

It's not a FreeBSD issue, it was but it's easy enough to patch. The issue is libicu is massively out of date and has no clear upgrade path because the current version contains modifications that afaict are unknown and were done for unknown reasons and therefore cannot be reproduced on a current version.

mnd999 commented 7 years ago

The FreeBSD PR doesn't even patch it - it just forces GCC.

fsbruva commented 7 years ago

Check out the patch to fix this within the Freebsd ports. Should fix this.  https://svnweb.freebsd.org/ports/head/audio/logitechmediaserver/files/vendorpatch-CPAN_buildme.sh?view=log With clang 3.8.0 on Freebsd 11, it builds without error, and no need to patch.

mnd999 commented 7 years ago

@fsbruva I know, I wrote the patch.

mnd999 commented 7 years ago

The purpose of this issue is to discuss whether we can upstream a proper fix by using a lest old libicu I guess.

fsbruva commented 7 years ago

What version of FreeBSD are you building on? Which compiler?

mnd999 commented 7 years ago

FreeBSD 11.1, which ships with

$ clang --version
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin
fsbruva commented 7 years ago

It's actually a clang 4.0.0 issue. LibICU builds successfully with clang 3.8.0.

mnd999 commented 7 years ago

Clang 4.0.0 treats a bug as an error, Clang 3.8.0 treats it as a warning. Some might call that an improvement. I can see I'm wasting my time here, if I have to explain why using a version of this library that old, having no upgrade path for it and blaming new compilers for finding old bug are all problems.