Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Create zlib installation directory in the staging dir
@ 2008-10-30 16:00 Thomas Petazzoni
  2008-10-31  8:37 ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2008-10-30 16:00 UTC (permalink / raw)
  To: buildroot

Create zlib installation directory in the staging dir

A simple .config with just Busybox and zlib, using an external binary
toolchain, leads to the following build failure:

touch -c /home/thomas/local/buildroot2/build_arm/zlib-1.2.3/libz.so
cp -dpf /home/thomas/local/buildroot2/build_arm/zlib-1.2.3/libz.a /home/thomas/local/buildroot2/build_arm/staging_dir/usr/lib/
cp: cannot create regular file `/home/thomas/local/buildroot2/build_arm/staging_dir/usr/lib/': Is a directory
make: *** [/home/thomas/local/buildroot2/build_arm/staging_dir/usr/lib/libz.so] Error 1

This is because no one creates $(STAGING_DIR)/usr/lib, and the
installation of zlib is done manually. Fix that by creating
$(STAGING_DIR)/usr/lib and $(STAGING_DIR)/usr/include in zlib
installation target.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/zlib/zlib.mk |    2 ++
 1 file changed, 2 insertions(+)

Index: buildroot2/package/zlib/zlib.mk
===================================================================
--- buildroot2.orig/package/zlib/zlib.mk
+++ buildroot2/package/zlib/zlib.mk
@@ -37,6 +37,8 @@
 	touch -c $@
 
 $(STAGING_DIR)/usr/lib/libz.so: $(ZLIB_DIR)/libz.so
+	mkdir -p $(STAGING_DIR)/usr/lib/
+	mkdir -p $(STAGING_DIR)/usr/include/
 	cp -dpf $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/
 	cp -dpf $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/
 	cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/usr/include/


-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH] Create zlib installation directory in the staging dir
  2008-10-30 16:00 [Buildroot] [PATCH] Create zlib installation directory in the staging dir Thomas Petazzoni
@ 2008-10-31  8:37 ` Bernhard Reutner-Fischer
  2008-10-31 12:11   ` Thiago A. Corrêa
  0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Reutner-Fischer @ 2008-10-31  8:37 UTC (permalink / raw)
  To: buildroot

On Thu, Oct 30, 2008 at 05:00:39PM +0100, Thomas Petazzoni wrote:
>Create zlib installation directory in the staging dir
>
>A simple .config with just Busybox and zlib, using an external binary
>toolchain, leads to the following build failure:
>
>touch -c /home/thomas/local/buildroot2/build_arm/zlib-1.2.3/libz.so
>cp -dpf /home/thomas/local/buildroot2/build_arm/zlib-1.2.3/libz.a /home/thomas/local/buildroot2/build_arm/staging_dir/usr/lib/
>cp: cannot create regular file `/home/thomas/local/buildroot2/build_arm/staging_dir/usr/lib/': Is a directory
>make: *** [/home/thomas/local/buildroot2/build_arm/staging_dir/usr/lib/libz.so] Error 1
>
>This is because no one creates $(STAGING_DIR)/usr/lib, and the
>installation of zlib is done manually. Fix that by creating
>$(STAGING_DIR)/usr/lib and $(STAGING_DIR)/usr/include in zlib
>installation target.
>
>Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>---
> package/zlib/zlib.mk |    2 ++
> 1 file changed, 2 insertions(+)
>
>Index: buildroot2/package/zlib/zlib.mk
>===================================================================
>--- buildroot2.orig/package/zlib/zlib.mk
>+++ buildroot2/package/zlib/zlib.mk
>@@ -37,6 +37,8 @@
> 	touch -c $@
> 
> $(STAGING_DIR)/usr/lib/libz.so: $(ZLIB_DIR)/libz.so
>+	mkdir -p $(STAGING_DIR)/usr/lib/
>+	mkdir -p $(STAGING_DIR)/usr/include/
> 	cp -dpf $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/
> 	cp -dpf $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/
> 	cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/usr/include/

 	$(INSTALL) -D $(ZLIB_DIR)/libz.a $(STAGING_DIR)/usr/lib/libz.a
 	$(INSTALL) -D $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/usr/include/zlib.h
 	$(INSTALL) $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/usr/include/zconf.h

fixed.

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

* [Buildroot] [PATCH] Create zlib installation directory in the staging dir
  2008-10-31  8:37 ` Bernhard Reutner-Fischer
@ 2008-10-31 12:11   ` Thiago A. Corrêa
  2008-10-31 12:15     ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 6+ messages in thread
From: Thiago A. Corrêa @ 2008-10-31 12:11 UTC (permalink / raw)
  To: buildroot

Applied in r23879.

Thanks.

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

* [Buildroot] [PATCH] Create zlib installation directory in the staging dir
  2008-10-31 12:11   ` Thiago A. Corrêa
@ 2008-10-31 12:15     ` Bernhard Reutner-Fischer
  2008-10-31 12:44       ` Thiago A. Corrêa
  0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Reutner-Fischer @ 2008-10-31 12:15 UTC (permalink / raw)
  To: buildroot

On Fri, Oct 31, 2008 at 10:11:04AM -0200, Thiago A. Corr?a wrote:
>Applied in r23879.

You applied something different, fwiw. But it doesn't matter much,
you're building zlib incorrectly anyway *shrug* i've fixed this now..

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

* [Buildroot] [PATCH] Create zlib installation directory in the staging dir
  2008-10-31 12:15     ` Bernhard Reutner-Fischer
@ 2008-10-31 12:44       ` Thiago A. Corrêa
  2008-10-31 13:26         ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 6+ messages in thread
From: Thiago A. Corrêa @ 2008-10-31 12:44 UTC (permalink / raw)
  To: buildroot

On Fri, Oct 31, 2008 at 10:15 AM, Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com> wrote:
> On Fri, Oct 31, 2008 at 10:11:04AM -0200, Thiago A. Corr?a wrote:
>>Applied in r23879.
>
> You applied something different, fwiw. But it doesn't matter much,
> you're building zlib incorrectly anyway *shrug* i've fixed this now..
>

Diff between svn and git gives me:

-$(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/usr/lib/libz.so
-       $(INSTALL) -D $(STAGING_DIR)/usr/include/zlib.h
$(TARGET_DIR)/usr/include/
-       $(INSTALL) $(STAGING_DIR)/usr/include/zconf.h $(TARGET_DIR)/usr/include/
-       $(INSTALL) -D $(STAGING_DIR)/usr/lib/libz.a $(TARGET_DIR)/usr/lib/
+$(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/usr/lib/libz.so.$(ZLIB_VERSION)
+       mkdir -p $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib
+       cp -dpf $(STAGING_DIR)/usr/include/zlib.h $(TARGET_DIR)/usr/include/
+       cp -dpf $(STAGING_DIR)/usr/include/zconf.h $(TARGET_DIR)/usr/include/
+       cp -dpf $(STAGING_DIR)/usr/lib/libz.a $(TARGET_DIR)/usr/lib/
+       rm -f $(TARGET_DIR)/lib/libz.so $(TARGET_DIR)/usr/lib/libz.so
+       ln -sf libz.so.$(ZLIB_VERSION) $(TARGET_DIR)/usr/lib/libz.so
        touch -c $@

Why not use $(INSTALL) here? That's what I did in addition to that
point where you and Thomas pointed out.

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

* [Buildroot] [PATCH] Create zlib installation directory in the staging dir
  2008-10-31 12:44       ` Thiago A. Corrêa
@ 2008-10-31 13:26         ` Bernhard Reutner-Fischer
  0 siblings, 0 replies; 6+ messages in thread
From: Bernhard Reutner-Fischer @ 2008-10-31 13:26 UTC (permalink / raw)
  To: buildroot

On Fri, Oct 31, 2008 at 10:44:20AM -0200, Thiago A. Corr?a wrote:
>On Fri, Oct 31, 2008 at 10:15 AM, Bernhard Reutner-Fischer
><rep.dot.nop@gmail.com> wrote:
>> On Fri, Oct 31, 2008 at 10:11:04AM -0200, Thiago A. Corr?a wrote:
>>>Applied in r23879.
>>
>> You applied something different, fwiw. But it doesn't matter much,
>> you're building zlib incorrectly anyway *shrug* i've fixed this now..
>>
>
>Diff between svn and git gives me:
>
>-$(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/usr/lib/libz.so
>-       $(INSTALL) -D $(STAGING_DIR)/usr/include/zlib.h
>$(TARGET_DIR)/usr/include/
>-       $(INSTALL) $(STAGING_DIR)/usr/include/zconf.h $(TARGET_DIR)/usr/include/
>-       $(INSTALL) -D $(STAGING_DIR)/usr/lib/libz.a $(TARGET_DIR)/usr/lib/
>+$(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/usr/lib/libz.so.$(ZLIB_VERSION)
>+       mkdir -p $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib
>+       cp -dpf $(STAGING_DIR)/usr/include/zlib.h $(TARGET_DIR)/usr/include/
>+       cp -dpf $(STAGING_DIR)/usr/include/zconf.h $(TARGET_DIR)/usr/include/
>+       cp -dpf $(STAGING_DIR)/usr/lib/libz.a $(TARGET_DIR)/usr/lib/
>+       rm -f $(TARGET_DIR)/lib/libz.so $(TARGET_DIR)/usr/lib/libz.so
>+       ln -sf libz.so.$(ZLIB_VERSION) $(TARGET_DIR)/usr/lib/libz.so
>        touch -c $@
>
>Why not use $(INSTALL) here? That's what I did in addition to that
>point where you and Thomas pointed out.

I overlooked that you creaded the dirs before installing the files, so
this is ok, sorry.

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

end of thread, other threads:[~2008-10-31 13:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30 16:00 [Buildroot] [PATCH] Create zlib installation directory in the staging dir Thomas Petazzoni
2008-10-31  8:37 ` Bernhard Reutner-Fischer
2008-10-31 12:11   ` Thiago A. Corrêa
2008-10-31 12:15     ` Bernhard Reutner-Fischer
2008-10-31 12:44       ` Thiago A. Corrêa
2008-10-31 13:26         ` Bernhard Reutner-Fischer

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