Bug 74581 - ruby srpm won't build on ppc
Summary: ruby srpm won't build on ppc
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: ruby
Version: 1.0
Hardware: powerpc
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-26 20:50 UTC by Guy Streeter
Modified: 2016-02-10 01:32 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-10-22 09:46:49 UTC
Embargoed:


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

Description Guy Streeter 2002-09-26 20:50:28 UTC
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 20:51:13 UTC
Created attachment 77367 [details]
what config.sub accept ppc as an arch

Comment 2 Akira TAGOH 2002-10-08 11:09:12 UTC
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 13:03:44 UTC
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 16:18:13 UTC
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 09:09:02 UTC
Guy, does

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

work for you?

Comment 6 Guy Streeter 2002-10-18 14:32:04 UTC
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 14:45:06 UTC
rpmbuild --target=powerpc works. however, the arch is 'ppc' not 'powerpc'

Comment 8 Akira TAGOH 2002-10-21 06:00:10 UTC
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 08:14:24 UTC
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 08:28:11 UTC
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 08:29:54 UTC
Alternatively adding a "--target" option to configure might also work instead.

Comment 12 Guy Streeter 2002-10-21 15:01:05 UTC
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 08:20:40 UTC
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 09:46:42 UTC
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 15:03:01 UTC
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.