Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, Sep 23 2014 at 09:59:32 PM, Andrew Morton wrote: > On Tue, 23 Sep 2014 21:51:09 -0700 ashutosh dixit > wrote: > >> On Tue, Sep 23 2014 at 05:58:19 PM, Peter Foley wrote: >> > On Tue, Sep 23, 2014 at 8:51 PM, Andrew Morton >> > wrote: >> >> Can't we just fix the Makefiles? Cook up a rule which makes >> >> headers_install (if needed) before building Documentation/? >> > >> > Currently, the ordering is enforced by >> > http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Makefile#n946 >> > I'll take a look at making Documentation/ depend on headers_install. >> > >> I would think it is preferable to keep the 'make headers_install' and >> 'make Documentation/' steps separate, as they currently are, so that >> only the people who need to upgrade system headers do that, rather than >> forcing people to upgrade system headers each time something in >> Documentation/ is recompiled and moreover doing that compile/install as >> root. > > headers_install installs into ./usr/include and ./include. It's local > to the kernel build tree. Sorry about that. Yes, the build indeed succeeds if run after headers_install, so making Documentation/ depend on headers_install is indeed a possibility. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, 23 Sep 2014 21:51:09 -0700 ashutosh dixit wrote: > On Tue, Sep 23 2014 at 05:58:19 PM, Peter Foley wrote: > > On Tue, Sep 23, 2014 at 8:51 PM, Andrew Morton > > wrote: > >> Can't we just fix the Makefiles? Cook up a rule which makes > >> headers_install (if needed) before building Documentation/? > > > > Currently, the ordering is enforced by > > http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Makefile#n946 > > I'll take a look at making Documentation/ depend on headers_install. > > > I would think it is preferable to keep the 'make headers_install' and > 'make Documentation/' steps separate, as they currently are, so that > only the people who need to upgrade system headers do that, rather than > forcing people to upgrade system headers each time something in > Documentation/ is recompiled and moreover doing that compile/install as > root. headers_install installs into ./usr/include and ./include. It's local to the kernel build tree. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, Sep 23 2014 at 05:58:19 PM, Peter Foley wrote: > On Tue, Sep 23, 2014 at 8:51 PM, Andrew Morton > wrote: >> Can't we just fix the Makefiles? Cook up a rule which makes >> headers_install (if needed) before building Documentation/? > > Currently, the ordering is enforced by > http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Makefile#n946 > I'll take a look at making Documentation/ depend on headers_install. > I would think it is preferable to keep the 'make headers_install' and 'make Documentation/' steps separate, as they currently are, so that only the people who need to upgrade system headers do that, rather than forcing people to upgrade system headers each time something in Documentation/ is recompiled and moreover doing that compile/install as root. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, Sep 23, 2014 at 8:51 PM, Andrew Morton wrote: > Can't we just fix the Makefiles? Cook up a rule which makes > headers_install (if needed) before building Documentation/? Currently, the ordering is enforced by http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Makefile#n946 I'll take a look at making Documentation/ depend on headers_install. Thanks, Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, 23 Sep 2014 19:47:11 -0400 Peter Foley wrote: > On Tue, Sep 23, 2014 at 7:38 PM, Andrew Morton > wrote: > > This build error is caused by compiling mpssd prior to `make > > headers_install'. > > > > There's really no reason to check the kernel version. If someone > > transplants mpssd out of its distributed kernel and into some older > > kernel then a miscompile is their problem - their backport is > > incomplete. > > I've only noticed this error when running make Documentation/, > in which case gcc silently uses the headers from the system, > since the headers_install ones don't exist yet. > > Maybe having the build error out in this case instead of having mysterious > compile errors would be a better solution? > Can't we just fix the Makefiles? Cook up a rule which makes headers_install (if needed) before building Documentation/? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, Sep 23, 2014 at 7:38 PM, Andrew Morton wrote: > This build error is caused by compiling mpssd prior to `make > headers_install'. > > There's really no reason to check the kernel version. If someone > transplants mpssd out of its distributed kernel and into some older > kernel then a miscompile is their problem - their backport is > incomplete. I've only noticed this error when running make Documentation/, in which case gcc silently uses the headers from the system, since the headers_install ones don't exist yet. Maybe having the build error out in this case instead of having mysterious compile errors would be a better solution? Thanks Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, 23 Sep 2014 19:23:39 -0400 Peter Foley wrote: > On Tue, Sep 23, 2014 at 6:59 PM, ashutosh dixit > wrote: > > Correct, if things in Documentation will be compiled against the headers > > in the kernel source tree then this patch is not required. However, > > Andrew had reported the following compile error: > > > >> In file included from Documentation/mic/mpssd/sysfs.c:21: > >> Documentation/mic/mpssd/mpssd.h:55:30: error: linux/virtio_ids.h: No such > >> file or directory > > > > which made it appear to us that Documentation was being compiled against > > headers installed on the system, not headers in the kernel source > > tree. The patch was submitted to address this latter case, but if that > > does not occur it is not required. > > > Alright, if you want to handle the case where somebody is trying to > build against old and incompatible headers, > just have a #error "Your kernel headers are too old, at least 3.13 is > required" at the top of mpssd.c instead of having it fail at runtime. > This build error is caused by compiling mpssd prior to `make headers_install'. There's really no reason to check the kernel version. If someone transplants mpssd out of its distributed kernel and into some older kernel then a miscompile is their problem - their backport is incomplete. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, Sep 23, 2014 at 6:59 PM, ashutosh dixit wrote: > Correct, if things in Documentation will be compiled against the headers > in the kernel source tree then this patch is not required. However, > Andrew had reported the following compile error: > >> In file included from Documentation/mic/mpssd/sysfs.c:21: >> Documentation/mic/mpssd/mpssd.h:55:30: error: linux/virtio_ids.h: No such >> file or directory > > which made it appear to us that Documentation was being compiled against > headers installed on the system, not headers in the kernel source > tree. The patch was submitted to address this latter case, but if that > does not occur it is not required. > Alright, if you want to handle the case where somebody is trying to build against old and incompatible headers, just have a #error "Your kernel headers are too old, at least 3.13 is required" at the top of mpssd.c instead of having it fail at runtime. Thanks, Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, Sep 23 2014 at 02:46:10 PM, Randy Dunlap wrote: > On 09/23/14 14:55, Ashutosh Dixit wrote: >> mpssd depends on headers available in kernels >= 3.13. Therefore >> disable the build for kernels < 3.13. For kernels < 3.13, to avoid the >> appearance of a build break simply print an error message and exit. > > Why is this needed? This file won't be built in any automated build > in v3.13 or any kernel until v3.17 at the earliest? > Correct, if things in Documentation will be compiled against the headers in the kernel source tree then this patch is not required. However, Andrew had reported the following compile error: > In file included from Documentation/mic/mpssd/sysfs.c:21: > Documentation/mic/mpssd/mpssd.h:55:30: error: linux/virtio_ids.h: No such > file or directory which made it appear to us that Documentation was being compiled against headers installed on the system, not headers in the kernel source tree. The patch was submitted to address this latter case, but if that does not occur it is not required. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On Tue, Sep 23, 2014 at 5:55 PM, Ashutosh Dixit wrote: > mpssd depends on headers available in kernels >= 3.13. Therefore > disable the build for kernels < 3.13. For kernels < 3.13, to avoid the > appearance of a build break simply print an error message and exit. > Everything in Documentation should be built against the headers in the kernel source tree due to the dep on CONFIG_HEADERS_CHECK. The patch that added this code was in the 3.12 tree (https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Makefile?id=8d49751), did it not work when it was first merged? What was the exact command you used to compile this code? Did you make sure check_headers was run first? Thanks, Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
On 09/23/14 14:55, Ashutosh Dixit wrote: > mpssd depends on headers available in kernels >= 3.13. Therefore > disable the build for kernels < 3.13. For kernels < 3.13, to avoid the > appearance of a build break simply print an error message and exit. Why is this needed? This file won't be built in any automated build in v3.13 or any kernel until v3.17 at the earliest? > Reported-by: Andrew Morton > Cc: Randy Dunlap > Cc: Greg Kroah-Hartman > Cc: Peter Foley > Reviewed-by: Sudeep Dutt > Reviewed-by: Nikhil Rao > Signed-off-by: Ashutosh Dixit > --- > Documentation/mic/mpssd/mpssd.c | 15 +++ > Documentation/mic/mpssd/sysfs.c | 5 + > 2 files changed, 20 insertions(+) > > diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c > index 3c5c379..2cc48cc 100644 > --- a/Documentation/mic/mpssd/mpssd.c > +++ b/Documentation/mic/mpssd/mpssd.c > @@ -18,6 +18,10 @@ > * Intel MIC User Space Tools. > */ > > +#include > + > +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) > + > #define _GNU_SOURCE > > #include > @@ -1726,3 +1730,14 @@ main(int argc, char *argv[]) > > exit(0); > } > +#else /* kernel version < 3.13 */ > + > +#include > +#include > + > +int main(void) > +{ > + fprintf(stderr, "mpssd is only usable against kernels >= 3.13\n"); > + exit(1); > +} > +#endif > diff --git a/Documentation/mic/mpssd/sysfs.c b/Documentation/mic/mpssd/sysfs.c > index 8dd3269..1e3ff75 100644 > --- a/Documentation/mic/mpssd/sysfs.c > +++ b/Documentation/mic/mpssd/sysfs.c > @@ -18,6 +18,10 @@ > * Intel MIC User Space Tools. > */ > > +#include > + > +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) > + > #include "mpssd.h" > > #define PAGE_SIZE 4096 > @@ -100,3 +104,4 @@ done: > free(oldvalue); > return ret; > } > +#endif > -- ~Randy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds for kernels < 3.13
mpssd depends on headers available in kernels >= 3.13. Therefore disable the build for kernels < 3.13. For kernels < 3.13, to avoid the appearance of a build break simply print an error message and exit. Reported-by: Andrew Morton Cc: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Peter Foley Reviewed-by: Sudeep Dutt Reviewed-by: Nikhil Rao Signed-off-by: Ashutosh Dixit --- Documentation/mic/mpssd/mpssd.c | 15 +++ Documentation/mic/mpssd/sysfs.c | 5 + 2 files changed, 20 insertions(+) diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c index 3c5c379..2cc48cc 100644 --- a/Documentation/mic/mpssd/mpssd.c +++ b/Documentation/mic/mpssd/mpssd.c @@ -18,6 +18,10 @@ * Intel MIC User Space Tools. */ +#include + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) + #define _GNU_SOURCE #include @@ -1726,3 +1730,14 @@ main(int argc, char *argv[]) exit(0); } +#else /* kernel version < 3.13 */ + +#include +#include + +int main(void) +{ + fprintf(stderr, "mpssd is only usable against kernels >= 3.13\n"); + exit(1); +} +#endif diff --git a/Documentation/mic/mpssd/sysfs.c b/Documentation/mic/mpssd/sysfs.c index 8dd3269..1e3ff75 100644 --- a/Documentation/mic/mpssd/sysfs.c +++ b/Documentation/mic/mpssd/sysfs.c @@ -18,6 +18,10 @@ * Intel MIC User Space Tools. */ +#include + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) + #include "mpssd.h" #define PAGE_SIZE 4096 @@ -100,3 +104,4 @@ done: free(oldvalue); return ret; } +#endif -- 2.0.0.rc3.2.g998f840 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/