public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] CUPS and old java (commercial software)
@ 2009-07-08 14:47 Helmut Jarausch
  2009-07-08 15:05 ` J. Roeleveld
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Helmut Jarausch @ 2009-07-08 14:47 UTC (permalink / raw
  To: gentoo-user

Hi,

I'm in need to use some commercial software (Matlab and Maple) which
come with their own (probably old) version of Java.

Now, both of those software packages cannot print, they don't see any
CUPS printer UNLESS I remove the symlink /usr/lib/libcups.so which
points to libcups.so.2

But some GenToo packages do need that link, e.g. x11-lib/qt-gui won't
install unless that link is there.

I remember there is a bug with older versions of Java accessing CUPS,
and probably my commercial packages contain such an old version.

Does anybody know how to fix or circumvent this.
(Currently I have to remove the symlink when using one of these
commercial packages and reinstall it afterwards, but ... for a normal
user without root priviledges that's not possible unless I write an SUID
script)

Thanks for any hints,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] CUPS and old java (commercial software)
  2009-07-08 14:47 [gentoo-user] CUPS and old java (commercial software) Helmut Jarausch
@ 2009-07-08 15:05 ` J. Roeleveld
  2009-07-08 15:18   ` Helmut Jarausch
  2009-07-08 17:58 ` Peter Alfredsen
  2009-07-08 19:24 ` Marc Joliet
  2 siblings, 1 reply; 5+ messages in thread
From: J. Roeleveld @ 2009-07-08 15:05 UTC (permalink / raw
  To: gentoo-user

On Wednesday 08 July 2009 16:47:57 Helmut Jarausch wrote:
> Hi,
>
> I'm in need to use some commercial software (Matlab and Maple) which
> come with their own (probably old) version of Java.
>
> Now, both of those software packages cannot print, they don't see any
> CUPS printer UNLESS I remove the symlink /usr/lib/libcups.so which
> points to libcups.so.2
>
> But some GenToo packages do need that link, e.g. x11-lib/qt-gui won't
> install unless that link is there.
>
> I remember there is a bug with older versions of Java accessing CUPS,
> and probably my commercial packages contain such an old version.
>
> Does anybody know how to fix or circumvent this.
> (Currently I have to remove the symlink when using one of these
> commercial packages and reinstall it afterwards, but ... for a normal
> user without root priviledges that's not possible unless I write an SUID
> script)
>
> Thanks for any hints,

Just an idea, not tested:

Is there another "libcups.so" file somewhere?
If yes, create a wrapper-script that puts the location of the other 
"libcups.so" file first in the search list for the LDPATH-variable.

HTH,

Joost



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] CUPS and old java (commercial software)
  2009-07-08 15:05 ` J. Roeleveld
@ 2009-07-08 15:18   ` Helmut Jarausch
  0 siblings, 0 replies; 5+ messages in thread
From: Helmut Jarausch @ 2009-07-08 15:18 UTC (permalink / raw
  To: gentoo-user

On  8 Jul, J. Roeleveld wrote:
> On Wednesday 08 July 2009 16:47:57 Helmut Jarausch wrote:
>> Hi,
>>
>> I'm in need to use some commercial software (Matlab and Maple) which
>> come with their own (probably old) version of Java.
>>
>> Now, both of those software packages cannot print, they don't see any
>> CUPS printer UNLESS I remove the symlink /usr/lib/libcups.so which
>> points to libcups.so.2
>>
>> But some GenToo packages do need that link, e.g. x11-lib/qt-gui won't
>> install unless that link is there.
>>
>> I remember there is a bug with older versions of Java accessing CUPS,
>> and probably my commercial packages contain such an old version.
>>
>> Does anybody know how to fix or circumvent this.
>> (Currently I have to remove the symlink when using one of these
>> commercial packages and reinstall it afterwards, but ... for a normal
>> user without root priviledges that's not possible unless I write an SUID
>> script)
>>
>> Thanks for any hints,
> 
> Just an idea, not tested:
> 
> Is there another "libcups.so" file somewhere?
> If yes, create a wrapper-script that puts the location of the other 
> "libcups.so" file first in the search list for the LDPATH-variable.
> 

Unfortunately, there are only two of them
/usr/lib32/libcups.so
and
/usr/lib64/libcups.so

where /usr/lib is a symlink to /usr/lib64



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] CUPS and old java (commercial software)
  2009-07-08 14:47 [gentoo-user] CUPS and old java (commercial software) Helmut Jarausch
  2009-07-08 15:05 ` J. Roeleveld
@ 2009-07-08 17:58 ` Peter Alfredsen
  2009-07-08 19:24 ` Marc Joliet
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Alfredsen @ 2009-07-08 17:58 UTC (permalink / raw
  To: gentoo-user

On Wed, 08 Jul 2009 16:47:57 +0200 (CEST)
Helmut Jarausch <jarausch@igpm.rwth-aachen.de> wrote:

> Hi,
> 
> I'm in need to use some commercial software (Matlab and Maple) which
> come with their own (probably old) version of Java.
> 
> Now, both of those software packages cannot print, they don't see any
> CUPS printer UNLESS I remove the symlink /usr/lib/libcups.so which
> points to libcups.so.2
> 
> But some GenToo packages do need that link, e.g. x11-lib/qt-gui won't
> install unless that link is there.
> 
> I remember there is a bug with older versions of Java accessing CUPS,
> and probably my commercial packages contain such an old version.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6516881
Which leads to:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500903

which suggests that a wrapper script like this for starting matlab
should do the trick:

---------o<---------------o<-------
#!/bin/bash
export CUPS_SERVER=localhost
command_to_start_matlab
---------o<---------------o<-------

Alternately, try commenting out the line
Listen /var/run/cups/cups.sock
in /etc/cups/cupsd.conf and restarting cups
( If that is an acceptable solution for you, since this will mean cups
only listen on the TCP socket )

/loki_val



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] CUPS and old java (commercial software)
  2009-07-08 14:47 [gentoo-user] CUPS and old java (commercial software) Helmut Jarausch
  2009-07-08 15:05 ` J. Roeleveld
  2009-07-08 17:58 ` Peter Alfredsen
@ 2009-07-08 19:24 ` Marc Joliet
  2 siblings, 0 replies; 5+ messages in thread
From: Marc Joliet @ 2009-07-08 19:24 UTC (permalink / raw
  To: Gentoo-User ML

[-- Attachment #1: Type: text/plain, Size: 2381 bytes --]

Am Wed, 08 Jul 2009 16:47:57 +0200 (CEST)
schrieb Helmut Jarausch <jarausch@igpm.rwth-aachen.de>:

> Hi,

Hi,

> I'm in need to use some commercial software (Matlab and Maple) which
> come with their own (probably old) version of Java.
> 
> Now, both of those software packages cannot print, they don't see any
> CUPS printer UNLESS I remove the symlink /usr/lib/libcups.so which
> points to libcups.so.2
> 
> But some GenToo packages do need that link, e.g. x11-lib/qt-gui won't
> install unless that link is there.
> 
> I remember there is a bug with older versions of Java accessing CUPS,
> and probably my commercial packages contain such an old version.
> 
> Does anybody know how to fix or circumvent this.
> (Currently I have to remove the symlink when using one of these
> commercial packages and reinstall it afterwards, but ... for a normal
> user without root priviledges that's not possible unless I write an SUID
> script)

I can't speak for Maple, but for Matlab you can export the variable
$MATLAB_JAVA. I have

marcec@marcec ~ % echo $MATLAB_JAVA 
/usr/lib/jvm/emul-linux-x86-java-1.6

You can check if it worked via "matlab -e" in a shell or with the following
Matlab command:

  EDU>> version('-java')        
  ans =
  Java 1.5.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode

That's the Java that's shipped with my 2007a installation. For comparison,
with $MATLAB_JAVA set as above:

  EDU>> version('-java')
  ans =
  Java 1.6.0_13 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed
  mode, sharing

I just tested printing from the editor and it works with the system 32bit JVM,
but not with the shipped one, so it should work for you.

I'm not sure about stability, though. I never used to have problems, but more
or less recently Matlab would SEGFAULT occasionally (even though I set this
variable long before the SEGFAULTs started). While using the shipped JVM, it
never crashed. It could be completely unrelated to the JVM being used, but I
think it's better to be aware of the possibility.

> Thanks for any hints,
> 
> Helmut Jarausch
> 
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany

HTH
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-08 19:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-08 14:47 [gentoo-user] CUPS and old java (commercial software) Helmut Jarausch
2009-07-08 15:05 ` J. Roeleveld
2009-07-08 15:18   ` Helmut Jarausch
2009-07-08 17:58 ` Peter Alfredsen
2009-07-08 19:24 ` Marc Joliet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox