LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-19-2013, 08:15 PM   #1
_madman_
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Rep: Reputation: 0
Run 32-bit executables on 64-bit system with shared libraries.


I'm logging into a remote 64-bit Linux box via 'ssh'. This remote system doesn't have the ia32-libs package installed, and I don't have root access. So I unpacked the 32-bit libraries myself from the various packages, to a convient directory. I then successfully ran a 32-bit program with this:

$ /path/to/ld-linux.so.2 --library-path /path/to/32-bit-libs ./32-bit-exe

However, the command is actually invoked by the ant build system - at which point even LD_LIBRARY_PATH seems to be ignored. And I get a file not found error.

I would like to preserve the 32-bit ld path. I'm running the 64-bit apache-ant.
 
Old 11-20-2013, 01:27 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
The usual solution to that type of problem is mv your 32-bit-exe to a different name and create a shell script in the place and name that the 32-bit-exe used to have. That shell script would be something like

#!/bin/sh
/path/to/ld-linux.so.2 --library-path /path/to/32-bit-libs 32-bit-exe-new-name $*

Last edited by johnsfine; 11-20-2013 at 01:29 PM.
 
1 members found this post helpful.
Old 11-21-2013, 10:19 AM   #3
_madman_
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Excellent idea. It worked. I had to use the absolute pathnames (without symlinks).
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Long question - installing the 32-bit compat-libstdc++ libraries on 64-bit RHEL kc0olm Linux - Software 4 10-21-2013 10:14 AM
Can't find 32 bit libs to run 32 bit prog on 64 bit CentOS homer_3 Linux - Distributions 2 09-30-2013 08:45 PM
automake, makefile.am, binary directory, both 32 bit and 64 bit executables? MrUmunhum Linux - Kernel 0 12-26-2011 04:47 PM
Wine 32 bit on Slackware 13 64 bit problems: configure can't find some libraries ozanbaba Slackware 28 11-26-2010 02:42 PM
how to find and install 32-bit X11 libraries on 64-bit ubuntu 10.04 maxreason Ubuntu 1 08-27-2010 08:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration