Hi,
I tried to build eclipse-findbugs (a noarch package) in rawhide yesterday but the build failed:
http://koji.fedoraproject.org/koji/buildinfo?buildID=483577
Here's the spec file:
http://pkgs.fedoraproject.org/cgit/eclipse-findbugs.git/tree/eclipse-findbug...
The spec file passes a few locations to ant based on %{eclipse_base}, which is defined like this:
%global eclipse_base %{_libdir}/eclipse
I guess I've been lucky up to now because eclipse-findbugs has always built on a 32-bit builder. Yesterday it built on a 64-bit builder where %{_libdir} is /usr/lib, but Eclipse is installed under /usr/lib64.
I found a few tickets discussing this:
https://bugzilla.redhat.com/show_bug.cgi?id=808983 https://bugzilla.redhat.com/show_bug.cgi?id=847130 https://fedorahosted.org/fpc/ticket/203
which imply %{eclipse_base} shouldn't be used.
What's the correct way to build this plugin?
Thanks,
Richard
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
- -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On Mon, Dec 09, 2013 at 01:49:42PM +0000, Richard Fearn wrote:
Hi,
I tried to build eclipse-findbugs (a noarch package) in rawhide yesterday but the build failed:
http://koji.fedoraproject.org/koji/buildinfo?buildID=483577
Here's the spec file:
http://pkgs.fedoraproject.org/cgit/eclipse-findbugs.git/tree/eclipse-findbug...
The spec file passes a few locations to ant based on %{eclipse_base}, which is defined like this:
%global eclipse_base %{_libdir}/eclipse
I guess I've been lucky up to now because eclipse-findbugs has always built on a 32-bit builder. Yesterday it built on a 64-bit builder where %{_libdir} is /usr/lib, but Eclipse is installed under /usr/lib64.
I found a few tickets discussing this:
https://bugzilla.redhat.com/show_bug.cgi?id=808983 https://bugzilla.redhat.com/show_bug.cgi?id=847130 https://fedorahosted.org/fpc/ticket/203
which imply %{eclipse_base} shouldn't be used.
What's the correct way to build this plugin?
Thanks,
Richard
Hi Richard,
I'm not sure if this is a recommended way (someone with more experience that I may be able to comment on that), but if you look at the eclipse-wtp-common spec file[1] at line 65, I've added something to determine whether to use /usr/lib/ or /usr/lib64/ for some ugly stuff that needs to know where a platform jar is.
Looking at the eclipse-findbugs package though, is there any reason that it's not being updated to 2.0.3? I just had a look into the source tarball for 2.0.3 and there's a pom file which suggests that it would be buildable with maven. I think this might avoid the issue you're currently having, if it's a possibility.
[1] http://pkgs.fedoraproject.org/cgit/eclipse-wtp-common.git/tree/eclipse-wtp-c...
Hope this helps, Gerard.
Hey Richard,
Thanks for bringing this issue.
This issue was causing a lot of problems in the Eclipse stack, as majority of eclipse noarch plugins required arch-specific Eclipse during the build.
We solved this by moving the eclipse-pdebuild script to /bin/, setting the path at *Eclipse* buildtime to Eclipse, and symlinking some jars to /usr/share/java.
You can find the correct location of Eclipse by calling more /bin/eclipse-pdebuild | grep "datadir=" This is quick, dirty and hackish, but will work.
Another solution is described in https://fedorahosted.org/fpc/ticket/203 comment 18: "noarch packages may use %configure (which uses %{_libdir} to set the --libdir value)".
I have never seen this in use, but I expect that once you have a configure script in your package, it should be able to find the value of libdir. What could for is following configure script:
-- echo ${libdir} > .libdir -- And then a macro for accessing the libdir %define __eclipse_libdir `echo .libdir`/eclipse
Hope that helps.
Thanks Gerard and Krzysztof! I'll look into your suggestions over the next few days.
Regards,
Richard
java-devel@lists.fedoraproject.org