Skip to contentSkip to conversation

New: memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

Buildroot bugzilla at busybox.net 1 participant 12 messages Jul 20, 2009 – Jul 21, 2009

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=473

Host: i386-pc-linux-gnu
Target: powerpc-unknown-linux-gnu
Build: i386-pc-linux-gnu
Summary: memstat_0.5.tar.gz has install with -D and that fails
"make" (last buildroot git)
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: etienne_lorrain at yahoo.fr
CC: buildroot at uclibc.org
Estimated Hours: 0.0

make
...
gzip -d -c /home/elorrain/buildroot/dl/memstat_0.5.tar.gz | tar -C
/home/elorrain/buildroot/build_powerpc -xf -
toolchain/patch-kernel.sh /home/elorrain/buildroot/build_powerpc/memstat-0.5 package/memstat/ memstat-0.5\*.patch
touch /home/elorrain/buildroot/build_powerpc/memstat-0.5/.unpacked touch /home/elorrain/buildroot/build_powerpc/memstat-0.5/.configured /home/elorrain/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -pipe -Os -I/home/elorrain/buildroot/build_powerpc/staging_dir/usr/include -I/home/elorrain/buildroot/build_powerpc/staging_dir/include --sysroot=/home/elorrain/buildroot/build_powerpc/staging_dir/ -isysroot /home/elorrain/buildroot/build_powerpc/staging_dir -mtune=440fp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L/home/elorrain/buildroot/build_powerpc/staging_dir/lib -L/home/elorrain/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/elorrain/buildroot/build_powerpc/staging_dir/ /home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.c -o /home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat
[ -e /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc/memstat.conf ]

|| \
        /usr/bin/install -m 0644 -D

/home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.conf /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc /usr/bin/install: cannot overwrite directory `/home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc' with non-directory
make: *** [/home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/usr/bin/memstat] Error 1

[elorrain at cobra buildroot]$ /usr/bin/install -m 0644 /home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.conf /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc/ [elorrain at cobra buildroot]$

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #1 from Thomas Petazzoni <[email protected]> 2009-07-20 14:52:43 UTC --- I'm sorry, but I'm not able to reproduce here (with a cross-compilation to ARM,
but the problem isn't architecture-related apparently).

Could you attach your .config ?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #2 from Etienne Lorrain <[email protected]> 2009-07-20 16:25:55 UTC --- Created an attachment (id=485)
--> (https://bugs.busybox.net/attachment.cgi?id=485)
main config file

I attach my .comfig, but the problem seems more like that directory:
/home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc
should exist before trying to install.
Isn't that the target device /etc ? (just begining with buildroot...)

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #3 from Thomas Petazzoni <[email protected]> 2009-07-20 17:03:13 UTC --- Indeed this directory is $(TARGET_DIR), which contains the filesystem as it
will be on the target (with a few differences, like missing device files, not
created in this directory since device files can only be created by the root
user).

The etc/ directory in $(TARGET_DIR) is supposed to be created because the target root filesystem is initially filled with the contents of target/generic/target_skeleton/.

So, not sure what's happening in your case. Nothing looks odd in your .config. Can you run a full build from scratch, and send the corresponding log ?

Something like :

rm -rf build_powerpc
rm -rf toolchain_build_powerpc
rm -rf project_build_powerpc
rm -rf binaries
make 2>&1 | tee /tmp/buildroot.log

and send us the buildroot.log file.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

Peter Korsgaard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |jacmet at uclibc.org

--- Comment #4 from Peter Korsgaard <[email protected]> 2009-07-20 20:28:08 UTC --- (In reply to comment #0)

Quoted 6 lines
        /usr/bin/install -m 0644 -D

/home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.conf /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc /usr/bin/install: cannot overwrite directory `/home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc' with non-directory

So your host install program doesn't seem to like doing install -D <file> <dir>
- What version/distribution are you using?

On my Debian machine it works:

mkdir /tmp/blah
touch /tmp/blih
install -m 0644 -D /tmp/blih /tmp/blah
ls -lah /tmp/blih
-rw-r--r-- 1 peko peko 0 2009-07-20 22:24 /tmp/blih
install --version
install (GNU coreutils) 7.4
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #5 from Etienne Lorrain <[email protected]> 2009-07-21 09:59:15 UTC ---
I do not know why, but it is entirely reproduceable, "install" needs the
target filename and not only the directory where to put the source
filename. This is on a quite old centos machine, I do not have the root password.
I can add the full log if you want, but this screen dump should describe
the problem:

gzip -d -c /home/elorrain/buildroot/dl/memstat_0.5.tar.gz | tar -C
/home/elorrain/buildroot/build_powerpc -xf -
toolchain/patch-kernel.sh /home/elorrain/buildroot/build_powerpc/memstat-0.5 package/memstat/ memstat-0.5\*.patch
touch /home/elorrain/buildroot/build_powerpc/memstat-0.5/.unpacked touch /home/elorrain/buildroot/build_powerpc/memstat-0.5/.configured /home/elorrain/buildroot/build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -Os -pipe -Os -I/home/elorrain/buildroot/build_powerpc/staging_dir/usr/include -I/home/elorrain/buildroot/build_powerpc/staging_dir/include --sysroot=/home/elorrain/buildroot/build_powerpc/staging_dir/ -isysroot /home/elorrain/buildroot/build_powerpc/staging_dir -mtune=440fp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L/home/elorrain/buildroot/build_powerpc/staging_dir/lib -L/home/elorrain/buildroot/build_powerpc/staging_dir/usr/lib --sysroot=/home/elorrain/buildroot/build_powerpc/staging_dir/ /home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.c -o /home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat
[ -e /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc/memstat.conf ]

|| \
        /usr/bin/install -m 0644 -D

/home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.conf /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc /usr/bin/install: cannot overwrite directory `/home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc' with non-directory
make: *** [/home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/usr/bin/memstat] Error 1
[elorrain at cobra buildroot]$ ls -ld /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc drwxrwxr-x 5 elorrain elorrain 4096 Jul 21 10:21 /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc [elorrain at cobra buildroot]$ ls /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc
br-version group hosts inittab issue mtab passwd
protocols resolv.conf services TZ
fstab hostname init.d inputrc ld.so.conf.d network profile
random-seed securetty shadow
[elorrain at cobra buildroot]$ /usr/bin/install -m 0644 -D /home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.conf /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc /usr/bin/install: cannot overwrite directory `/home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc' with non-directory
[elorrain at cobra buildroot]$ /usr/bin/install -m 0644 -D /home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.conf /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc/ /usr/bin/install: cannot overwrite directory `/home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc/' with non-directory
[elorrain at cobra buildroot]$ /usr/bin/install -m 0644 -D /home/elorrain/buildroot/build_powerpc/memstat-0.5/memstat.conf /home/elorrain/buildroot/project_build_powerpc/Eqam4G/root/etc/memstat.conf [elorrain at cobra buildroot]$ install --version
install (coreutils) 5.2.1
Written by David MacKenzie.

Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [elorrain at cobra buildroot]$ cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4
[elorrain at cobra buildroot]$ cat /proc/version
Linux version 2.6.9-67.0.15.plus.c4smp (mockbuild at builder10.centos.org) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)) #1 SMP Fri May 9 10:17:50 EDT 2008 [elorrain at cobra buildroot]$

I do not know if it has to be fixed, this centos is too old. But it seems the only place where "install" is used with a target directory in building the whole buildroot.

Thanks for your help,
Etienne.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #6 from Bernhard Reutner-Fischer <[email protected]> 2009-07-21 10:19:03 UTC --- can you verify if install thefile /there/dir/ works (i.e. with trailing slash)?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#7 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #7 from Etienne Lorrain <[email protected]> 2009-07-21 10:30:31 UTC --- Last slash try already in the screen dump, doesn't work...

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#8 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #8 from Etienne Lorrain <[email protected]> 2009-07-21 10:44:40 UTC --- Note that the install man page seems to imply that install can be used with a target directory only if there is multiple input files:
NAME
ginstall - copy files and set attributes

SYNOPSIS

       install [OPTION]... SOURCE DEST           (1st format)
       install [OPTION]... SOURCE... DIRECTORY   (2nd format)
       install -d [OPTION]... DIRECTORY...       (3rd format)

DESCRIPTION
In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to
the existing DIRECTORY, while setting permission modes and
owner/group. In the third format, create all components of the given
DIRECTORY(ies).

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#9 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #9 from Bernhard Reutner-Fischer <[email protected]> 2009-07-21 10:45:17 UTC --- Right, sorry.

package/memstat/memstat.mk +5 -3
index 7220aee..a54509a 100644
@@ -21,15 +21,17 @@ $(MEMSTAT_DIR)/.configured: $(MEMSTAT_DIR)/.unpacked
        touch $@
 
 $(MEMSTAT_DIR)/memstat: $(MEMSTAT_DIR)/.configured
-       $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(@D)/memstat.c -o $@
+       $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
+               $(CFLAGS_WHOLE_PROGRAM) $(@D)/memstat.c -o $@
 
 $(TARGET_DIR)/usr/bin/memstat: $(MEMSTAT_DIR)/memstat
        [ -e $(TARGET_DIR)/etc/memstat.conf ] || \
-               $(INSTALL) -m 0644 -D $(^D)/memstat.conf $(TARGET_DIR)/etc
+               $(INSTALL) -m 0644 -D $(^D)/memstat.conf \
+                       $(TARGET_DIR)/etc/memstat.conf
        $(INSTALL) -m 0755 -D $^ $@
        $(STRIPCMD) $(STRIP_STRIP_ALL) $@
 
-memstat: uclibc $(TARGET_DIR)/usr/bin/memstat
+memstat: $(TARGET_DIR)/usr/bin/memstat
 
 memstat-source: $(DL_DIR)/$(MEMSTAT_SOURCE)
 

Better?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#10 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

--- Comment #10 from Etienne Lorrain <[email protected]> 2009-07-21 12:10:34 UTC --- Yes, GIT tree fixed, thanks.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#11 lore raw

[Buildroot] [Bug 473] memstat_0.5.tar.gz has install with -D and that fails "make" (last buildroot git)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=473

Bernhard Reutner-Fischer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.