This is the mail archive of the mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cygwin strangeness installing glibc: "mv: foo and are thesame file"

Installing glibc-2.1.3 under cygwin was giving me trouble. Here's the error:

/usr/bin/install -c /tmp/toolchain.whitejl/crosstool-0.28-pre8c/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/build-glibc/db2/makedb /home/dkegel/experimental/i686-pc-cygwin/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/i686-unknown-l
mv -f /home/dkegel/experimental/i686-pc-cygwin/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/i686-unknown-linux-gnu/bin/ /home/dkegel/experimental/i686-pc-cygwin/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/i686-unknown-linux-gnu
mv: `/home/dkegel/experimental/i686-pc-cygwin/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/i686-unknown-linux-gnu/bin/' and `/home/dkegel/experimental/i686-pc-cygwin/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/i686-unknown-linu
x-gnu/bin/makedb' are the same file
make[2]: *** [/home/dkegel/experimental/i686-pc-cygwin/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/i686-unknown-linux-gnu/bin/makedb] Error 1
make[2]: Leaving directory `/tmp/toolchain.whitejl/crosstool-0.28-pre8c/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/db2'
make[1]: *** [db2/subdir_install] Error 2
make[1]: Leaving directory `/tmp/toolchain.whitejl/crosstool-0.28-pre8c/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/glibc-2.1.3'
make: *** [install] Error 2

Investigating a bit, I found that this is a general problem
with cygwin when referring to programs without the implicit
.exe suffix.  For instance,
 $ cp /usr/bin/ls.exe
 $ cp foo
will yield the same error message, whereas
 $ cp foo.exe
will work just fine.

I'm not quite sure why installing *any* glibc executable has ever
worked for my under Cygwin now... glibc-2.3.2 still uses the
same idiom for installing executables.  You can see this by doing
 $ grep "mv.*new" Makerules

I think the chief offender is

define do-install-program
mv -f $ $@

but only in the context of rules like

ifdef install-bin
$(addprefix $(inst_bindir)/,$(install-bin)): \
    $(inst_bindir)/%: $(objpfx)% $(+force)

(it's also used to install shared libraries, which don't need the .exe suffix.)

I'm sure that mv is there to keep the update atomic, which might be important for parallel builds.

I guess the real question is, why is makedb.exe built for cygwin?
It's probably a target system thing that should be built with the
cross-compiler.   I'm not going to worry about it too much,
since db2 isn't part of later glibc's anyway; I'm just going to
disable the install of makedb.exe.  But now I'm slightly more aware of the issue,
and if it comes up on something I care about, maybe I'll think
about a real fix.
- Dan

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]