LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 10-29-2008, 05:48 AM   #1
alanhr
LQ Newbie
 
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Rep: Reputation: 15
32-bit apps using pango on a 64-bit machine


I have some 32-bit apps installed on a 64-bit machine running RHEL 4.7 that use pango and are becoming the bane of my existence. In my .bashrc file (which is sourced by .bash_profile) I have done the following to get .pangorc to point to the proper pango modules before running an app:

alias firefox='ln -fs ~/.pangorc64 ~/.pangorc && firefox'
alias acroread='ln -fs ~/.pangorc32 ~/.pangorc && acroread'

This works fine for running terminal commands, but when I click something in the GUI or (in some cases) when another program calls one of these apps they fail to work. Plus, every time I discover a new pango-using program I have to add a new alias to the list.

Is there a better way?
 
Old 10-29-2008, 06:13 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
In the case of firefox, isn't that actually started from a script? In such a case you should just be able to add to the script something like:

export PANGO_RC_FILE=/path/to/Nbit/pangorc

For a mixed Debian system, for example, one suggestion is to have an /etc/pango32 and /etc/pango64 directory with an appropriate pangorc and modules files. (See: http://www.debian-administration.org/articles/534)

Unfortunately, any update will wipe out your edit to the startup script.

Still, writing aliases as you have but using the PANGO_RC_FILE environment variable would be more convenient than playing with those symlinks - for one, you're not forever altering those inodes on disk.

As for clicking icons - well, you have to take time setting up the command executed by those icons. As you can imagine, this can be really bad news if the installer put menu items and icons all over the place and you have numerous users. An alternative is to rename affected programs and replace the actual programs with a small script. Once again, any software update will screw things up. It's just one of those hassles you have to live with when using a mixed system.
 
Old 10-29-2008, 09:41 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,029

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
I don't know what the purpose of this pangorc file is. Maybe you could clarify that.

I use Gentoo, and I use pango on 32 and 64 programs without problems. It comes preconfigured out of the box, and the only thing that the programs needs is to have the right libs available, which is done using /etc/ld.so.conf usually.

Code:
$ slocate libpango
/usr/lib64/libpango-1.0.la
/usr/lib64/libpangomm-1.4.so.1.0.30
/usr/lib64/libpango-1.0.so.0
/usr/lib64/libpangox-1.0.la
/usr/lib64/libpangoft2-1.0.la
/usr/lib64/libpangoxft-1.0.so.0
/usr/lib64/libpangoxft-1.0.so
/usr/lib64/libpangomm-1.4.so
/usr/lib64/libpangocairo-1.0.la
/usr/lib64/libpangoxft-1.0.la
/usr/lib64/libpangocairo-1.0.so.0
/usr/lib64/libpango-1.0.so
/usr/lib64/libpangox-1.0.so
/usr/lib64/libpangomm-1.4.la
/usr/lib64/libpangoft2-1.0.so.0
/usr/lib64/libpangomm-1.4.so.1
/usr/lib64/libpangoft2-1.0.so
/usr/lib64/libpangocairo-1.0.so
/usr/lib64/libpango-1.0.so.0.2201.0
/usr/lib64/libpangox-1.0.so.0
/usr/lib64/libpangoft2-1.0.so.0.2201.0
/usr/lib64/libpangox-1.0.so.0.2201.0
/usr/lib64/libpangoxft-1.0.so.0.2201.0
/usr/lib64/libpangocairo-1.0.so.0.2201.0
/usr/lib32/libpangoft2-1.0.so.0.1800.4
/usr/lib32/libpango-1.0.so.0
/usr/lib32/libpangox-1.0.so.0.1800.4
/usr/lib32/libpangoxft-1.0.so.0
/usr/lib32/libpangoxft-1.0.so
/usr/lib32/libpangocairo-1.0.so.0
/usr/lib32/libpangocairo-1.0.so.0.1800.4
/usr/lib32/libpangoft2-1.0.so.0
/usr/lib32/libpangox-1.0.so
/usr/lib32/libpangocairo-1.0.so
/usr/lib32/libpango-1.0.so.0.1800.4
/usr/lib32/libpangoft2-1.0.so
/usr/lib32/libpangoxft-1.0.so.0.1800.4
/usr/lib32/libpangox-1.0.so.0
/usr/lib32/libpango-1.0.so
As you see, Gentoo hold libs for 32 and 64 bits on different places. If a given program can't link against one lib, it should use the next one available with the same name, I think it works out of the box that way.

Code:
$ ls -lR /etc/pango/
/etc/pango/:
total 20K
drwxr-xr-x 2 root root 4,0K mar 20  2007 i686-pc-linux-gnu
-rw-r--r-- 1 root root  12K oct 22 15:48 pangox.aliases
drwxr-xr-x 2 root root 4,0K mar 20  2007 x86_64-pc-linux-gnu

/etc/pango/i686-pc-linux-gnu:
total 4,0K
-rw-r--r-- 1 root root 3,8K mar 18  2008 pango.modules

/etc/pango/x86_64-pc-linux-gnu:
total 4,0K
-rw-r--r-- 1 root root 3,8K oct 22 15:49 pango.modules
 
Old 10-30-2008, 10:55 AM   #4
alanhr
LQ Newbie
 
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Original Poster
Rep: Reputation: 15
My question about clicking icons was really about getting some sort of system-wide configuration for pango, I suppose. The environment variables in the script would certainly do the trick, though I would have to be certain to keep a list of altered scripts around so I could keep track in the event of updates.

I too have the 32-bit and 64-bit pango libraries in separate locations -- I get a very similar listing when I run slocate. The purpose of the .pangorc file is simply to direct applications to the pangox.aliases and pango.modules files. As far as I can tell, an application that needs pango looks in the .pangorc file to figure out where to find these. My 64-bit version looks like this:

[Pango]
ModuleFiles=/etc/pango/x86_64-redhat-linux-gnu/pango.modules
[PangoX]
AliasFiles=/etc/pango/pangox.aliases

On my system I had to create it manually before any pango-using apps would run. It would be nice if it would just work out of the box, so maybe I'll post something in the Red Hat forum to see if this is really the way it should be. If so, I'll just go with the environment variable solution.

Thanks to both of you.
 
Old 10-30-2008, 10:18 PM   #5
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Well, this is how it is at the moment. I guess the next thing to do is find out if anyone is hassling the pango developers to make a change to support this out of the box, especially since mixed systems will be around for a while. For example - a config option which sets the default location which the library will check for the rc or aliases/modules files. That way the value can be set to something like /etc/pango32 when building 32-bit software and /etc/pango64 when building for 64-bit software.
 
Old 10-31-2008, 04:19 AM   #6
alanhr
LQ Newbie
 
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks pinniped -- I have done what you suggested and it works beautifully! I use 64-bit pango by default by setting the PANGO_RC_FILE in .bashrc, but change it in the startup scripts for my 32-bit applications. The only downside is, as you say, that I will have to redo my alterations each time a 32-bit app updates....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i tell if 32 bit or 64 bit ubuntu is installed on a machine? lel4866 Linux - Software 15 05-08-2012 12:18 AM
how do I install 32-bit compiler libraries onto a 64-bit machine? charleycat Linux - Software 1 08-16-2007 01:45 PM
Mandriva 64-bit running 32-bit apps sleepykit Mandriva 1 03-21-2007 07:44 AM
Issues running 32-bit apps on 64-bit (Opera, Skype) lydgate Linux - Software 4 12-17-2006 05:45 AM
64 bit linux - confused about 32 bit apps babysnake Linux - Software 2 08-21-2006 01:43 AM


All times are GMT -5. The time now is 10:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration