LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 08-10-2009, 02:00 AM   #1
billzhao
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0
"invalid mex-file..." please help!


Dear all,

I am new in linux environment.

I have installed matlab R14 in Ubuntu 9.0.4. And I understand that R14 was compiled in gcc 3.2.3 and the gcc version installed in Ubuntu 9.0.4 is gcc 4.3.3.

I compiled a few c files in matlab using "mex" and obtained a list of mexglx files. But when I try to use the methods, the below error occurred:

"??? Invalid MEX-file '/media/Data/Projects/sift/siftmatch.mexglx': /media/WinXP/matlab_unix/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)."

Could anybody suggests how to solve the problem? I find it quite troublesome to re-install another gcc version in my system. And can the problem be solved by using LD_LIBRARY_PATH parameter?

Thank you very much!!
 
Old 08-10-2009, 08:47 AM   #2
billzhao
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Cool Hi Linux gurus, please do help me on this! Thanks a LOT!

Hi Linux gurus, please do help me on this! Thanks a LOT!

Quote:
Originally Posted by billzhao View Post
Dear all,

I am new in linux environment.

I have installed matlab R14 in Ubuntu 9.0.4. And I understand that R14 was compiled in gcc 3.2.3 and the gcc version installed in Ubuntu 9.0.4 is gcc 4.3.3.

I compiled a few c files in matlab using "mex" and obtained a list of mexglx files. But when I try to use the methods, the below error occurred:

"??? Invalid MEX-file '/media/Data/Projects/sift/siftmatch.mexglx': /media/WinXP/matlab_unix/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)."

Could anybody suggests how to solve the problem? I find it quite troublesome to re-install another gcc version in my system. And can the problem be solved by using LD_LIBRARY_PATH parameter?

Thank you very much!!
 
Old 08-10-2009, 09:05 AM   #3
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,978

Rep: Reputation: Disabled
I really can't help you never having used matlab but isn't the compiler looking for gcc 4.2.0? It doesn't seem interested in version 3.2.3.
jdk
 
Old 08-10-2009, 09:08 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
Welcome to LQ.

sudo apt-get install gcc-4.2 gcc-3.4 g++-4.2

... will get you some. The colllection is limited on 9.04,
if you need more compilers, please try out 8.04 packages.
Example link : http://packages.ubuntu.com/hardy-updates/g++-3.3

And no problem having e.g. four different compilers :
Example :
./configure CC=gcc-4.2 CXX=g++-4.2
and / or : make CC=gcc-3.4 CXX=g++-3.4
.....

Last edited by knudfl; 08-10-2009 at 09:09 AM.
 
Old 08-10-2009, 10:28 PM   #5
billzhao
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Smile reply

hey knudfl,

Thanks a lot for your help!

And I would like to clarify: Do you mean that I install another version of gcc? and it seems that the system already has gcc-3.4:

gcc-3.4 is already the newest version.
The following packages were automatically installed and are no longer required:
libtwolame0 libmad0 libmpeg2-4 liba52-0.7.4

Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

sudo apt-get install gcc-4.2 gcc-3.4 g++-4.2

... will get you some. The colllection is limited on 9.04,
if you need more compilers, please try out 8.04 packages.
Example link : http://packages.ubuntu.com/hardy-updates/g++-3.3

And no problem having e.g. four different compilers :
Example :
./configure CC=gcc-4.2 CXX=g++-4.2
and / or : make CC=gcc-3.4 CXX=g++-3.4
.....
 
Old 08-10-2009, 11:23 PM   #6
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,978

Rep: Reputation: Disabled
Quote:
Originally Posted by billzhao View Post
hey knudfl,

Thanks a lot for your help!

And I would like to clarify: Do you mean that I install another version of gcc? and it seems that the system already has gcc-3.4:

gcc-3.4 is already the newest version.
The following packages were automatically installed and are no longer required:
libtwolame0 libmad0 libmpeg2-4 liba52-0.7.4
Yes, you can. Try installing gcc-4.2 as knudfl suggested
Cheers
jdk
 
  


Reply

Tags
gcc


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
make error. mex: compile of ' "mfitsio.c"' failed. mmateen Linux - Software 1 07-31-2009 10:56 PM
Xen Problem while creating guest " Invalid file location given: No such file " mgurnani Linux - Software 0 05-09-2009 04:02 PM
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 05:23 AM
"Invalid File Handle" error on Fat32 Samba deiphage Linux - Networking 1 02-05-2006 02:15 PM
kino gives "invalid file specified" when i try to open an *.mpg file lefty.crupps Linux - Software 1 10-31-2005 04:20 AM


All times are GMT -5. The time now is 03:08 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration