Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Warning with mcc: ifconfig command not found

158 views
Skip to first unread message

spasmous

unread,
Jun 1, 2008, 1:37:55 PM6/1/08
to
I have a program test.m that displays Hello World. I'm trying to
compile it with mcc but things are not going that well.

>> mcc -m test
Warning: Duplicate directory name: /usr/local/matlab/toolbox/local.
sh: line 1: ifconfig: command not found

I don't know what the duplicate directory warning is about - I removed
it from the path completely and still get the Warning. Also, I don't
know how to tell MATLAB the path to ifconfig. In bash, it's in /sbin/
ifconfig. Despite complaining, it does create a binary executable
'test' but running it gives problems:

free(): invalid pointer 0x808d110!
free(): invalid pointer 0x808d390!
free(): invalid pointer 0x80afbd0!
free(): invalid pointer 0x80afc18!
free(): invalid pointer 0x80afc60!
free(): invalid pointer 0x80b0180!
free(): invalid pointer 0x80b01d0!
Segmentation fault

Are these familiar to anyone? Any ideas? I'm on Linux and in bash.

-------------------------------------------------------------------------------------
MATLAB Version 7.5.0.338 (R2007b)
MATLAB License Number: xxxxxx
Operating System: Linux 2.6.7-2.2smp #1 SMP Mon Jan 31 17:12:24 CST
2005 i686
Java VM Version: Java 1.6.0 with Sun Microsystems Inc. Java
HotSpot(TM) Client VM mixed mode, sharing
-------------------------------------------------------------------------------------

Walter Roberson

unread,
Jun 1, 2008, 1:58:11 PM6/1/08
to
In article <8bf46f87-f442-4792...@j33g2000pri.googlegroups.com>,

spasmous <spas...@gmail.com> wrote:
>I have a program test.m that displays Hello World. I'm trying to
>compile it with mcc but things are not going that well.

>>> mcc -m test
>Warning: Duplicate directory name: /usr/local/matlab/toolbox/local.
>sh: line 1: ifconfig: command not found

I can't think of any reason why mcc should want to ifconfig -- not
unless it is trying to do something like read off the MAC of your
interface as part of constructing an encryption key, and that seems
a bit unlikely (though not impossible.)

But calling your routine "test" is an invitation for problems.
"test" is a shell built-in command, and you are likely to end up
invoking the wrong program if you call it "test".
--
"I will speculate that [...] applications [...] could actually see a
performance boost for most users by going dual-core [...] because it
is running the adware and spyware that [...] are otherwise slowing
down the single CPU that user has today" -- Herb Sutter

spasmous

unread,
Jun 1, 2008, 2:03:01 PM6/1/08
to
On Jun 1, 10:58 am, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
wrote:
> In article <8bf46f87-f442-4792-b96b-907f13998...@j33g2000pri.googlegroups.com>,

>
> spasmous  <spasm...@gmail.com> wrote:
> >I have a program test.m that displays Hello World. I'm trying to
> >compile it with mcc but things are not going that well.
> >>> mcc -m test
> >Warning: Duplicate directory name: /usr/local/matlab/toolbox/local.
> >sh: line 1: ifconfig: command not found
>
> I can't think of any reason why mcc should want to ifconfig -- not
> unless it is trying to do something like read off the MAC of your
> interface as part of constructing an encryption key, and that seems
> a bit unlikely (though not impossible.)
>
> But calling your routine "test" is an invitation for problems.
> "test" is a shell built-in command, and you are likely to end up
> invoking the wrong program if you call it "test".
> --

Name duly changed to hello. Same problem.

Alison Marsden

unread,
Sep 30, 2008, 2:57:01 PM9/30/08
to
spasmous <spas...@gmail.com> wrote in message <d10db9dc-6229-4b56...@u36g2000prf.googlegroups.com>...
> On Jun 1, 10:58=A0am, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
> wrote:
> > In article <8bf46f87-f442-4792-b96b-907f13998...@j33g2000pri.googlegroups.=
> com>,

> >
> > spasmous =A0<spasm...@gmail.com> wrote:
> > >I have a program test.m that displays Hello World. I'm trying to
> > >compile it with mcc but things are not going that well.
> > >>> mcc -m test
> > >Warning: Duplicate directory name: /usr/local/matlab/toolbox/local.
> > >sh: line 1: ifconfig: command not found
> >
> > I can't think of any reason why mcc should want to ifconfig -- not
> > unless it is trying to do something like read off the MAC of your
> > interface as part of constructing an encryption key, and that seems
> > a bit unlikely (though not impossible.)
> >
> > But calling your routine "test" is an invitation for problems.
> > "test" is a shell built-in command, and you are likely to end up
> > invoking the wrong program if you call it "test".
> > --
>
> Name duly changed to hello. Same problem.
>


I am having the exact same problem. Did you ever find a solution?

spasmous

unread,
Oct 3, 2008, 3:13:03 PM10/3/08
to
On Sep 30, 11:57 am, "Alison Marsden" <amars...@ucsd.edu> wrote:
> spasmous<spasm...@gmail.com> wrote in message <d10db9dc-6229-4b56-a8a2-5b832f562...@u36g2000prf.googlegroups.com>...

> > On Jun 1, 10:58=A0am, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
> > wrote:
> > > In article <8bf46f87-f442-4792-b96b-907f13998...@j33g2000pri.googlegroups.=
> > com>,
>
> > >spasmous=A0<spasm...@gmail.com> wrote:
> > > >I have a program test.m that displays Hello World. I'm trying to
> > > >compile it with mcc but things are not going that well.
> > > >>> mcc -m test
> > > >Warning: Duplicate directory name: /usr/local/matlab/toolbox/local.
> > > >sh: line 1: ifconfig: command not found
>
> > > I can't think of any reason why mcc should want to ifconfig -- not
> > > unless it is trying to do something like read off the MAC of your
> > > interface as part of constructing an encryption key, and that seems
> > > a bit unlikely (though not impossible.)
>
> > > But calling your routine "test" is an invitation for problems.
> > > "test" is a shell built-in command, and you are likely to end up
> > > invoking the wrong program if you call it "test".
> > > --
>
> > Name duly changed to hello. Same problem.
>
> I am having the exact same problem.  Did you ever find a solution?

The problem was due to linux linking to a different default library.
The solution is to edit the file mbuildopts.sh which is located in
~/.matlab and change line ~49 to read:

CLIBS="$RPATH $MLIBS -lm $TMW_ROOT/sys/os/$Arch/libstdc++.so.6""

This is taken from the excellent instructions here:
http://www.gravity.psu.edu/~s4/software/MATLAB-R2006a/Compiling_MATLAB_Release_2006a.html

0 new messages