Bug 74581 - ruby srpm won't build on ppc
ruby srpm won't build on ppc
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: ruby (Show other bugs)
1.0
powerpc Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-26 16:50 EDT by Guy Streeter
Modified: 2016-02-09 20:32 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-22 05:46:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
what config.sub accept ppc as an arch (966 bytes, patch)
2002-09-26 16:51 EDT, Guy Streeter
no flags Details | Diff

  None (edit)
Description Guy Streeter 2002-09-26 16:50:28 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
ruby's config.sub doesn't believe in ppc

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.rpmbuild --target=ppc ruby
2.
3.
	

Actual Results:  complaints about not finding 'powerpc-linux' files

Expected Results:  successful build

Additional info:

I will attach a simple patch.
Comment 1 Guy Streeter 2002-09-26 16:51:13 EDT
Created attachment 77367 [details]
what config.sub accept ppc as an arch
Comment 2 Akira TAGOH 2002-10-08 07:09:12 EDT
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?

Comment 3 Jens Petersen 2002-10-09 09:03:44 EDT
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?
Comment 4 Akira TAGOH 2002-10-09 12:18:13 EDT
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.
Comment 5 Jens Petersen 2002-10-18 05:09:02 EDT
Guy, does

   rpmbuild ruby.spec
or
   rpmbuild --target=powerpc ruby.spec

work for you?
Comment 6 Guy Streeter 2002-10-18 10:32:04 EDT
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'
Comment 7 Guy Streeter 2002-10-18 10:45:06 EDT
rpmbuild --target=powerpc works. however, the arch is 'ppc' not 'powerpc'
Comment 8 Akira TAGOH 2002-10-21 02:00:10 EDT
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?
Comment 9 Jens Petersen 2002-10-21 04:14:24 EDT
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.
Comment 10 Jens Petersen 2002-10-21 04:28:11 EDT
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.]
Comment 11 Jens Petersen 2002-10-21 04:29:54 EDT
Alternatively adding a "--target" option to configure might also work instead.
Comment 12 Guy Streeter 2002-10-21 11:01:05 EDT
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'.
Comment 13 Jens Petersen 2002-10-22 04:20:40 EDT
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.
Comment 14 Akira TAGOH 2002-10-22 05:46:42 EDT
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?
Comment 15 Akira TAGOH 2002-10-23 11:03:01 EDT
should be fixed in 1.6.7-11

Note You need to log in before you can comment on or make changes to this bug.