Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
Summary: compiled mingw files include the sys-root path
https://bugzilla.redhat.com/show_bug.cgi?id=514187
Summary: compiled mingw files include the sys-root path Product: Fedora Version: rawhide Platform: All OS/Version: Linux Status: NEW Severity: medium Priority: low Component: redhat-rpm-config AssignedTo: jonathan@jonmasters.org ReportedBy: pbonzini@redhat.com QAContact: extras-qa@fedoraproject.org CC: lfarkas@lfarkas.org, t.sailer@alumni.ethz.ch, berrange@redhat.com, pmatilai@redhat.com, rjones@redhat.com, erik-fedora@vanpienbroek.nl, jonathan@jonmasters.org, fedora-mingw@lists.fedoraproject.org Blocks: 513826 Classification: Fedora Target Release: --- Clone Of: 513826
+++ This bug was initially created as a clone of Bug #513826 +++
Description of problem: The paths in the .pc files for mingw32 include the /usr/i686-pc-mingw32/sys-root component. This would prevent using them within the MSYS shell, for example.
It would be more correct to install them without the path and, in a i686-pc-mingw32-pkg-config (see bug 513825), provide the PKG_CONFIG_SYSROOT_DIR variable. The script would work like this then:
#! /bin/sh
PKG_CONFIG_SYSROOT_DIR=`i686-pc-mingw32-gcc --print-sysroot` prefix=$PKG_CONFIG_SYSROOT_DIR/mingw PKG_CONFIG_LIBDIR=$prefix/lib/pkgconfig:$prefix/share/pkgconfig export PKG_CONFIG_LIBDIR # PKG_CONFIG_SYSROOT_DIR exec pkg-config "$@"
--- Additional comment from pbonzini@redhat.com on 2009-07-26 15:15:36 EDT ---
To clarify: the paths work, but still they are not correct. Right now if I want to install MSYS under Wine I have two choices:
1) I proceed as in bug 513819 so that the Fedora mingw root is visible under MSYS. Then however I cannot use pkg-config under MSYS.
2) I copy everything from /usr/i686-pc-mingw32/sys-root/mingw under Wine's c:/mingw, and then I lose all the updates that come through Fedora's package manager. I also have to update the .pc files manually.
It's a lose-lose situation, and PKG_CONFIG_SYSROOT_DIR was meant exactly to support this.
--- Additional comment from erik-fedora@vanpienbroek.nl on 2009-07-26 18:20:13 EDT ---
Why would you want to install MSYS under Wine? MSYS just provides some tools which we already have native on Linux. The bash/sh from MSYS is also way slower than native bash/sh
--- Additional comment from pbonzini@redhat.com on 2009-07-27 03:05:30 EDT ---
For testing. I want to make sure that there are no hidden bits in the configure/make files that *only* work when crosscompiling (the typical example is forgetting to quote a variable that could contain Windows \ paths).
Besides, the idea of a sysroot is to match *exactly* what would be on the non-native system. I could take the Fedora sysroot and copy it to a real Windows machine, and it should just work. Now instead if I do this and install the Windows version of pkg-config, it will not work because the .pc files contains pointers to the Fedora images.
This is not easy to fix (it is a "flag day" bug, you have to fix all packages at once), so it may not have a high priority. But it is serious.
--- Additional comment from rjones@redhat.com on 2009-07-27 04:53:55 EDT ---
(In reply to comment #3)
For testing. I want to make sure that there are no hidden bits in the configure/make files that *only* work when crosscompiling (the typical example is forgetting to quote a variable that could contain Windows \ paths).
Besides, the idea of a sysroot is to match *exactly* what would be on the non-native system. I could take the Fedora sysroot and copy it to a real Windows machine, and it should just work. Now instead if I do this and install the Windows version of pkg-config, it will not work because the .pc files contains pointers to the Fedora images.
This isn't how we install on Windows at all. We use NSIS to build installers.
And the aim of this project is to free developers from having to use Windows at all, not to allow people to copy binaries onto a Windows machine and continue development there.
The *.pc files contain the correct paths for cross-compiling to a Windows host from a Fedora build system, which is precisely the aim of this project.
--- Additional comment from pbonzini@redhat.com on 2009-07-28 04:36:53 EDT ---
Created an attachment (id=355373) --> (https://bugzilla.redhat.com/attachment.cgi?id=355373) redhat-rpm-config part of the patch
The remaining part is to change the packages to do a change similar to what the patch does to %{_mingw32_makeinstall}.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=514187
Paolo Bonzini pbonzini@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks|513826 | Depends on| |513826
--- Comment #1 from Paolo Bonzini pbonzini@redhat.com 2009-07-28 04:48:24 EDT --- It turns out that a lot of binaries in mingw32 include the sys-root path. This is bad, as it is comparable to including the rpm-build-root in a binary RPM:
./mingw/bin/gettextize:prefix="/usr/i686-pc-mingw32/sys-root/mingw" ./mingw/bin/gettextize:gettext_dir="/usr/i686-pc-mingw32/sys-root/mingw/share/gettext" ./mingw/bin/gettextize: exec_prefix="/usr/i686-pc-mingw32/sys-root/mingw" ./mingw/bin/gettextize: bindir="/usr/i686-pc-mingw32/sys-root/mingw/bin" Binary file ./mingw/bin/libtermcap-0.dll matches Binary file ./mingw/bin/msgexec.exe matches Binary file ./mingw/bin/libgmodule-2.0-0.dll matches Binary file ./mingw/bin/tndbm.exe matches Binary file ./mingw/bin/libgettextsrc-0-17.dll matches Binary file ./mingw/bin/conv2gdbm.exe matches
This however is a huge can of worms since it includes dependency_libs in libtool libraries:
./mingw/lib/libpng.la:dependency_libs=' /usr/i686-pc-mingw32/sys-root/mingw/lib/libz.la'
and as far as I know libtool does not support sysrooting.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=514187
--- Comment #2 from Richard W.M. Jones rjones@redhat.com 2009-07-28 04:49:02 EDT --- Jon: Please don't apply this patch - read the comments in bug 513826 first, and the discussion on the fedora-mingw mailing list.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=514187
--- Comment #3 from Paolo Bonzini pbonzini@redhat.com 2009-07-28 04:59:36 EDT --- Of course this patch is not meant to be applied. "The remaining part is to change the packages to do a change similar to what the patch does to %{_mingw32_makeinstall}" and "This however is a huge can of worms" should be clear enough.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=514187
Richard W.M. Jones rjones@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |NOTABUG
--- Comment #4 from Richard W.M. Jones rjones@redhat.com 2009-09-09 10:13:16 EDT --- Please discuss packaging problems on the list. Closing as NOTABUG.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=514187
Bug 514187 depends on bug 513826, which changed state.
Bug 513826 Summary: .pc files for mingw32 library include the sysroot https://bugzilla.redhat.com/show_bug.cgi?id=513826
What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |NOTABUG