LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags

Reply
 
Thread Tools
Old 08-10-2009, 02:00 AM   #1
billzhao
LQ Newbie
 
Registered: Aug 2009
Posts: 3
Thanked: 0
"invalid mex-file..." please help!


[Log in to get rid of this advertisement]
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!!
billzhao is offline     Reply With Quote
Old 08-10-2009, 08:47 AM   #2
billzhao
LQ Newbie
 
Registered: Aug 2009
Posts: 3
Thanked: 0

Original Poster
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!!
billzhao is offline     Reply With Quote
Old 08-10-2009, 09:05 AM   #3
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Gorizia
Distribution: Debian Testing
Posts: 1,791
Thanked: 158
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
jdkaye is offline     Reply With Quote
Old 08-10-2009, 09:08 AM   #4
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,905
Thanked: 267
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..
knudfl is offline     Reply With Quote
Old 08-10-2009, 10:28 PM   #5
billzhao
LQ Newbie
 
Registered: Aug 2009
Posts: 3
Thanked: 0

Original Poster
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
.....
billzhao is offline  
Tag This Post
Reply With Quote
Old 08-10-2009, 11:23 PM   #6
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Gorizia
Distribution: Debian Testing
Posts: 1,791
Thanked: 158
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
jdkaye is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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-11-2009 12:44 AM
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-06-2009 01:44 PM
"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 01:58 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration