* ALSA 1.1.8 Release - POLLRDNORM undefined @ 2019-01-08 17:00 Jay Foster 2019-01-09 11:10 ` Takashi Iwai 0 siblings, 1 reply; 11+ messages in thread From: Jay Foster @ 2019-01-08 17:00 UTC (permalink / raw) To: ALSA development I am attempting to build the 1.1.8 release of alsa-utils and getting an error about POLLRDNORM (and others) undefined. This error comes from axfer/waiter-select.c. axfer/waiter-select.c includes "waiter.h", which includes "poll.h". This build is for a linux target. poll.h includes sys/poll.h which includes bits/poll.h, which only defines POLLRDNORM (and others) when __USE_XOPEN is defined (which it is not). However, linux/poll.h includes asm/poll.h which includes asm-generic/poll.h which does define POLLRDNORM (and others). Should I change my build to define__USE_XOPEN or should I patch waiter.h to include linux/poll.h instead of just poll.h? Jay _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-08 17:00 ALSA 1.1.8 Release - POLLRDNORM undefined Jay Foster @ 2019-01-09 11:10 ` Takashi Iwai 2019-01-09 16:22 ` Jay Foster 0 siblings, 1 reply; 11+ messages in thread From: Takashi Iwai @ 2019-01-09 11:10 UTC (permalink / raw) To: jay; +Cc: ALSA development On Tue, 08 Jan 2019 18:00:18 +0100, Jay Foster wrote: > > I am attempting to build the 1.1.8 release of alsa-utils and getting > an error about POLLRDNORM (and others) undefined. This error comes > from axfer/waiter-select.c. axfer/waiter-select.c includes > "waiter.h", which includes "poll.h". This build is for a linux > target. > > poll.h includes sys/poll.h which includes bits/poll.h, which only > defines POLLRDNORM (and others) when __USE_XOPEN is defined (which it > is not). > > However, linux/poll.h includes asm/poll.h which includes > asm-generic/poll.h which does define POLLRDNORM (and others). > > Should I change my build to define__USE_XOPEN or should I patch > waiter.h to include linux/poll.h instead of just poll.h? Which libc are you using? The POSIX man page (man poll.h) mentions POLLRDNORM defined there, at least, on my system with glibc 2.27. thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-09 11:10 ` Takashi Iwai @ 2019-01-09 16:22 ` Jay Foster 2019-01-09 20:33 ` Takashi Iwai 2019-01-09 20:33 ` Jay Foster 0 siblings, 2 replies; 11+ messages in thread From: Jay Foster @ 2019-01-09 16:22 UTC (permalink / raw) To: Takashi Iwai; +Cc: ALSA development On 1/9/2019 3:10 AM, Takashi Iwai wrote: > On Tue, 08 Jan 2019 18:00:18 +0100, > Jay Foster wrote: >> I am attempting to build the 1.1.8 release of alsa-utils and getting >> an error about POLLRDNORM (and others) undefined. This error comes >> from axfer/waiter-select.c. axfer/waiter-select.c includes >> "waiter.h", which includes "poll.h". This build is for a linux >> target. >> >> poll.h includes sys/poll.h which includes bits/poll.h, which only >> defines POLLRDNORM (and others) when __USE_XOPEN is defined (which it >> is not). >> >> However, linux/poll.h includes asm/poll.h which includes >> asm-generic/poll.h which does define POLLRDNORM (and others). >> >> Should I change my build to define__USE_XOPEN or should I patch >> waiter.h to include linux/poll.h instead of just poll.h? > Which libc are you using? The POSIX man page (man poll.h) mentions > POLLRDNORM defined there, at least, on my system with glibc 2.27. > > > thanks, > > Takashi > > This is a legacy ARM product using glibc 2.9. Neither of the approaches I mentioned above actually worked. <linux/poll.h> is the kernel headers, which results in a duplicate definition of struct pollfds. The other approach (I added 'CFLAGS=-D_XOPEN_SOURCE=500' to the make command line, and other variations) failed elsewhere due to missing or mismatched function prototypes (ref <features.h>). I got this to work by patching axfer/waiter.h to add the missing defintions, based on those found in <asm-generic/poll.h>. Jay _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-09 16:22 ` Jay Foster @ 2019-01-09 20:33 ` Takashi Iwai 2019-01-09 20:35 ` Takashi Iwai 2019-01-09 20:33 ` Jay Foster 1 sibling, 1 reply; 11+ messages in thread From: Takashi Iwai @ 2019-01-09 20:33 UTC (permalink / raw) To: jay; +Cc: ALSA development On Wed, 09 Jan 2019 17:22:36 +0100, Jay Foster wrote: > > > > On 1/9/2019 3:10 AM, Takashi Iwai wrote: > > On Tue, 08 Jan 2019 18:00:18 +0100, > > Jay Foster wrote: > >> I am attempting to build the 1.1.8 release of alsa-utils and getting > >> an error about POLLRDNORM (and others) undefined. This error comes > >> from axfer/waiter-select.c. axfer/waiter-select.c includes > >> "waiter.h", which includes "poll.h". This build is for a linux > >> target. > >> > >> poll.h includes sys/poll.h which includes bits/poll.h, which only > >> defines POLLRDNORM (and others) when __USE_XOPEN is defined (which it > >> is not). > >> > >> However, linux/poll.h includes asm/poll.h which includes > >> asm-generic/poll.h which does define POLLRDNORM (and others). > >> > >> Should I change my build to define__USE_XOPEN or should I patch > >> waiter.h to include linux/poll.h instead of just poll.h? > > Which libc are you using? The POSIX man page (man poll.h) mentions > > POLLRDNORM defined there, at least, on my system with glibc 2.27. > > > > > > thanks, > > > > Takashi > > > > > This is a legacy ARM product using glibc 2.9. Neither of the > approaches I mentioned above actually worked. <linux/poll.h> is the > kernel headers, which results in a duplicate definition of struct > pollfds. The other approach (I added 'CFLAGS=-D_XOPEN_SOURCE=500' to > the make command line, and other variations) failed elsewhere due to > missing or mismatched function prototypes (ref <features.h>). > > I got this to work by patching axfer/waiter.h to add the missing > defintions, based on those found in <asm-generic/poll.h>. I wonder what is supposed on such a system. poll() needs these POLL* constant definitions, and they aren't available by simple poll.h? That's weird. What does "man poll.h" say in your version? thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-09 20:33 ` Takashi Iwai @ 2019-01-09 20:35 ` Takashi Iwai 2019-01-09 20:39 ` Jay Foster 0 siblings, 1 reply; 11+ messages in thread From: Takashi Iwai @ 2019-01-09 20:35 UTC (permalink / raw) To: jay; +Cc: ALSA development On Wed, 09 Jan 2019 21:33:11 +0100, Takashi Iwai wrote: > > On Wed, 09 Jan 2019 17:22:36 +0100, > Jay Foster wrote: > > > > > > > > On 1/9/2019 3:10 AM, Takashi Iwai wrote: > > > On Tue, 08 Jan 2019 18:00:18 +0100, > > > Jay Foster wrote: > > >> I am attempting to build the 1.1.8 release of alsa-utils and getting > > >> an error about POLLRDNORM (and others) undefined. This error comes > > >> from axfer/waiter-select.c. axfer/waiter-select.c includes > > >> "waiter.h", which includes "poll.h". This build is for a linux > > >> target. > > >> > > >> poll.h includes sys/poll.h which includes bits/poll.h, which only > > >> defines POLLRDNORM (and others) when __USE_XOPEN is defined (which it > > >> is not). > > >> > > >> However, linux/poll.h includes asm/poll.h which includes > > >> asm-generic/poll.h which does define POLLRDNORM (and others). > > >> > > >> Should I change my build to define__USE_XOPEN or should I patch > > >> waiter.h to include linux/poll.h instead of just poll.h? > > > Which libc are you using? The POSIX man page (man poll.h) mentions > > > POLLRDNORM defined there, at least, on my system with glibc 2.27. > > > > > > > > > thanks, > > > > > > Takashi > > > > > > > > This is a legacy ARM product using glibc 2.9. Neither of the > > approaches I mentioned above actually worked. <linux/poll.h> is the > > kernel headers, which results in a duplicate definition of struct > > pollfds. The other approach (I added 'CFLAGS=-D_XOPEN_SOURCE=500' to > > the make command line, and other variations) failed elsewhere due to > > missing or mismatched function prototypes (ref <features.h>). > > > > I got this to work by patching axfer/waiter.h to add the missing > > defintions, based on those found in <asm-generic/poll.h>. > > I wonder what is supposed on such a system. poll() needs these POLL* > constant definitions, and they aren't available by simple poll.h? > That's weird. What does "man poll.h" say in your version? ... or maybe it's only about a few of them that are missing? Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-09 20:35 ` Takashi Iwai @ 2019-01-09 20:39 ` Jay Foster 2019-01-10 4:24 ` Takashi Sakamoto 0 siblings, 1 reply; 11+ messages in thread From: Jay Foster @ 2019-01-09 20:39 UTC (permalink / raw) To: Takashi Iwai; +Cc: ALSA development On 1/9/2019 12:35 PM, Takashi Iwai wrote: > On Wed, 09 Jan 2019 21:33:11 +0100, > Takashi Iwai wrote: >> On Wed, 09 Jan 2019 17:22:36 +0100, >> Jay Foster wrote: >>> >>> >>> On 1/9/2019 3:10 AM, Takashi Iwai wrote: >>>> On Tue, 08 Jan 2019 18:00:18 +0100, >>>> Jay Foster wrote: >>>>> I am attempting to build the 1.1.8 release of alsa-utils and getting >>>>> an error about POLLRDNORM (and others) undefined. This error comes >>>>> from axfer/waiter-select.c. axfer/waiter-select.c includes >>>>> "waiter.h", which includes "poll.h". This build is for a linux >>>>> target. >>>>> >>>>> poll.h includes sys/poll.h which includes bits/poll.h, which only >>>>> defines POLLRDNORM (and others) when __USE_XOPEN is defined (which it >>>>> is not). >>>>> >>>>> However, linux/poll.h includes asm/poll.h which includes >>>>> asm-generic/poll.h which does define POLLRDNORM (and others). >>>>> >>>>> Should I change my build to define__USE_XOPEN or should I patch >>>>> waiter.h to include linux/poll.h instead of just poll.h? >>>> Which libc are you using? The POSIX man page (man poll.h) mentions >>>> POLLRDNORM defined there, at least, on my system with glibc 2.27. >>>> >>>> >>>> thanks, >>>> >>>> Takashi >>>> >>>> >>> This is a legacy ARM product using glibc 2.9. Neither of the >>> approaches I mentioned above actually worked. <linux/poll.h> is the >>> kernel headers, which results in a duplicate definition of struct >>> pollfds. The other approach (I added 'CFLAGS=-D_XOPEN_SOURCE=500' to >>> the make command line, and other variations) failed elsewhere due to >>> missing or mismatched function prototypes (ref <features.h>). >>> >>> I got this to work by patching axfer/waiter.h to add the missing >>> defintions, based on those found in <asm-generic/poll.h>. >> I wonder what is supposed on such a system. poll() needs these POLL* >> constant definitions, and they aren't available by simple poll.h? >> That's weird. What does "man poll.h" say in your version? > ... or maybe it's only about a few of them that are missing? > > > Takashi > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel I think our emails crossed. Yes, only a few are missing. in <bits/poll.h> I see: #ifdef __USE_XOPEN /* These values are defined in XPG4.2. */ # define POLLRDNORM 0x040 /* Normal data may be read. */ # define POLLRDBAND 0x080 /* Priority data may be read. */ # define POLLWRNORM 0x100 /* Writing now will not block. */ # define POLLWRBAND 0x200 /* Priority data may be written. */ #endif It is only those that are not defined. Adding -D_GNU_SOURCE gets them defined, though. Interesting how the man page for poll.h does not mention this for glibc. Jay _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-09 20:39 ` Jay Foster @ 2019-01-10 4:24 ` Takashi Sakamoto 2019-01-10 8:31 ` Jaroslav Kysela 0 siblings, 1 reply; 11+ messages in thread From: Takashi Sakamoto @ 2019-01-10 4:24 UTC (permalink / raw) To: Jay Foster; +Cc: tiwai, alsa-devel Hi, I'm an author of axfer. On Tue, 08 Jan 2019 18:00:18 +0100, Jay Foster wrote: > I am attempting to build the 1.1.8 release of alsa-utils and getting > an error about POLLRDNORM (and others) undefined. This error comes > from axfer/waiter-select.c. axfer/waiter-select.c includes > "waiter.h", which includes "poll.h". This build is for a linux > target. > On Wed, 09 Jan 2019 17:22:36 +0100, Jay Foster wrote: > > On 1/9/2019 3:10 AM, Takashi Iwai wrote: > > > Which libc are you using? The POSIX man page (man poll.h) mentions > > > POLLRDNORM defined there, at least, on my system with glibc 2.27. > > > > This is a legacy ARM product using glibc 2.9. I'm sorry for the FTBFS but it's out of my notice to build with too-old glibc. Here, a history of glibc for related events: * glibc-2.9: 2008/11/13 * your version * glibc-2.10: 2009/5/9 * support XPG7/POSIX-2008 * add '__USE_XOPEN2k8' for the avove * glibc-2.19: 2014/2/7 * add '_DEFAULT_SOURCE' macro * XPG7/POSIX-2008 is a default behaviour * glibc-2.20: 2014/9/7 * obsolete '_BSD_SOURCE' and '_SYSV_SOURCE' macros * glibc-2.28: 2018/8/1 * used my environment (Ubuntu 18.10) The macros, POLLRDNORM and the others, seems to be defined officially in POSIX-2008 and nowadays glibc supports POSIX-2008 as a default. This is the reason that I've never faced your issue in my development period. I guess it's the reason that nothing noted in man of poll(2) and select(2). I need a bit time to judge whether it's woth to support such old-glibc. Just removal of the newly-introduced macros is a simple solution. Thanks for your report Takashi Sakamoto ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-10 4:24 ` Takashi Sakamoto @ 2019-01-10 8:31 ` Jaroslav Kysela 2019-01-10 16:44 ` Jay Foster 0 siblings, 1 reply; 11+ messages in thread From: Jaroslav Kysela @ 2019-01-10 8:31 UTC (permalink / raw) To: Takashi Sakamoto; +Cc: tiwai, alsa-devel, Jay Foster Dne 10.1.2019 v 05:24 Takashi Sakamoto napsal(a): > Hi, > > I'm an author of axfer. > > On Tue, 08 Jan 2019 18:00:18 +0100, Jay Foster wrote: >> I am attempting to build the 1.1.8 release of alsa-utils and getting >> an error about POLLRDNORM (and others) undefined. This error comes >> from axfer/waiter-select.c. axfer/waiter-select.c includes >> "waiter.h", which includes "poll.h". This build is for a linux >> target. > >> On Wed, 09 Jan 2019 17:22:36 +0100, Jay Foster wrote: >>> On 1/9/2019 3:10 AM, Takashi Iwai wrote: >>>> Which libc are you using? The POSIX man page (man poll.h) mentions >>>> POLLRDNORM defined there, at least, on my system with glibc 2.27. >>> >>> This is a legacy ARM product using glibc 2.9. > > I'm sorry for the FTBFS but it's out of my notice to build with too-old glibc. > > Here, a history of glibc for related events: > * glibc-2.9: 2008/11/13 > * your version > * glibc-2.10: 2009/5/9 > * support XPG7/POSIX-2008 > * add '__USE_XOPEN2k8' for the avove > * glibc-2.19: 2014/2/7 > * add '_DEFAULT_SOURCE' macro > * XPG7/POSIX-2008 is a default behaviour > * glibc-2.20: 2014/9/7 > * obsolete '_BSD_SOURCE' and '_SYSV_SOURCE' macros > * glibc-2.28: 2018/8/1 > * used my environment (Ubuntu 18.10) > > The macros, POLLRDNORM and the others, seems to be defined officially in > POSIX-2008 and nowadays glibc supports POSIX-2008 as a default. This is > the reason that I've never faced your issue in my development period. > I guess it's the reason that nothing noted in man of poll(2) and > select(2). > > I need a bit time to judge whether it's woth to support such old-glibc. > Just removal of the newly-introduced macros is a simple solution. We may add those definitions to CFLAGS (-D) through configure for the old libs. Or just used #ifdef in the waiter-select.c - it's only one place which uses this at this moment, but it's only quick workaround. Jaroslav -- Jaroslav Kysela <perex@perex.cz> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-10 8:31 ` Jaroslav Kysela @ 2019-01-10 16:44 ` Jay Foster 2019-01-11 0:39 ` Takashi Sakamoto 0 siblings, 1 reply; 11+ messages in thread From: Jay Foster @ 2019-01-10 16:44 UTC (permalink / raw) To: Jaroslav Kysela, Takashi Sakamoto; +Cc: tiwai, alsa-devel On 1/10/2019 12:31 AM, Jaroslav Kysela wrote: > Dne 10.1.2019 v 05:24 Takashi Sakamoto napsal(a): >> Hi, >> >> I'm an author of axfer. >> >> On Tue, 08 Jan 2019 18:00:18 +0100, Jay Foster wrote: >>> I am attempting to build the 1.1.8 release of alsa-utils and getting >>> an error about POLLRDNORM (and others) undefined. This error comes >>> from axfer/waiter-select.c. axfer/waiter-select.c includes >>> "waiter.h", which includes "poll.h". This build is for a linux >>> target. >>> On Wed, 09 Jan 2019 17:22:36 +0100, Jay Foster wrote: >>>> On 1/9/2019 3:10 AM, Takashi Iwai wrote: >>>>> Which libc are you using? The POSIX man page (man poll.h) mentions >>>>> POLLRDNORM defined there, at least, on my system with glibc 2.27. >>>> This is a legacy ARM product using glibc 2.9. >> I'm sorry for the FTBFS but it's out of my notice to build with too-old glibc. >> >> Here, a history of glibc for related events: >> * glibc-2.9: 2008/11/13 >> * your version >> * glibc-2.10: 2009/5/9 >> * support XPG7/POSIX-2008 >> * add '__USE_XOPEN2k8' for the avove >> * glibc-2.19: 2014/2/7 >> * add '_DEFAULT_SOURCE' macro >> * XPG7/POSIX-2008 is a default behaviour >> * glibc-2.20: 2014/9/7 >> * obsolete '_BSD_SOURCE' and '_SYSV_SOURCE' macros >> * glibc-2.28: 2018/8/1 >> * used my environment (Ubuntu 18.10) >> >> The macros, POLLRDNORM and the others, seems to be defined officially in >> POSIX-2008 and nowadays glibc supports POSIX-2008 as a default. This is >> the reason that I've never faced your issue in my development period. >> I guess it's the reason that nothing noted in man of poll(2) and >> select(2). >> >> I need a bit time to judge whether it's woth to support such old-glibc. >> Just removal of the newly-introduced macros is a simple solution. > We may add those definitions to CFLAGS (-D) through configure for the > old libs. Or just used #ifdef in the waiter-select.c - it's only one > place which uses this at this moment, but it's only quick workaround. > > Jaroslav > I can resolve the issue by adding -D_GNU_SOURCE to my CFLAGS when building alsa-utils. It would also be acceptable (to me) if you did nothing about this. If you wish to check the version of glibc for support of POLLRDNORM through configure and add -D_GNU_SOURCE for older versions, that may work too. I can report that-D_GNU_SOURCE is not needed with glibc 2.22. I am not sure precisely which version the POLLRDNORM (and friends) were enabled by default. I can imagine a configure test that compiled a test app which tries to use POLLRDNORM, and if it compiles successfully, then nothing else is needed. If not, try again with -D_GNU_SOURCE, and if that works, add -D_GNU_SOURCE to the CFLAGS. Such a test might also be conditional on selecting waiter-select (the only place this is used). Jay _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-10 16:44 ` Jay Foster @ 2019-01-11 0:39 ` Takashi Sakamoto 0 siblings, 0 replies; 11+ messages in thread From: Takashi Sakamoto @ 2019-01-11 0:39 UTC (permalink / raw) To: Jay Foster; +Cc: tiwai, alsa-devel On Thu, Jan 10, 2019 at 08:44:34AM -0800, Jay Foster wrote: > On 1/10/2019 12:31 AM, Jaroslav Kysela wrote: > > Dne 10.1.2019 v 05:24 Takashi Sakamoto napsal(a): > > > Hi, > > > > > > I'm an author of axfer. > > > > > > On Tue, 08 Jan 2019 18:00:18 +0100, Jay Foster wrote: > > > > I am attempting to build the 1.1.8 release of alsa-utils and getting > > > > an error about POLLRDNORM (and others) undefined. This error comes > > > > from axfer/waiter-select.c. axfer/waiter-select.c includes > > > > "waiter.h", which includes "poll.h". This build is for a linux > > > > target. > > > > On Wed, 09 Jan 2019 17:22:36 +0100, Jay Foster wrote: > > > > > On 1/9/2019 3:10 AM, Takashi Iwai wrote: > > > > > > Which libc are you using? The POSIX man page (man poll.h) mentions > > > > > > POLLRDNORM defined there, at least, on my system with glibc 2.27. > > > > > This is a legacy ARM product using glibc 2.9. > > > I'm sorry for the FTBFS but it's out of my notice to build with too-old glibc. > > > > > > Here, a history of glibc for related events: > > > * glibc-2.9: 2008/11/13 > > > * your version > > > * glibc-2.10: 2009/5/9 > > > * support XPG7/POSIX-2008 > > > * add '__USE_XOPEN2k8' for the avove > > > * glibc-2.19: 2014/2/7 > > > * add '_DEFAULT_SOURCE' macro > > > * XPG7/POSIX-2008 is a default behaviour > > > * glibc-2.20: 2014/9/7 > > > * obsolete '_BSD_SOURCE' and '_SYSV_SOURCE' macros > > > * glibc-2.28: 2018/8/1 > > > * used my environment (Ubuntu 18.10) > > > > > > The macros, POLLRDNORM and the others, seems to be defined officially in > > > POSIX-2008 and nowadays glibc supports POSIX-2008 as a default. This is > > > the reason that I've never faced your issue in my development period. > > > I guess it's the reason that nothing noted in man of poll(2) and > > > select(2). > > > > > > I need a bit time to judge whether it's woth to support such old-glibc. > > > Just removal of the newly-introduced macros is a simple solution. > > We may add those definitions to CFLAGS (-D) through configure for the > > old libs. Or just used #ifdef in the waiter-select.c - it's only one > > place which uses this at this moment, but it's only quick workaround. > > > I can resolve the issue by adding -D_GNU_SOURCE to my CFLAGS when building > alsa-utils. It would also be acceptable (to me) if you did nothing about > this. > > If you wish to check the version of glibc for support of POLLRDNORM through > configure and add -D_GNU_SOURCE for older versions, that may work too. I > can report that-D_GNU_SOURCE is not needed with glibc 2.22. I am not sure > precisely which version the POLLRDNORM (and friends) were enabled by > default. I can imagine a configure test that compiled a test app which > tries to use POLLRDNORM, and if it compiles successfully, then nothing else > is needed. If not, try again with -D_GNU_SOURCE, and if that works, add > -D_GNU_SOURCE to the CFLAGS. Such a test might also be conditional on > selecting waiter-select (the only place this is used). I filed this issue: https://github.com/alsa-project/alsa-utils/issues/9 Regards Takashi Sakamoto ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ALSA 1.1.8 Release - POLLRDNORM undefined 2019-01-09 16:22 ` Jay Foster 2019-01-09 20:33 ` Takashi Iwai @ 2019-01-09 20:33 ` Jay Foster 1 sibling, 0 replies; 11+ messages in thread From: Jay Foster @ 2019-01-09 20:33 UTC (permalink / raw) To: Takashi Iwai; +Cc: ALSA development On 1/9/2019 8:22 AM, Jay Foster wrote: > > > On 1/9/2019 3:10 AM, Takashi Iwai wrote: >> On Tue, 08 Jan 2019 18:00:18 +0100, >> Jay Foster wrote: >>> I am attempting to build the 1.1.8 release of alsa-utils and getting >>> an error about POLLRDNORM (and others) undefined. This error comes >>> from axfer/waiter-select.c. axfer/waiter-select.c includes >>> "waiter.h", which includes "poll.h". This build is for a linux >>> target. >>> >>> poll.h includes sys/poll.h which includes bits/poll.h, which only >>> defines POLLRDNORM (and others) when __USE_XOPEN is defined (which it >>> is not). >>> >>> However, linux/poll.h includes asm/poll.h which includes >>> asm-generic/poll.h which does define POLLRDNORM (and others). >>> >>> Should I change my build to define__USE_XOPEN or should I patch >>> waiter.h to include linux/poll.h instead of just poll.h? >> Which libc are you using? The POSIX man page (man poll.h) mentions >> POLLRDNORM defined there, at least, on my system with glibc 2.27. >> >> >> thanks, >> >> Takashi >> >> > This is a legacy ARM product using glibc 2.9. Neither of the > approaches I mentioned above actually worked. <linux/poll.h> is the > kernel headers, which results in a duplicate definition of struct > pollfds. The other approach (I added 'CFLAGS=-D_XOPEN_SOURCE=500' to > the make command line, and other variations) failed elsewhere due to > missing or mismatched function prototypes (ref <features.h>). > > I got this to work by patching axfer/waiter.h to add the missing > defintions, based on those found in <asm-generic/poll.h>. > > Jay > > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel I managed to fix the build without needing to patch by adding, 'CFLAGS="${CFLAGS} -D_GNU_SOURCE"', to the make command line. _GNU_SOURCE defines _XOPEN_SOURCE which defines __USE_XOPEN (in <features.h>) so that POLLRDNORM and friends get defined in <bits/poll.h>. Jay _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-01-11 0:39 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-01-08 17:00 ALSA 1.1.8 Release - POLLRDNORM undefined Jay Foster 2019-01-09 11:10 ` Takashi Iwai 2019-01-09 16:22 ` Jay Foster 2019-01-09 20:33 ` Takashi Iwai 2019-01-09 20:35 ` Takashi Iwai 2019-01-09 20:39 ` Jay Foster 2019-01-10 4:24 ` Takashi Sakamoto 2019-01-10 8:31 ` Jaroslav Kysela 2019-01-10 16:44 ` Jay Foster 2019-01-11 0:39 ` Takashi Sakamoto 2019-01-09 20:33 ` Jay Foster
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox