Re: rpmbuild with target i386 on x86_64 sets %{_libdir} to lib64.

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

 



On Fri, 2006-09-22 at 11:04 +0100, Andy Green wrote:
> Rob Andrews wrote:
> > On 22-Sep-2006 08:54.24 (BST), Andy Green wrote:
> >  > I see, that would be convenient...
> >  > 
> >  >       --target PLATFORM
> >  >               When building the package, interpret PLATFORM as 
> >  > arch-vendor-os and  set  the  macros
> >  >               %_target, %_target_cpu, and %_target_os accordingly.
> >  > 
> >  > What happens at the moment when you try to use --target then?
> > 
> > Well, using --target i386 on an x86_64 installation, it managed to build
> > i386 binaries (using g++ -m32). But obviously, the library path was wrong.
> > 
> > It most likely managed to build for the correct architecture because it
> > passed --target=%{_target} to the configure script.
> 
> Using strace on rpmbuild it seems to look always at the host 
> /usr/lib/rpm/<targetdir>, ie on an x86 host for
Well, only if you don't have redhat-rpm-config installed:

# strace rpmbuild -ba --target=i686-mingw32 rtems-4.7-avr-rtems4.7-binutils.spec 2>&1 | grep mingw
execve("/usr/bin/rpmbuild", ["rpmbuild", "-ba", "--target=i686-mingw32",
"rtems-4.7-avr-rtems4.7-binutils."...], [/* 34 vars */]) = 0
open("/usr/lib/rpm/i686-mingw32/macros", O_RDONLY|O_LARGEFILE) = 3
open("/etc/rpm/i686-mingw32/macros", O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
Building for target i686-mingw32
+ echo 'TARGET: i686-mingw32'
TARGET: i686-mingw32
+ echo 'TARGET_PLATFORM: i686-pc-mingw32'
TARGET_PLATFORM: i686-pc-mingw32
...

=> /usr/lib/rpm/i686-mingw32/macros is being read.
%_target_platform is set correctly, but other defines are still
incorrect, ...

If you have redhat-rpm-config installed this happens:
# strace rpmbuild -ba --target=i686-mingw32 rtems-4.7-avr-rtems4.7-binutils.spec 2>&1 | grep mingw
execve("/usr/bin/rpmbuild", ["rpmbuild", "-ba", "--target=i686-mingw32",
"rtems-4.7-avr-rtems4.7-binutils."...], [/* 34 vars */]) = 0
write(1, "Building target platforms: i686-"..., 125Building target
platforms: i686-mingw32
Building for target i686-mingw32
+ echo 'TARGET: i686-mingw32'
TARGET: i686-mingw32
+ echo 'TARGET_PLATFORM: i686-redhat-mingw32-gnu'
TARGET_PLATFORM: i686-redhat-mingw32-gnu

=> /usr/lib/rpm/i686-mingw32/macros is not being read, 
%_target_platform is being mistreated, etc., etc. ... 
things end up in a real mess.

Ralf



-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux