Description of problem: During build I get link error if libcom_err-devel package is not installed. I also get a similar error for -lk5crypto (libk5crypto.so - krb5-devel, krb5-libs packages?) if that is not installed either. Version-Release number of selected component (if applicable): FC16, openssl 1.0.0g How reproducible: Always Steps to Reproduce: 1. rpm -ivh openssl-1.0.0g-1.fc16.src.rpm 2. cd rpmbuild 3. rpmbuild -bb openssl.spec (the same happens during cross-compilation as well, i.e. rpmbuild -bb --target=i686 openssl.spec) Actual results: link errors for -lcom_err and -lk5crypto if the above packages/libraries are not installed. Expected results: The appropriate BuildRequires statements so that build does not fail Additional info:
Actually there is BuildRequires: krb5-devel which should be sufficient as krb5-devel pulls libcom_err-devel on its own. I suppose you're trying to build packages for non-default architecture - I'd suggest to use mock for that.
(In reply to comment #1) > Actually there is BuildRequires: krb5-devel which should be sufficient as > krb5-devel pulls libcom_err-devel on its own. Except that it won't, because the current BuildRequires is defined as "krb5-devel", which pulls the package for the "build" architecture, *not* the "host". In "normal" circumstances that doesn't matter as build=host, but when cross-compiling that triggers the above errors. The *correct* way of dealing with this is to alter the BuildRequires statement to include the following: "krb5-devel%{?_isa}" so that the *proper* - target arch - dependencies are pulled out. This should work in every case, regardless whether there is a "normal" compilation taking place or whether there is a cross-compilation (i.e. build != host). It is also worth noting that usually all the "-devel" packages should have the "%{?_isa}" suffix attached (in case of cross-compilation) so that the right dependencies are pulled out. > I suppose you're trying to build > packages for non-default architecture - I'd suggest to use mock for that. For reasons I am not going to go on here, mock is completely *useless* and cannot be used.
I do not think it is reasonable to modify all the various packages that BuildRequires: anything-devel to add the %{?_isa}. This is something that should be handled by your build environment.
(In reply to comment #3) > I do not think it is reasonable to modify all the various packages that > BuildRequires: anything-devel to add the %{?_isa}. This is something that > should be handled by your build environment. My "build environment" is Fedora, using Fedora-s own RPM system, which is what this bug was reported against. If you consult the .spec manual, you will find that this practice is widely used. It is also worth reiterating again that the inclusion of the %{?_isa} suffix won't do any harm regardless of whether cross-compilation is used or not - it just makes sure that the dependencies for the right arch are pulled out, that's all.
There is no requirement by Fedora packaging policy that would specify that BuildRequires dependencies should contain the %{?_isa}. Unless this is specified in Fedora packaging policy, I will not mangle all my packages to add it. And adding it just for openssl and leaving the rest intact does not make any sense anyway. Also krb5 package would have to be modified as well to properly require libcom_err-devel%{?_isa} otherwise it won't help you anyway. I will not add direct dependency on package that is not directly used in the build but only indirectly through krb5.