%{_host} different in FC and FE build environments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roozbeh Pournader wrote:

> I was playing with an SVG rendering problem I had on a box that stopped
> gnome-games from working, and after a lot of debugging I found that it
> was because I had compiled the gtk2 package myself, but was using FC4's
> librsvg2. Now, librsvg2 runs this in it's %post:
>
> %{_bindir}/update-gdk-pixbuf-loaders %{_host}
>
> The %{_host} macro, expanded at build time, had resulted in
> "i386-redhat-linux-gnu". But gtk2, which I had rebuilt using a stock
> FC4's rpmbuild, had that %{_host} macro expanded to
> "i686-redhat-linux-gnu" (as defined in /usr/lib/rpm/macros). This
> resulted in an error message and all.
>
> I tried --target i386, I tried setarch i386, I tried mock, and I still
> got i686. The only way I could fix this was through defining redefining
> _host explicitly in my '.rpmmacros'.
>
> So, this means that the defaults used for building FC (beehive and co)
> is different from the FE ones (mock and co). This needs to be fixed, or
> to say the least, will result in weird things if we move, say, libwmf
> from core to extras.
>
> The question is: where should this be fixed? rpm? mock? beehive? where?

The problem being is that %{_host) is based on the build host, not the
target arch/platform.  Any variant in buildhost will exhibit the problem
you're seeing.  The bug is in gtk2, IMO.

I ran into the same problem in the past, my quick-n-dirty fix was to
change
%{_bindir}/update-gdk-pixbuf-loaders %{_host}
to
%{_bindir}/update-gdk-pixbuf-loaders %{_target_platform}

add to %configure:  --host="%{_target_platform}"

-- Rex


[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux