what's the difference

Farkas Levente lfarkas at lfarkas.org
Fri Nov 28 14:07:15 UTC 2008


Daniel P. Berrange wrote:
> I expect the reason for the 2nd copy of everything in /usr/i686-pc-mingw32/bin
> is to allow people to just set $PATH to their cross-toolchain for apps
> with broken build systems hardcoding tool names without the prefix.
> 
> Hard linking won't help, because when the binary is prelinked, the hardlink
> will be broken.
> 
> Really we should be adding a file mingw.conf in /etc/prelink.conf.d
> containing
> 
>    -l /usr/i686-pc-mingw32/bin
> 
> So that our custom /bin directory with native binaries is processed.

but why not just create symlinks? is there anything what we can loose?
in the %install section for all files in /usr/i686-pc-mingw32/bin can be
a symlink.
actually it's not cause a bug, but after hardlink it's getting confusing
(i just discover this as i set the new macros and find two different bins).

from the binutils buildlog it's clear they also create link (although
hard links), but then rpm forget about it:-(

here is one such part of the build log (i check all file in
/usr/i686-pc-mingw32/bin are a hard link during the build process):
-------------------------------------------------
mkdir -p --
/home/lfarkas/rpm/BUILDROOT/mingw32-binutils-2.18.50_20080109_2-8.fc11.i386/usr/i686-pc-mingw32/bin
for i in nm-new strip-new ar ranlib dlltool objdump objcopy; do \
          if [ -f $i ]; then \
            j=`echo $i | sed -e 's/-new//'`; \
            k=`echo $j | sed 's,^,i686-pc-mingw32-,'`; \
            if [ "/usr/bin/$k" != "/usr/i686-pc-mingw32/bin/$j" ]; then \
              rm -f
/home/lfarkas/rpm/BUILDROOT/mingw32-binutils-2.18.50_20080109_2-8.fc11.i386/usr/i686-pc-mingw32/bin/$j;
\
              ln
/home/lfarkas/rpm/BUILDROOT/mingw32-binutils-2.18.50_20080109_2-8.fc11.i386/usr/bin/$k
/home/lfarkas/rpm/BUILDROOT/mingw32-binutils-2.18.50_20080109_2-8.fc11.i386/usr/i686-pc-mingw32/bin/$j

>/dev/null 2>/dev/null \
                || /bin/sh ./libtool --mode=install /usr/bin/install -c
$i
/home/lfarkas/rpm/BUILDROOT/mingw32-binutils-2.18.50_20080109_2-8.fc11.i386/usr/i686-pc-mingw32/bin/$j;
\
            fi; \
          else true; \
          fi; \
        done
-------------------------------------------------

-- 
  Levente                               "Si vis pacem para bellum!"



More information about the mingw mailing list