eclipse source package provides libswt* binary packages that would conflict with swt-gtk

Bug #491880 reported by أحمد المحمودي (Ahmed El-Mahmoudy)
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
eclipse (Ubuntu)
Fix Released
High
Niels Thykier

Bug Description

Binary package hint: eclipse

Hello,

  We are working on a package 'zekr' that needs SWT 3.5 java libraries.
  First we built it against the library in libswt-gtk* packages that
  were built from eclipse source package, but we got an error when
  running the resulting binary:

org.eclipse.swt.SWTError: No more handles (java.lang.UnsatisfiedLinkError:
no swt-xulrunner-gtk-3555 or swt-xulrunner-gtk in swt.library.path,
java.library.path or the jar file)
    org.eclipse.swt.SWT.error(SWT.java:3910)
    org.eclipse.swt.SWT.error(SWT.java:3799)
    org.eclipse.swt.browser.Mozilla.create(Mozilla.java:451)
    org.eclipse.swt.browser.Browser.<init>(Browser.java:119)
    net.sf.zekr.ui.QuranForm.makeFrame(QuranForm.java:455)
    net.sf.zekr.ui.QuranForm.init(QuranForm.java:280)
    net.sf.zekr.ui.QuranForm.<init>(QuranForm.java:258)
    net.sf.zekr.ZekrMain.startZekr(ZekrMain.java:51)
    net.sf.zekr.ZekrMain.main(ZekrMain.java:88)

Although the package libswt-gtk-3.5-jni was installed (which includes
libswt-xulrunner-gtk-3555.so).

So I prepared swt-gtk 3.5.1-1 package based on Debian swt-gtk 3.4.2-3
package.

When zekr was run against the packages built from swt-gtk, it ran
successfully.

Now the problem is that both eclipse & swt-gtk provide the same package
names: libswt-gtk-3.5-jni & libswt-gtk-3.5-java

Which causes this issue (reported by Mohammad Derakhshani):

> eclipse-platform package depends on libswt-gtk-3.5-java (=
> 3.5.1+repack~1-0ubuntu1). If someone installs libswt-gtk-3.5-java from
> the zekr's repository, he or she cannot install eclipse.

Previous packages of eclipse (and the Debian eclipse packages), it used
to provide those package names instead: libswt<version>-gtk-jni and
libswt<version>-gtk-java

I don't know why Ubuntu changed the way eclipse names its swt library
packages. I hope it would be returned to the way it used to be, that
would also lessen the differences between Debian & Ubuntu regarding
eclipse & swt-gtk.

ProblemType: Bug
Architecture: i386
Date: Thu Dec 3 15:58:24 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: wl
Package: eclipse (not installed)
ProcEnviron:
 LANGUAGE=en_US:en_GB:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: eclipse
Uname: Linux 2.6.31-15-generic i686

Related branches

Revision history for this message
Matthias Klose (doko) wrote :

this was changed in the eclipse-3.5 packaging. please try to find out why this fails. is openjdk or sun-java used?

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote : Re: [Bug 491880] Re: eclipse source package provides libswt* binary packages that would conflict with swt-gtk

On Fri, Dec 04, 2009 at 08:18:36AM -0000, Matthias Klose wrote:
> this was changed in the eclipse-3.5 packaging. please try to find out
> why this fails. is openjdk or sun-java used?
---end quoted text---

openjdk is used.

--
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

Revision history for this message
MD (mderakhs) wrote :

Matthias,

I tried with sun-java, and got the same error:
org.eclipse.swt.SWTError: No more handles (java.lang.UnsatisfiedLinkError: no swt-xulrunner-gtk-3555 or swt-xulrunner-gtk in swt.library.path, java.library.path or the jar file)
 org.eclipse.swt.SWT.error(SWT.java:3910)
 org.eclipse.swt.SWT.error(SWT.java:3799)
 org.eclipse.swt.browser.Mozilla.create(Mozilla.java:451)
 org.eclipse.swt.browser.Browser.<init>(Browser.java:119)
 net.sf.zekr.ui.QuranForm.makeFrame(QuranForm.java:455)
 net.sf.zekr.ui.QuranForm.init(QuranForm.java:280)
 net.sf.zekr.ui.QuranForm.<init>(QuranForm.java:258)
 net.sf.zekr.ZekrMain.startZekr(ZekrMain.java:51)
 net.sf.zekr.ZekrMain.main(ZekrMain.java:88)

Revision history for this message
Benjamin Drung (bdrung) wrote :

It would be good to figure out the difference between both packages to find the required change to fix this build error.

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

On Sat, Dec 05, 2009 at 11:17:22PM -0000, Benjamin Drung wrote:
> It would be good to figure out the difference between both packages to
> find the required change to fix this build error.
---end quoted text---

The swt-gtk 3.5.1 package is on my PPA[1].

Btw, it is a runtime error, not a build error.

[1] https://launchpad.net/~aelmahmoudy/+archive/ppa
--
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

Revision history for this message
Adrian Perez (adrianperez-deb) wrote :

As discussed in irc, there might be an issue with the way you're launching your program.
Since
`apt-file search swt-xulrunner-gtk-3555.so` properly returns:
  "libswt-gtk-3.5-jni: /usr/lib/jni/libswt-xulrunner-gtk-3555.so",
I'm thinking about you're not including /usr/lib/jni in the classpath.

In the other hand, we're working to remove the build of SWT from the eclipse package and make it depend on the swt-gtk package, this will be achieved hopefully this week.

Best Regards.

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

