Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] mtd: fix build failure with blackfin external toolchain
@ 2016-08-10 16:38 Rahul Bedarkar
  2016-08-10 16:38 ` [Buildroot] [PATCH 2/2] mtd: integck needs MMU support Rahul Bedarkar
  2016-08-11 13:03 ` [Buildroot] [PATCH 1/2] mtd: fix build failure with blackfin external toolchain Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Rahul Bedarkar @ 2016-08-10 16:38 UTC (permalink / raw)
  To: buildroot

With blackfin uClibc toolchain, we see following build errors

integck.c: In function 'parse_mount_options':
integck.c:2889: error: 'MS_DIRSYNC' undeclared (first use in this function)
integck.c:2889: error: (Each undeclared identifier is reported only once
integck.c:2889: error: for each function it appears in.)
integck.c:2899: error: 'MS_RELATIME' undeclared (first use in this function)
<builtin>: recipe for target 'integck' failed
make[2]: *** [integck] Error 1

header <sys/mount.h> from this toolchain is missing definitions for
MS_DIRSYNC and MS_RELATIME mount flags. But those are available from
header <linux/fs.h>. Even tests/fs-tests/lib/tests.c uses these flags
and includes both <sys/mount.h> and <linux/fs.h> headers.

This patch fixes above build error by including header <linux/fs.h>

Fixes:
http://autobuild.buildroot.net/results/6a1/6a1bd73cc56cd257fa939702728802b63446473e/

Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
---
 ...003-fs-tests-integrity-include-linux-fs.h.patch | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/mtd/0003-fs-tests-integrity-include-linux-fs.h.patch

diff --git a/package/mtd/0003-fs-tests-integrity-include-linux-fs.h.patch b/package/mtd/0003-fs-tests-integrity-include-linux-fs.h.patch
new file mode 100644
index 0000000..c31d39e
--- /dev/null
+++ b/package/mtd/0003-fs-tests-integrity-include-linux-fs.h.patch
@@ -0,0 +1,45 @@
+From 2965384dfa330750e23a52a0edf792487db6a886 Mon Sep 17 00:00:00 2001
+From: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
+Date: Wed, 10 Aug 2016 21:01:58 +0530
+Subject: [PATCH 1/1] fs-tests: integrity: include <linux/fs.h>
+
+With blackfin uClibc toolchain, we see following build errors
+
+integck.c: In function 'parse_mount_options':
+integck.c:2889: error: 'MS_DIRSYNC' undeclared (first use in this function)
+integck.c:2889: error: (Each undeclared identifier is reported only once
+integck.c:2889: error: for each function it appears in.)
+integck.c:2899: error: 'MS_RELATIME' undeclared (first use in this function)
+<builtin>: recipe for target 'integck' failed
+make[2]: *** [integck] Error 1
+
+header <sys/mount.h> from this toolchain is missing definitions for
+MS_DIRSYNC and MS_RELATIME mount flags. But those are available from
+header <linux/fs.h>. Even tests/fs-tests/lib/tests.c uses these flags
+and includes both <sys/mount.h> and <linux/fs.h> headers.
+
+This patch fixes above build error by including header <linux/fs.h>
+
+This build error is found by Buildroot autobuilder
+http://autobuild.buildroot.net/results/6a1/6a1bd73cc56cd257fa939702728802b63446473e/
+
+Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
+---
+ tests/fs-tests/integrity/integck.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
+index 8badd1f..31215ff 100644
+--- a/tests/fs-tests/integrity/integck.c
++++ b/tests/fs-tests/integrity/integck.c
+@@ -37,6 +37,7 @@
+ #include <sys/vfs.h>
+ #include <sys/mount.h>
+ #include <sys/statvfs.h>
++#include <linux/fs.h>
+ 
+ #define PROGRAM_VERSION "1.1"
+ #define PROGRAM_NAME "integck"
+-- 
+2.6.2
+
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] mtd: integck needs MMU support
  2016-08-10 16:38 [Buildroot] [PATCH 1/2] mtd: fix build failure with blackfin external toolchain Rahul Bedarkar
@ 2016-08-10 16:38 ` Rahul Bedarkar
  2016-08-10 20:37   ` Thomas Petazzoni
  2016-08-11 13:01   ` Thomas Petazzoni
  2016-08-11 13:03 ` [Buildroot] [PATCH 1/2] mtd: fix build failure with blackfin external toolchain Thomas Petazzoni
  1 sibling, 2 replies; 6+ messages in thread
From: Rahul Bedarkar @ 2016-08-10 16:38 UTC (permalink / raw)
  To: buildroot

After fixing build issue related to MS_DIRSYNC and MS_RELATIME, we get
following build error with blackfin external toolchain.

fstest_monitor.c: In function 'main':
fstest_monitor.c:237: warning: implicit declaration of function 'fork'
/tmp/ccCzZIuW.o: In function 'main':
/home/rahul.bedarkar/buildroot/output/build/mtd-1.5.2/tests/fs-tests/utils/fstest_monitor.c:237: undefined reference to '_fork'
collect2: ld returned 1 exit status
make[2]: *** [fstest_monitor] Error 1

Since it uses fork(), add dependency on MMU support for integck.

Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
---
 package/mtd/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/mtd/Config.in b/package/mtd/Config.in
index eef8129..8be5eff 100644
--- a/package/mtd/Config.in
+++ b/package/mtd/Config.in
@@ -161,6 +161,7 @@ config BR2_PACKAGE_MTD_UBIBLOCK
 
 config BR2_PACKAGE_MTD_INTEGCK
 	bool "integck"
+	depends on BR2_USE_MMU # fork()
 	help
 	  Install the integck test program.
 
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] mtd: integck needs MMU support
  2016-08-10 16:38 ` [Buildroot] [PATCH 2/2] mtd: integck needs MMU support Rahul Bedarkar
@ 2016-08-10 20:37   ` Thomas Petazzoni
  2016-08-11  5:36     ` Rahul Bedarkar
  2016-08-11 13:01   ` Thomas Petazzoni
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-10 20:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 10 Aug 2016 22:08:37 +0530, Rahul Bedarkar wrote:
> After fixing build issue related to MS_DIRSYNC and MS_RELATIME, we get
> following build error with blackfin external toolchain.

So it is really worth the effort merging PATCH 1/2 ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] mtd: integck needs MMU support
  2016-08-10 20:37   ` Thomas Petazzoni
@ 2016-08-11  5:36     ` Rahul Bedarkar
  0 siblings, 0 replies; 6+ messages in thread
From: Rahul Bedarkar @ 2016-08-11  5:36 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Thursday 11 August 2016 02:07 AM, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 10 Aug 2016 22:08:37 +0530, Rahul Bedarkar wrote:
>> After fixing build issue related to MS_DIRSYNC and MS_RELATIME, we get
>> following build error with blackfin external toolchain.
>
> So it is really worth the effort merging PATCH 1/2 ?

I'm not completely sure, but I think we should merge PATCH 1/2 because 
it fixes different issue and this patch just hides that issue for 
blackfin external toolchain.

Thanks,

Rahul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] mtd: integck needs MMU support
  2016-08-10 16:38 ` [Buildroot] [PATCH 2/2] mtd: integck needs MMU support Rahul Bedarkar
  2016-08-10 20:37   ` Thomas Petazzoni
@ 2016-08-11 13:01   ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-11 13:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 10 Aug 2016 22:08:37 +0530, Rahul Bedarkar wrote:
> After fixing build issue related to MS_DIRSYNC and MS_RELATIME, we get
> following build error with blackfin external toolchain.
> 
> fstest_monitor.c: In function 'main':
> fstest_monitor.c:237: warning: implicit declaration of function 'fork'
> /tmp/ccCzZIuW.o: In function 'main':
> /home/rahul.bedarkar/buildroot/output/build/mtd-1.5.2/tests/fs-tests/utils/fstest_monitor.c:237: undefined reference to '_fork'
> collect2: ld returned 1 exit status
> make[2]: *** [fstest_monitor] Error 1
> 
> Since it uses fork(), add dependency on MMU support for integck.
> 
> Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
> ---
>  package/mtd/Config.in | 1 +
>  1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] mtd: fix build failure with blackfin external toolchain
  2016-08-10 16:38 [Buildroot] [PATCH 1/2] mtd: fix build failure with blackfin external toolchain Rahul Bedarkar
  2016-08-10 16:38 ` [Buildroot] [PATCH 2/2] mtd: integck needs MMU support Rahul Bedarkar
@ 2016-08-11 13:03 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-11 13:03 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 10 Aug 2016 22:08:36 +0530, Rahul Bedarkar wrote:
> With blackfin uClibc toolchain, we see following build errors
> 
> integck.c: In function 'parse_mount_options':
> integck.c:2889: error: 'MS_DIRSYNC' undeclared (first use in this function)
> integck.c:2889: error: (Each undeclared identifier is reported only once
> integck.c:2889: error: for each function it appears in.)
> integck.c:2899: error: 'MS_RELATIME' undeclared (first use in this function)
> <builtin>: recipe for target 'integck' failed
> make[2]: *** [integck] Error 1
> 
> header <sys/mount.h> from this toolchain is missing definitions for
> MS_DIRSYNC and MS_RELATIME mount flags. But those are available from
> header <linux/fs.h>. Even tests/fs-tests/lib/tests.c uses these flags
> and includes both <sys/mount.h> and <linux/fs.h> headers.
> 
> This patch fixes above build error by including header <linux/fs.h>
> 
> Fixes:
> http://autobuild.buildroot.net/results/6a1/6a1bd73cc56cd257fa939702728802b63446473e/
> 
> Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>

I have for now decided to not apply this patch. Indeed, the only reason
why it's needed is because the uClibc version used in the Blackfin
toolchain from ADI is very very old, and therefore does not have the
MS_DIRSYNC and MS_RELATIME definitions.

Since all other toolchains we use have recent enough C libraries, I
don't really see the point of carrying this patch, as the only
problematic case is made invisible by the BR2_USE_MMU dependency.

Your patch will always be around in the archives to apply in the future
if we see other situations where such a fix would be needed.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-11 13:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10 16:38 [Buildroot] [PATCH 1/2] mtd: fix build failure with blackfin external toolchain Rahul Bedarkar
2016-08-10 16:38 ` [Buildroot] [PATCH 2/2] mtd: integck needs MMU support Rahul Bedarkar
2016-08-10 20:37   ` Thomas Petazzoni
2016-08-11  5:36     ` Rahul Bedarkar
2016-08-11 13:01   ` Thomas Petazzoni
2016-08-11 13:03 ` [Buildroot] [PATCH 1/2] mtd: fix build failure with blackfin external toolchain Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox