Message ID | 1440773264-14999-1-git-send-email-gwenj@trabucayre.com |
---|---|
State | Changes Requested |
Headers | show |
Dear Gwenhael Goavec-Merou, On 08/28/2015 03:47 PM, Gwenhael Goavec-Merou wrote: > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> > > fix : > http://autobuild.buildroot.net/results/8e3/8e3afd5f22312f0660f631fdb82bbb64eda913fb/build-end.log > > error: 'mode_t' has not been declared > > Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> > --- > package/gnuradio/0002-stat_t-is-need-for-mode_t.patch | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > create mode 100644 package/gnuradio/0002-stat_t-is-need-for-mode_t.patch > > diff --git a/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch b/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch > new file mode 100644 > index 0000000..391a12f > --- /dev/null > +++ b/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch > @@ -0,0 +1,13 @@ > +Index: gnuradio-3.7.5/gnuradio-runtime/include/gnuradio/logger.h.in > +=================================================================== > +--- gnuradio-3.7.5.orig/gnuradio-runtime/include/gnuradio/logger.h.in > ++++ gnuradio-3.7.5/gnuradio-runtime/include/gnuradio/logger.h.in > +@@ -44,6 +44,8 @@ > + > + #ifdef _MSC_VER > + typedef unsigned short mode_t; > ++#else > ++#include <sys/stat.h> > + #endif > + > + #include <gnuradio/api.h> > I cannot see that change upstream, so I will assume that you haven't backported this patch from it: http://gnuradio.org/redmine/projects/gnuradio/repository/revisions/master/entry/gnuradio-runtime/include/gnuradio/logger.h.in Have you tried to submit it your patch upstream? It would be nice if the upstream package is fixed as well, so we can just backport the patch from it, or even better, bump our version to one which has that problem fixed. Regards, Vincent.
Dear Vicente Olivert Riera On Fri, 28 Aug 2015 16:09:37 +0100 Vicente Olivert Riera <Vincent.Riera@imgtec.com> wrote: > Dear Gwenhael Goavec-Merou, > > On 08/28/2015 03:47 PM, Gwenhael Goavec-Merou wrote: > > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> > > > > fix : > > http://autobuild.buildroot.net/results/8e3/8e3afd5f22312f0660f631fdb82bbb64eda913fb/build-end.log > > > > error: 'mode_t' has not been declared > > > > Signed-off-by: Gwenhael Goavec-Merou > > <gwenhael.goavec-merou@trabucayre.com> --- > > package/gnuradio/0002-stat_t-is-need-for-mode_t.patch | 13 > > +++++++++++++ 1 file changed, 13 insertions(+) > > create mode 100644 > > package/gnuradio/0002-stat_t-is-need-for-mode_t.patch > > > > diff --git a/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch > > b/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch new file > > mode 100644 index 0000000..391a12f > > --- /dev/null > > +++ b/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch > > @@ -0,0 +1,13 @@ > > +Index: gnuradio-3.7.5/gnuradio-runtime/include/gnuradio/logger.h.in > > +=================================================================== > > +--- > > gnuradio-3.7.5.orig/gnuradio-runtime/include/gnuradio/logger.h.in > > ++++ gnuradio-3.7.5/gnuradio-runtime/include/gnuradio/logger.h.in > > +@@ -44,6 +44,8 @@ > > + > > + #ifdef _MSC_VER > > + typedef unsigned short mode_t; > > ++#else > > ++#include <sys/stat.h> > > + #endif > > + > > + #include <gnuradio/api.h> > > > > I cannot see that change upstream, so I will assume that you haven't > backported this patch from it: > > http://gnuradio.org/redmine/projects/gnuradio/repository/revisions/master/entry/gnuradio-runtime/include/gnuradio/logger.h.in > No it's not a backport. > Have you tried to submit it your patch upstream? It would be nice if > the upstream package is fixed as well, so we can just backport the > patch from it, or even better, bump our version to one which has that > problem fixed. > No. I'm agree with you about the need to send this patch to gnuradio but, currently, I'm not sure it's a global problem with all toolchains or strictly related to musl. > Regards, > > Vincent. Regards, Gwenhael.
Dear Gwenhael Goavec-Merou, On Fri, 28 Aug 2015 16:47:44 +0200, Gwenhael Goavec-Merou wrote: > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> > > fix : > http://autobuild.buildroot.net/results/8e3/8e3afd5f22312f0660f631fdb82bbb64eda913fb/build-end.log > > error: 'mode_t' has not been declared > > Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> mode_t is according to the standard (http://pubs.opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html) defined in <sys/types.h>. Can you try including <sys/types.h> instead? If that works as well, then please submit the patch upstream: it is valid for all toolchains. Thanks, Thomas
Dear Thomas Petazzoni On Fri, 28 Aug 2015 19:31:46 +0200 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Gwenhael Goavec-Merou, > > On Fri, 28 Aug 2015 16:47:44 +0200, Gwenhael Goavec-Merou wrote: > > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> > > > > fix : > > http://autobuild.buildroot.net/results/8e3/8e3afd5f22312f0660f631fdb82bbb64eda913fb/build-end.log > > > > error: 'mode_t' has not been declared > > > > Signed-off-by: Gwenhael Goavec-Merou > > <gwenhael.goavec-merou@trabucayre.com> > > mode_t is according to the standard > (http://pubs.opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html) > defined in <sys/types.h>. Can you try including <sys/types.h> instead? > Ok It's working with sys/types.h > If that works as well, then please submit the patch upstream: it is > valid for all toolchains. > I've checked all the autobuild for 07/2015 and 08/2015. The missing mode_t only appears if the toolchain is based on musl. I'll will, nevertheless, try to send my patch to gnuradio. Gwenhael
Hello, On Sat, 29 Aug 2015 15:52:27 +0200, gwenhael.goavec wrote: > > mode_t is according to the standard > > (http://pubs.opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html) > > defined in <sys/types.h>. Can you try including <sys/types.h> instead? > > > Ok It's working with sys/types.h Good. > > If that works as well, then please submit the patch upstream: it is > > valid for all toolchains. > > > I've checked all the autobuild for 07/2015 and 08/2015. The missing > mode_t only appears if the toolchain is based on musl. Yes. It's just because with uClibc and glibc, <sys/types.h> is pulled in by another header that gets included by gnuradio. However, using mode_t without <sys/types.h> is incorrect. It happens to be working by chance with uClibc and glibc, but is not technically correct: as the POSIX standard specifies, mode_t is defined in <sys/types.h>, so this file should be included when mode_t is used. See http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html So the fix of including <sys/types.h> is not musl specific at all. It makes the code more correct. Best regards, Thomas
diff --git a/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch b/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch new file mode 100644 index 0000000..391a12f --- /dev/null +++ b/package/gnuradio/0002-stat_t-is-need-for-mode_t.patch @@ -0,0 +1,13 @@ +Index: gnuradio-3.7.5/gnuradio-runtime/include/gnuradio/logger.h.in +=================================================================== +--- gnuradio-3.7.5.orig/gnuradio-runtime/include/gnuradio/logger.h.in ++++ gnuradio-3.7.5/gnuradio-runtime/include/gnuradio/logger.h.in +@@ -44,6 +44,8 @@ + + #ifdef _MSC_VER + typedef unsigned short mode_t; ++#else ++#include <sys/stat.h> + #endif + + #include <gnuradio/api.h>