On Mon, Dec 14, 2009 at 02:49:02PM -0000, Adrian Perez wrote:
> As discussed in irc, there might be an issue with the way you're launching your program.
> Since
> `apt-file search swt-xulrunner-gtk-3555.so` properly returns:
> "libswt-gtk-3.5-jni: /usr/lib/jni/libswt-xulrunner-gtk-3555.so",
> I'm thinking about you're not including /usr/lib/jni in the classpath.
---end quoted text---

I tried building against against libswt-* packages provided by eclipse,
and I set:

CLASS_PATH=/usr/share/java:/usr/lib/jni:/usr/lib/java

Yet I still got the same error.

--
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

Revision history for this message
Adrian Perez (adrianperez-deb) wrote :

That's probably because the variable you need to set is spelled
CLASSPATH and not CLASS_PATH.
Try that, hoping for comments.

--
Best Regards,

Adrian Perez <email address hidden>
Ubuntu Developer

GPG Key ID: 8A9A3084
GPG Key Fingerprint: 99E8 E74E 7B4F 93AE F32A 5523 9973 0D5C 8A9A 3084

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

On Thu, Dec 17, 2009 at 04:49:45PM -0000, Adrian Perez wrote:
> That's probably because the variable you need to set is spelled
> CLASSPATH and not CLASS_PATH.
> Try that, hoping for comments.
---end quoted text---

Sorry, it was CLASS_PATH not CLASSPATH.

--
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

Revision history for this message
Adrian Perez (adrianperez-deb) wrote :

The variable is CLASSPATH.

On Thu, 2009-12-17 at 17:09 +0000, أحمد المحمودي (Ahmed
El-Mahmoudy) wrote:
> On Thu, Dec 17, 2009 at 04:49:45PM -0000, Adrian Perez wrote:
> > That's probably because the variable you need to set is spelled
> > CLASSPATH and not CLASS_PATH.
> > Try that, hoping for comments.
> ---end quoted text---
>
> Sorry, it was CLASS_PATH not CLASSPATH.
>
> --
> ‎أحمد المحمودي (Ahmed El-Mahmoudy)
> Digital design engineer
> GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
> GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7
>

--
Best Regards,

Adrian Perez <email address hidden>
Ubuntu Developer

GPG Key ID: 8A9A3084
GPG Key Fingerprint: 99E8 E74E 7B4F 93AE F32A 5523 9973 0D5C 8A9A 3084

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

On Fri, Dec 18, 2009 at 03:51:59PM -0000, Adrian Perez wrote:
> The variable is CLASSPATH.
---end quoted text---

Actually it doesn't matter as I call java as follows:

CLASS_PATH=/usr/share/java:/usr/lib/jni:/usr/lib/java
java -cp $CLASS_PATH ...

Revision history for this message
Niels Thykier (niels-thykier) wrote :

Hi

Assuming you have not already done so; could you try with "-Djava.library.path=/usr/lib/jni" to java as well? The error mentions this.

~Niels

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

On Sat, Dec 26, 2009 at 09:34:08AM -0000, Niels Thykier wrote:
> Assuming you have not already done so; could you try with
> "-Djava.library.path=/usr/lib/jni" to java as well? The error mentions
> this.
---end quoted text---

-Djava.library.path=/usr/lib/jni is indeed being passed to java
command. So, that's not the problem. Also I did try
-Dswt.library.path=/usr/lib/jni, but still doesn't work.

--
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

Also I have
-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-1.9.1.6

could this be the problem ?

--
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

When I removed
"-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-1.9.1.6", I
get a different error:

org.eclipse.swt.SWTError: No more handles [Could not detect registered XULRunner to use]
        org.eclipse.swt.SWT.error(SWT.java:3910)
        org.eclipse.swt.browser.Mozilla.create(Mozilla.java:472)
        org.eclipse.swt.browser.Browser.<init>(Browser.java:119)
        net.sf.zekr.ui.QuranForm.makeFrame(QuranForm.java:455)
        net.sf.zekr.ui.QuranForm.init(QuranForm.java:280)
        net.sf.zekr.ui.QuranForm.<init>(QuranForm.java:258)
        net.sf.zekr.ZekrMain.startZekr(ZekrMain.java:51)
        net.sf.zekr.ZekrMain.main(ZekrMain.java:88)

--
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

Benjamin Drung (bdrung)
Changed in eclipse (Ubuntu):
status: New → In Progress
importance: Undecided → High
Changed in eclipse (Ubuntu):
assignee: nobody → Niels Thykier (niels-thykier)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package eclipse - 3.5.1+repack~3-0ubuntu2

---------------
eclipse (3.5.1+repack~3-0ubuntu2) lucid; urgency=low

  * Rebase to packaging from pkg-java/eclipse (thanks to Niels Thykier):
    + Set a sane file limit for osgi-bundles. (Closes: #558693, LP: #293573)
    + Inject update sites on first run. (LP: #460944)
    + Prevent conflict with swt-gtk's swt packages.
      - Rename our swt packages.
      - Do not install conflicting symlinks/files.
      (Closes: #541638, LP: #491880)
    + Imported patch from Fedora that fixes seg. faults in libpango.
      (LP: #445009)
    + Update manpage. (LP: #494065)
    + Bump Standards-Version to 3.8.4.
  * Re-add versioned dependency on libcommons-el-java, libjetty-java,
    libservlet2.4-java; the packages are now available in Ubuntu.
  * Drop versioned dependency on liblucene2-java and libmx4j-java; they are not
    yet available in Ubuntu.
 -- Benjamin Drung <email address hidden> Sat, 30 Jan 2010 18:55:04 +0100

Changed in eclipse (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.