Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation with clang #4228

Closed
wants to merge 2 commits into from
Closed

Fix compilation with clang #4228

wants to merge 2 commits into from

Conversation

LordAro
Copy link

@LordAro LordAro commented Mar 4, 2014

At least, clang 3.4, on Arch Linux

Otherwise it errors with __float128 errors, and there's also a "register keyword is deprecated" error fix in there too

"Fixes" #4227

At least, clang 3.4, on Arch Linux
@LordAro LordAro mentioned this pull request Mar 4, 2014
@hatstand
Copy link
Contributor

hatstand commented Mar 4, 2014

Out of curiosity, does using libc++/libstdc++ make a difference?

@LordAro
Copy link
Author

LordAro commented Mar 4, 2014

(Without my patch)
Using -stdlib=libc++ instead of the STRICT_ANSI changes, the __float128 error seems to be removed, but the register error (which required the -Wno-deprecated-register addition) still happens

@hatstand
Copy link
Contributor

hatstand commented Mar 6, 2014

This breaks compilation on ubuntu precise with gcc:

clementine/3rdparty/chromaprint/src/avresample/resample2.c:115:17: error: ‘M_PI’ undeclared (first use in this function)

@LordAro
Copy link
Author

LordAro commented Mar 6, 2014

I can't reproduce this
Nor can do I have the necessary libraries to need to compile chromaprint - which do i need?

@LordAro
Copy link
Author

LordAro commented Mar 6, 2014

Also, M_PI was dropped in C99 - i'm reasonably certain i haven't changed the standards of the C files

That said, i did have trouble with isfinite, so i've amended (locally) a -std setting for moodbar

At least, clang 3.4, on Arch Linux
@LordAro
Copy link
Author

LordAro commented Mar 19, 2014

Bump?

@davidsansome
Copy link
Member

To build 3rdparty/chromaprint you actually need to not have libchromaprint installed - it's only compiled if the system library isn't found.

FWIW, I get the same error:

3rdparty/chromaprint/src/avresample/resample2.c:115:17: error: ‘M_PI’ undeclared (first use in this function)

@jorgicio
Copy link

jorgicio commented May 3, 2016

My 20 cents:
I found a workaround on LLVM bugtrack, then created a patch and applied into the CMakelists.txt in the root of the source code. Using Clang 3.5.0 and Clementine 1.3.1 and working.

https://bugs.gentoo.org/attachment.cgi?id=433122&action=diff

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.

None yet

4 participants