Bug 74581
Summary: | ruby srpm won't build on ppc | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | Guy Streeter <streeter> | ||||
Component: | ruby | Assignee: | Akira TAGOH <tagoh> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 1.0 | CC: | nobody, petersen | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | powerpc | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2002-10-22 09:46:49 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Guy Streeter
2002-09-26 20:50:28 UTC
Created attachment 77367 [details]
what config.sub accept ppc as an arch
Hmm, I think it's not a bug. see rpmbuild's help: --target=CPU-VENDOR-OS override target platform it means rpmbuild are setting CPU in --target to %{_target_cpu}. On native environment, %{_target_cpu} is used as 'powerpc'. and generally using rpm doesn't depend on libtool. so you should use 'powerpc' instead of 'ppc' for --target option. However I'm sure some applications uses ppc-linux (e.g. perl, gcc). it may be good to uniform. Maybe this problem may appears with another libraries/programs which used libtool. Jens, any comments? I didn't have a chance to look at the ruby source yet, but is there anything special about the configure files shipped with ruby, or is the config.sub file just out of date? No, config.sub which we shipped on 8.0 is also set powerpc-linux, and this problem isn't related ruby's source code. The problem is, --target option for rpm is replaced %{_target_cpu} macro, then config.sub is set powerpc-linux on ppc. value of %{_target_cpu} and value which is gotten from config.sub is different (actual result should be %{_target_cpu} == ppc and libtool's thing == powerpc). If some library uses libtool and it makes an arch-dependent directory, that library will also see the same problem. so I wanted a comment from Jens. Guy, does rpmbuild ruby.spec or rpmbuild --target=powerpc ruby.spec work for you? ruby-1.6.7-10, on a 32bit ppc system: rpmbuild ruby.spec RPM build errors: File not found: /var/tmp/ruby-1.6.7-root/usr/lib/ruby/1.6/ppc-linux File not found: /var/tmp/ruby-1.6.7-root/usr/lib/ruby/1.6/ppc-linux/digest File not found: /var/tmp/ruby-1.6.7-root/usr/lib/site_ruby/1.6/ppc-linux This is becuase the build used 'powerpc-linux' instead of 'ppc-linux' rpmbuild --target=powerpc works. however, the arch is 'ppc' not 'powerpc' Our build system uses 'ppc' instead of 'powerpc'? AFAIK rpm on ppc used 'powerpc' as default %{_target_cpu}, though. Do you have a pointer which is described our decision? For future reference, what do we use 'powerpc' for? I am still confused about your patch. "ppc" is not listed in the master config.sub (in the automake cvs repository). Are you applying the above patch to any other package for ppc? Could you attach the build log so that I can see the exact way in which the build fails? I couldn't see any arch specific directories in the source either. For reference here are the relevant current lines in the master config.sub files: | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ and | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ and the lines that transform ppc into powerpc: ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` So all in all I get the impression that powerpc is the officially recognised archname for ppc in the GNU world at least, but perhaps I'm missing something. Ah sorry, I overlooked these:
> File not found: /var/tmp/ruby-1.6.7-root/usr/lib/ruby/1.6/ppc-linux
> File not found: /var/tmp/ruby-1.6.7-root/usr/lib/ruby/1.6/ppc-linux/digest
> File not found: /var/tmp/ruby-1.6.7-root/usr/lib/site_ruby/1.6/ppc-linux
I see, so it is really a packaging error, rather than a build error as such.
In that case, can't the %files macros just be changed with say
s|%{_target_cpu}-%{_target_os}|*-%{_target_os}|
to workaround this problem?
Does this problem arise elsewhere too?
[I would also drop the "--host" and "--build" options to configure anyway,
though I don't think affect this problem.]
Alternatively adding a "--target" option to configure might also work instead. I'm not in any posisiton to make policy decisions for automake, etc. I can tell you that 'ppc' is what every other distro calls the arch, and that rpm supplies 'powerpc' as the target cpu everywhere. Using --target=powerpc om the rpm commandline would break specfiles that use %ifarch ppc (and there are a lot of them), and it would create binary rpm files named *.powerpc.rpm, which is not what any other distro does. I've been told that all our specfiles should use the %configure macro, and it automatically supplies --host, --build, and --target to ./configure. These will all be 'powerpc' on a ppc system. Also, 64bit powerpc systems are called 'ppc64'. Yes, as I suggested indirectly above, it is quite likely that using %configure (ie giving --host, --build, and --target options to configure) will solve the problem. Perhaps one of you could try that? Alternatively massaging the files list as I indicated above should also work I think. s|%{_target_cpu}-%{_target_os}|*-%{_target_os} doesn't help them. because Ruby will find the arch-dependent module from the value which is returned by libtool. About powerpc vs ppc issue, I see. Even if spec file uses %configure, build are failed. so I think that patch is needed anyway. should we apply it to libtool? should be fixed in 1.6.7-11 |