LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 05-22-2010, 10:05 AM   #1
tesseract4d
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Rep: Reputation: 0
MatLab & glnx86


I recently installed Matlab R2009b(64 bit) on my machine (AMD Athlon, 64 bit), and its working fine.
I've been trying to run a few m-files which I downloaded (from here: http://people.csail.mit.edu/fergus/i.../bagwords.html) for a project of mine.
A part of the code is as follows

% Call the binary executable
fpath = fileparts(which(mfilename));
if strncmp(computer,'PC',2) % MS Windows
exec_str = ['"' fpath '/xcv_segment.exe"'];
elseif strcmp(computer,'GLNX86') % Linux
exec_str = [fpath '/xcv_segment'];

else error('This function can run only with MS Windows or Linux');
end

%orig_dir = cd;
%cd(fileparts(which(mfilename)));
result = unix([exec_str ' -i ' inname ' -f ' outname ' -' action ' ' opt]);
%cd(orig_dir);
if result ~= 0
error('Calling the binary failed.');
end
try delete(inname); end


The issue is that as you can see, the code checks if it is a Windows or Linux platform, and it checks the latter by comparing with the string 'GLNX86'. When the code runs the error "This function can run only with MS Windows or Linux" is output as specified in the code.
A little bit of googling revealed that GLNX86 is a library that has something to do with the 32 bit architecture of MATLAB.

So I tried installing the 32 bit version using the command,
./install -glnx86
and I get the error message:
./install: line 736: /lib/libc.so.6: No such file or directory
(I also tried it without the GUI using -t but to no avail)

I've been trying to look for a way install the glnx86 library to see if that would address the problem but with no success.

I am just looking for a way to get this code run. (i tried commenting that part where it checks for the platform, but then the next error "Calling the binary failed." is output. So I am guessing that tweaking the code will not help much.)

Any help to work around this?

Last edited by tesseract4d; 05-22-2010 at 10:06 AM. Reason: typo
 
Old 05-23-2010, 02:14 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
./install: line 736: /lib/libc.so.6: No such file or directory

... looks like you are missing a library.

Why not just edit the m-file to comment out the test then add in the execute part:
Code:
% Call the binary executable
fpath = fileparts(which(mfilename));
%if strncmp(computer,'PC',2) % MS Windows
%exec_str = ['"' fpath '/xcv_segment.exe"'];
%elseif strcmp(computer,'GLNX86') % Linux
exec_str = [fpath '/xcv_segment'];

%else error('This function can run only with MS Windows or Linux');
%end

%orig_dir = cd;
%cd(fileparts(which(mfilename)));
result = unix([exec_str ' -i ' inname ' -f ' outname ' -' action ' ' opt]);
%cd(orig_dir);
if result ~= 0
error('Calling the binary failed.');
end
try delete(inname); end
 
Old 07-26-2010, 07:29 AM   #3
AdmiralJonB
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Rep: Reputation: 0
Did you ever solve this problem? I have the exact same problem. When I do comment out those lines, i just get a problem with the xcv_segment executable with this error:

Code:
error while loading shared libraries: libtiff.so.3: wrong ELF class: ELFCLASS64
I presume this is some 32/64-bit compatibility problem. Does anyone have any ideas?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Matlab Distributed Computing Server: Connecting to Matlab client fails OEP Linux - Server 0 12-21-2009 02:18 PM
Fedora Core5 &maple 8.0&matlab 6.1 gownirani LinuxQuestions.org Member Intro 1 09-09-2006 03:40 PM
Matlab & Mathematica for Linux? Lead Expression Linux - Software 5 09-25-2005 06:33 PM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
Terminal cmd for starting Matlab M-file editor without starting matlab fubzot Linux - Software 2 02-15-2005 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:13 AM.

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