Update ocatve to the latest version

Michael Dickens michaelld at macports.org
Fri Sep 21 13:00:07 PDT 2012

On Aug 31, 2012, at 5:54 PM, Peng Yu <pengyu.ut at gmail.com> wrote:
> I get the following warning. Is there a compile option should be enabled for octave?
> ~$ /opt/local/bin/octave -q
> warning: no graphical display found

So I think I fixed this issue today.

The story is that octave-devel's "configure" script was checking for
"-framework Carbon" by trying to link "#include <Carbon/Carbon.h>" and
was failing.  Thus (in "src/display.cc") no valid display was being
found at launch time and hence that warning.  I don't remember this
warning as coming up until after the latest GCC changes, but I might be

So, diving deeper, it looks like the new MacPorts GCC (e.g., gcc47)
isn't auto-detecting the correct language of the file being compiled. 
The filename for the test is "conftest.cpp", which indicates C++.  But,
some of the headers use obj-c++.  The older MacPorts GCC figured this
out, as does Apple's compiler (g++, llvm-g++, and clang++).  I have no
idea why the new MacPorts GCC would have this issue.

Anyway, I fixed the problem by using an Apple compiler (/usr/bin/g++)
just for this specific configuration test and specific file; all the
other files are compiled using the selected MacPorts GCC.  I checked in
this change today, and it seems like a good, robust solution to the

That said, I hope there are octave users out there who will "sudo port
selfupdate" and the upgrade octave-devel and see if the change works for
them.  I think it will, but it'll be good to have feedback to that
effect. - MLD

More information about the macports-users mailing list