octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build failure on OSX 10.9


From: Ben Abbott
Subject: Re: build failure on OSX 10.9
Date: Sat, 16 Nov 2013 08:35:51 -0500

On Nov 15, 2013, at 10:02 PM, John W. Eaton wrote:

> On 11/15/2013 06:51 PM, Ben Abbott wrote:
>> 
>> On Nov 15, 2013, at 3:47 PM, John W. Eaton wrote:
>> 
>>> On 11/15/2013 08:59 AM, Ben Abbott wrote:
>>>> On Nov 15, 2013, at 8:40 AM, c. wrote:
>>>> 
>>>>> On 15 Nov 2013, at 14:10, Ben Abbott <address@hidden> wrote:
>>>>> 
>>>>>> Ok. I'm still using 2.4, which does not have the qscilexeroctave.h file.
>>>>>> 
>>>>>> Did I understand correctly that you're able to build by *only* removing 
>>>>>> the "external C++" declaration? ... i.e. no change to 
>>>>>> libgui/src/module.mk?
>>>>> 
>>>>> yes. either of the two changes will work for me, I don't need both.
>>>> 
>>>> Ok.  Any idea why both libgnu/stdio.h and /usr/include/stdio.h are being 
>>>> included?
>>> 
>>> Because that's the way gnulib works.  libgnu/stdio.h first does an
>>> '#include_next <stdio.h>' and then adds its own declarations on top of
>>> the ones that the system provides.
>> 
>> The line in libgnu/stdio.h that triggers the error is the one beginning with 
>> _GL_WARN_ON_USE
>> 
>> ------begin-------
>> /* It is very rare that the developer ever has full control of stdin,
>>    so any use of gets warrants an unconditional warning; besides, C11
>>    removed it.  */
>> #undef gets
>> #if HAVE_RAW_DECL_GETS
>> //_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
>> #endif
>> -------end--------
>> 
>> With that commented out, I'm able to build.
>> 
>> I assume this conflict indicates a bug in gnulib?
> 
> I think it's a bug in the header file that includes stdio.h inside an extern 
> "C++" block.
> 
> What happens if you undo your local changes and apply the attached patch?  
> Does that also avoid the problem?
> 
> jwe

Using Qscintilla 2.4.6 on MacOS 10.7.5 I still see the error.

/bin/sh ../libtool  --tag=CXX   --mode=compile /opt/local/bin/g++-mp-4.7 
-DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -I/opt/local/include/QtGui 
-I/opt/local/include -I/opt/local/include/QtNetwork -I/opt/local/include 
-I/opt/local/include/QtCore -I./qterminal/libqterminal -Isrc -I./src 
-I./src/m-editor -I./src/qtinfo -I../liboctave/cruft/misc -I../liboctave/array 
-I../liboctave/numeric -I../liboctave/numeric -I../liboctave/operators 
-I../liboctave/operators -I../liboctave/system -I../liboctave/util 
-I../libinterp -I../libinterp -I../libinterp/parse-tree 
-I../libinterp/parse-tree -I../libinterp/corefcn -I../libinterp/corefcn 
-I../libinterp/octave-value -I../libgnu -D_THREAD_SAFE -I/opt/local/include  
-Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings 
-Wcast-align -Wcast-qual -pipe -O2 -m64 -D_THREAD_SAFE -pthread -MT 
src/src_libgui_src_la-main-window.lo -MD -MP -MF 
src/.deps/src_libgui_src_la-main-window.Tpo -c -o 
src/src_libgui_src_la-main-window.lo `test -f 'src/main-window.cc' || echo 
'./'`src/main-window.cc
libtool: compile:  /opt/local/bin/g++-mp-4.7 -DHAVE_CONFIG_H -I. -I.. 
-I/opt/local/include -I/opt/local/include/QtGui -I/opt/local/include 
-I/opt/local/include/QtNetwork -I/opt/local/include -I/opt/local/include/QtCore 
-I./qterminal/libqterminal -Isrc -I./src -I./src/m-editor -I./src/qtinfo 
-I../liboctave/cruft/misc -I../liboctave/array -I../liboctave/numeric 
-I../liboctave/numeric -I../liboctave/operators -I../liboctave/operators 
-I../liboctave/system -I../liboctave/util -I../libinterp -I../libinterp 
-I../libinterp/parse-tree -I../libinterp/parse-tree -I../libinterp/corefcn 
-I../libinterp/corefcn -I../libinterp/octave-value -I../libgnu -D_THREAD_SAFE 
-I/opt/local/include -Wall -W -Wshadow -Wold-style-cast -Wformat 
-Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -pipe -O2 -m64 
-D_THREAD_SAFE -pthread -MT src/src_libgui_src_la-main-window.lo -MD -MP -MF 
src/.deps/src_libgui_src_la-main-window.Tpo -c src/main-window.cc  -fno-common 
-DPIC -o src/.libs/src_libgui_src_la-main-window.o
In file included from ../libgnu/stdio.h:43:0,
                 from ../libgnu/wchar.h:71,
                 from /opt/local/include/gcc47/c++/cwchar:46,
                 from /opt/local/include/gcc47/c++/bits/postypes.h:42,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:42,
                 from /opt/local/include/gcc47/c++/string:42,
                 from /opt/local/include/QtCore/qstring.h:54,
                 from /opt/local/include/QtCore/qobject.h:48,
                 from /opt/local/include/QtCore/qiodevice.h:46,
                 from /opt/local/include/QtCore/qdatastream.h:46,
                 from /opt/local/include/QtCore/qstringlist.h:46,
                 from /opt/local/include/QtGui/qcolor.h:47,
                 from /opt/local/include/Qsci/qscilexer.h:38,
                 from src/m-editor/octave-qscintilla.cc:31:
/usr/include/stdio.h:265:7: error: previous declaration of 'char* gets(char*)' 
with 'C' linkage
In file included from ../libgnu/wchar.h:71:0,
                 from /opt/local/include/gcc47/c++/cwchar:46,
                 from /opt/local/include/gcc47/c++/bits/postypes.h:42,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:42,
                 from /opt/local/include/gcc47/c++/string:42,
                 from /opt/local/include/QtCore/qstring.h:54,
                 from /opt/local/include/QtCore/qobject.h:48,
                 from /opt/local/include/QtCore/qiodevice.h:46,
                 from /opt/local/include/QtCore/qdatastream.h:46,
                 from /opt/local/include/QtCore/qstringlist.h:46,
                 from /opt/local/include/QtGui/qcolor.h:47,
                 from /opt/local/include/Qsci/qscilexer.h:38,
                 from src/m-editor/octave-qscintilla.cc:31:
../libgnu/stdio.h:1034:1: error: conflicts with new declaration with 'C++' 
linkage

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]