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

mpd fails to build with latest glibc 2.30 #630

Open
david-geiger opened this issue Aug 22, 2019 · 5 comments

Comments

@david-geiger
Copy link

commented Aug 22, 2019

Hi,

I tried to build latest mpd release (0.21.14) on Mageia Cauldron, but it fails against latest glibc 2.30 with:

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
../src/output/plugins/SolarisOutputPlugin.cxx:25:10: fatal error: sys/stropts.h: No such file or directory
#include <sys/stropts.h>
^~~~~~~~~~~~~~~
compilation terminated.

If I remove the #include <sys/stropts.h> now it fails with:

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
../src/output/plugins/SolarisOutputPlugin.cxx: In member function 'virtual void SolarisOutput::Cancel()':
../src/output/plugins/SolarisOutputPlugin.cxx:144:18: error: 'I_FLUSH' was not declared in this scope; did you mean 'CFLUSH'?
144 | ioctl(fd.Get(), I_FLUSH);
| ^~~~~~~
| CFLUSH

Regards,
David

@MaxKellermann

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

Mageia, that's Linux, not Solaris. Why did you enable the Solaris output plugin on Linux? It's disabled by default on Linux.

@MaxKellermann

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

Fixed in 818b7e0, for those people (other than me) who insist on building the Solaris plugin on Linux.

MaxKellermann added a commit that referenced this issue Aug 22, 2019
output/solaris: include sys/stropts.h only on Solaris
This header had been available for a long time on Linux, but was
removed in glibc 2.30.  This commit moves the `#include` line inside
the `#ifdef __sun` block and adds a fake declaration of `I_FLUSH` for
the Linux build.

Closes #630
@david-geiger

This comment has been minimized.

Copy link
Author

commented Aug 22, 2019

I don't know why it is enable on linux, but we haven't enable it manually or something else.

Let's try your fix!

@MaxKellermann

This comment has been minimized.

Copy link
Member

commented Aug 22, 2019

If it was auto-enabled on Linux, that would be another bug.
(Note that -Dauto_features=enabled qualifies as "enabling the Solaris plugin explicitly".)

@david-geiger

This comment has been minimized.

Copy link
Author

commented Aug 22, 2019

So ok now! mpd successful built, many thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.