Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] mtd-utils fails to build
@ 2010-03-08 21:04 H Hartley Sweeten
  2010-03-08 21:27 ` H Hartley Sweeten
  2010-03-08 21:46 ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: H Hartley Sweeten @ 2010-03-08 21:04 UTC (permalink / raw)
  To: buildroot

Hello all,

I am trying to do a clean build using the current git pull of buildroot.

Everything goes as expected until trying to build mtd-utils. When trying
to build mkfs.jffs2 the build cannot find zlib.h and errors out.

It appears that a compile and assemble, but do not link (option -c), happens
first for each file followed by compile and place output into <file>
(option -o).

The problem appears to be that the -c option happens without passing the
--sysroot configuration so the compiler cannot locate the external headers.

Following is a snip of the last part of the build:


...
/home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -I./include   -DWITHOUT_XATTR -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare -c -o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/jffs2dump.o jffs2dump.c -g -Wp,-MD,/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/.jffs2dump.c.dep
/home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare --sysroot /home/bigguiness/buildroot/output/staging/  -g -o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/jffs2dump /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/jffs2dump.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/crc32.o  
/home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -I./include   -DWITHOUT_XATTR -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare -c -o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/mkfs.jffs2.o mkfs.jffs2.c -g -Wp,-MD,/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/.mkfs.jffs2.c.dep
mkfs.jffs2.c:73:18: error: zlib.h: No such file or directory
mkfs.jffs2.c:1519: warning: initialization discards qualifiers from pointer target type
mkfs.jffs2.c:1521: warning: initialization discards qualifiers from pointer target type
mkfs.jffs2.c: In function 'main':
mkfs.jffs2.c:1881: warning: passing argument 2 of 'recursive_add_host_directory' discards qualifiers from pointer target type
make[1]: *** [/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/mkfs.jffs2.o] Error 1
rm /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/ftl_check.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/docfdisk.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flash_unlock.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flash_lock.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flashcp.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/doc_loadbios.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flash_erase.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/ftl_format.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flash_info.o
make[1]: Leaving directory `/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1'
make: *** [/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/docfdisk] Error 2


Any ideas how to fix this?

Regards,
Hartley

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

* [Buildroot] mtd-utils fails to build
  2010-03-08 21:04 [Buildroot] mtd-utils fails to build H Hartley Sweeten
@ 2010-03-08 21:27 ` H Hartley Sweeten
  2010-03-08 21:46 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: H Hartley Sweeten @ 2010-03-08 21:27 UTC (permalink / raw)
  To: buildroot

FYI, I just found another post about this same issue:

http://lists.busybox.net/pipermail/buildroot/2010-February/032479.html

Regards,
Hartley

-----Original Message-----
From: buildroot-bounces@busybox.net [mailto:buildroot-bounces at busybox.net] On Behalf Of H Hartley Sweeten
Sent: Monday, March 08, 2010 2:05 PM
To: buildroot at busybox.net
Subject: [Buildroot] mtd-utils fails to build

Hello all,

I am trying to do a clean build using the current git pull of buildroot.

Everything goes as expected until trying to build mtd-utils. When trying
to build mkfs.jffs2 the build cannot find zlib.h and errors out.

It appears that a compile and assemble, but do not link (option -c), happens
first for each file followed by compile and place output into <file>
(option -o).

The problem appears to be that the -c option happens without passing the
--sysroot configuration so the compiler cannot locate the external headers.

Following is a snip of the last part of the build:


...
/home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -I./include   -DWITHOUT_XATTR -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare -c -o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/jffs2dump.o jffs2dump.c -g -Wp,-MD,/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/.jffs2dump.c.dep
/home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare --sysroot /home/bigguiness/buildroot/output/staging/  -g -o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/jffs2dump /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/jffs2dump.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/crc32.o  
/home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -I./include   -DWITHOUT_XATTR -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare -c -o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/mkfs.jffs2.o mkfs.jffs2.c -g -Wp,-MD,/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/.mkfs.jffs2.c.dep
mkfs.jffs2.c:73:18: error: zlib.h: No such file or directory
mkfs.jffs2.c:1519: warning: initialization discards qualifiers from pointer target type
mkfs.jffs2.c:1521: warning: initialization discards qualifiers from pointer target type
mkfs.jffs2.c: In function 'main':
mkfs.jffs2.c:1881: warning: passing argument 2 of 'recursive_add_host_directory' discards qualifiers from pointer target type
make[1]: *** [/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/mkfs.jffs2.o] Error 1
rm /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/ftl_check.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/docfdisk.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flash_unlock.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flash_lock.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flashcp.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/doc_loadbios.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flash_erase.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/ftl_format.o /home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/flash_info.o
make[1]: Leaving directory `/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1'
make: *** [/home/bigguiness/buildroot/output/build/mtd-utils-1.3.1/docfdisk] Error 2


Any ideas how to fix this?

Regards,
Hartley
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] mtd-utils fails to build
  2010-03-08 21:04 [Buildroot] mtd-utils fails to build H Hartley Sweeten
  2010-03-08 21:27 ` H Hartley Sweeten
@ 2010-03-08 21:46 ` Peter Korsgaard
  2010-03-08 21:51   ` H Hartley Sweeten
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2010-03-08 21:46 UTC (permalink / raw)
  To: buildroot

>>>>> "H" == H Hartley Sweeten <hartleys@visionengravers.com> writes:

 H> Hello all,
 H> I am trying to do a clean build using the current git pull of buildroot.

 H> Everything goes as expected until trying to build mtd-utils. When trying
 H> to build mkfs.jffs2 the build cannot find zlib.h and errors out.

 H> It appears that a compile and assemble, but do not link (option -c), happens
 H> first for each file followed by compile and place output into <file>
 H> (option -o).

 H> The problem appears to be that the -c option happens without passing the
 H> --sysroot configuration so the compiler cannot locate the external headers.

 H> Following is a snip of the last part of the build:

Thanks, fixed in git:

commit d5bf5f967009733da99c55febacb3fb0be686cad
Author: Peter Korsgaard <jacmet@sunsite.dk>
Date:   Mon Mar 8 22:44:28 2010 +0100

    mtd-utils: fix build with external toolchain
    
    Reported by H Hartley Sweeten.
    
    Make sure we pass proper CFLAGS to mtd-utils, so builds needing --sysroot
    works (E.G. external toolchains).
    
    Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
index 244fd8e..3e0fcaf 100644
--- a/package/mtd/mtd.mk
+++ b/package/mtd/mtd.mk
@@ -111,14 +111,14 @@ MTD_BUILD_TARGETS := $(MTD_TARGETS) $(MTD_UBI_TARGETS)
 
 $(MTD_BUILD_TARGETS): $(MTD_DIR)/.unpacked
 ifneq ($(MTD_TARGETS),)
-       $(MAKE) LDFLAGS="$(TARGET_LDFLAGS)" \
+       $(MAKE) $(TARGET_CONFIGURE_ENV) \
                BUILDDIR=$(MTD_DIR) \
                CROSS=$(TARGET_CROSS) CC=$(TARGET_CC) \
                WITHOUT_XATTR=1 WITHOUT_LARGEFILE=1 \
                -C $(MTD_DIR) $(MTD_TARGETS)
 endif
 ifneq ($(MTD_UBI_TARGETS),)
-       $(MAKE) LDFLAGS="$(TARGET_LDFLAGS)" \
+       $(MAKE) $(TARGET_CONFIGURE_ENV) \
                BUILDDIR=$(MTD_DIR)/ubi-utils \
                CROSS=$(TARGET_CROSS) CC=$(TARGET_CC) \
                WITHOUT_XATTR=1 WITHOUT_LARGEFILE=1 \

-- 
Bye, Peter Korsgaard

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

* [Buildroot] mtd-utils fails to build
  2010-03-08 21:46 ` Peter Korsgaard
@ 2010-03-08 21:51   ` H Hartley Sweeten
  0 siblings, 0 replies; 4+ messages in thread
From: H Hartley Sweeten @ 2010-03-08 21:51 UTC (permalink / raw)
  To: buildroot

On Monday, March 08, 2010 2:47 PM, Peter Korsgaard wrote:
>>>>>> "H" == H Hartley Sweeten <hartleys@visionengravers.com> writes:

 H> Hello all,
 H> I am trying to do a clean build using the current git pull of buildroot.

 H> Everything goes as expected until trying to build mtd-utils. When trying
 H> to build mkfs.jffs2 the build cannot find zlib.h and errors out.

 H> It appears that a compile and assemble, but do not link (option -c), happens
 H> first for each file followed by compile and place output into <file>
 H> (option -o).

 H> The problem appears to be that the -c option happens without passing the
 H> --sysroot configuration so the compiler cannot locate the external headers.

 H> Following is a snip of the last part of the build:

> Thanks, fixed in git:

That fixed it!  Thanks for the quick feedback!

Regards,
Hartley

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

end of thread, other threads:[~2010-03-08 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08 21:04 [Buildroot] mtd-utils fails to build H Hartley Sweeten
2010-03-08 21:27 ` H Hartley Sweeten
2010-03-08 21:46 ` Peter Korsgaard
2010-03-08 21:51   ` H Hartley Sweeten

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