How do I cross-build using rpm? I want to build on RHL (I'm running 7.0 at the 
moment) and target non-intel.

It seems that rpm doesn't know what it can do:

[summer@possum summer]$ rpm --rebuild --target=fred 
redhat/SRPMS/rdate-0.960923-8.src.rpm
Installing redhat/SRPMS/rdate-0.960923-8.src.rpm
Building target platforms: fred
Building for target fred
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.16646
+ umask 022
+ cd /tmp/BuildRPM

<snip>

rm -f *.o .,* a.out ERRS rdate
+ make RPM_OPT_FLAGS=-O2
cc -O2    rdate.c   -o rdate
rdate.c: In function `RemoteDate':
rdate.c:67: warning: decimal constant is so large that it is unsigned
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.68046

<snip>
PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: ld-linux.so.2 libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1.3)
Wrote: /u02/summer/redhat/RPMSi686/fred/rdate-0.960923-8.fred.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.33417
+ umask 022
+ cd /tmp/BuildRPM
+ cd rdate
+ rm -rf /tmp/BuildRPM/Brdate
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.33417
+ umask 022
+ cd /tmp/BuildRPM
+ rm -rf rdate
+ exit 0
[summer@possum summer]$ 

So it's compiled for Intel and created an rpm for "fred."  Odds are, fred 
can't run it.

It looks likely to work for sparc (I don't have a compiler configured to 
target sparc, but it looks like it should work), but several mentioned in  
/usr/lib/rpm/rpmrc:arch_canon do not work.



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to