[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave 4.0 on Mac 10.10
From: |
Eugenio Gianniti |
Subject: |
Re: Octave 4.0 on Mac 10.10 |
Date: |
Tue, 3 Mar 2015 22:56:50 +0000 |
> On 03 Mar 2015, at 23:32, Marius Schamschula <address@hidden> wrote:
>
> On Mar 1, 2015, at 10:44 PM, Carlo De Falco <address@hidden> wrote:
>
>>
>> On 28 Feb 2015, at 16:54, Ben Abbott <address@hidden> wrote:
>>
>>> Opps. I had been using gcc on Mavericks. I expect I switched to clang when
>>> I upgraded to Yosemite (which never worked for me).
>>>
>>> I think Carlo is still able to build the default tip on Mavericks and using
>>> Macports. Perhaps he can confirm the comment on how he configure's Octave.
>>
>> Yes, I am using macports but I have to patch a few portfiles to make it work.
>> In particular I have to fix the Qscintilla version at 2.7.2.
>> Most other changes are to make sure that packages that do not have
>> a gcc49 variant are built with gcc rather than clang.
>> It has been my intention for a long while to document all those changes
>> in detail, but I never got time to do it.
>>
>> Once the dependencies are in place I configure with:
>>
>> ../octave/configure \
>> CC=gcc \
>> CFLAGS="-pipe -O2 -m64" \
>> CPPFLAGS="-D_THREAD_SAFE -I/opt/local/include" \
>> LDFLAGS="-L/opt/local/lib -m64 " \
>> CXX=g++ \
>> CXXFLAGS="-pipe -O2 -m64" \
>> F77=gfortran \
>> FFLAGS="-pipe -O2 -m64" \
>> LLVM_CONFIG=/opt/local/bin/llvm-config-mp-3.4 \
>> --with-lapack="-llapack -latlas -lgfortran" \
>> --with-blas="-lcblas -lf77blas -latlas -lgfortran" \
>> --prefix=/opt/octave/4.1 \
>> --enable-gui \
>> --disable-jit \
>> --disable-java \
>> --with-framework-carbon \
>> --with-arpack \
>> --enable-docs \
>> --with-opengl \
>> --without-x \
>> --enable-link-all-dependencies
>>
>> I don't even remeber the reason for some of the flags,
>> I guess many were inherited from Ben's examples.
>>
>>> Ben
>> c.
>
> Last night I did a bit more test compiling. I ran into the well known issue
> with osmesa, so I disabled it. Apparently the MacPorts install of mesa
> +osmesa does not install a consistent set of header files.
>
> Now I’m dealing with the following issue:
>
> Making all in libgui
> /Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
> CXX src/m-editor/src_libgui_src_la-file-editor-tab.lo
> In file included from ../libgnu/stdio.h:43:0,
> from ../libgnu/wchar.h:71,
> from /opt/local/include/gcc48/c++/cwchar:44,
> from /opt/local/include/gcc48/c++/bits/postypes.h:40,
> from /opt/local/include/gcc48/c++/bits/char_traits.h:40,
> from /opt/local/include/gcc48/c++/string:40,
> from /opt/local/include/QtCore/qstring.h:54,
> from /opt/local/include/QtCore/qobject.h:48,
> from /opt/local/include/Qsci/qscilexeroctave.h:33,
> from src/m-editor/file-editor-tab.cc:32:
> /usr/include/stdio.h:255:7: error: previous declaration of 'char*
> gets(char*)' with 'C' linkage
> char *gets(char *);
> ^
> In file included from /opt/local/include/gcc48/c++/cstdlib:72:0,
> from /opt/local/include/gcc48/c++/bits/stl_algo.h:59,
> from /opt/local/include/gcc48/c++/algorithm:62,
> from /opt/local/include/QtCore/qglobal.h:68,
> from /opt/local/include/QtCore/qnamespace.h:45,
> from /opt/local/include/QtCore/qobjectdefs.h:45,
> from /opt/local/include/QtCore/qobject.h:47,
> from /opt/local/include/Qsci/qscilexeroctave.h:33,
> from src/m-editor/file-editor-tab.cc:32:
> ../libgnu/stdio.h:1039:1: error: conflicts with new declaration with 'C++'
> linkage
> _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
> ^
> make[3]: *** [src/m-editor/src_libgui_src_la-file-editor-tab.lo] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
When I incurred in the same problem I solved the issue with the attached patch,
in my case using Homebrew.
In my understanding the headers are too zealously wrapped in extern “C++”
blocks,
hence basic C headers contents are included as both C and C++ functions.
Probably moving the opening lines after all the includes could be enough, but I
adopted
the straightforward approach of just deleting them.
HTH,
Eugenio
qscintilla2_Qt4Qt5__APPLE__patch.diff
Description: qscintilla2_Qt4Qt5__APPLE__patch.diff
ATT00001.txt
Description: ATT00001.txt