[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: safer way to use gnulib
From: |
Ben Abbott |
Subject: |
Re: safer way to use gnulib |
Date: |
Tue, 16 Mar 2010 12:05:35 -0400 |
On Tuesday, March 16, 2010, at 10:00AM, "John W. Eaton" <address@hidden> wrote:
>On 16-Mar-2010, Ben Abbott wrote:
>
>| Great! ODES.cc does compile. I'll start a build with ./autogen.sh
>| and report back latter.
>
>Thanks. I reported the problem along with the proposed fix to the
>gnulib maintainers.
>
>jwe
>
I've had a couple of false starts building with this change. Do I understand
correctly that after running "autogen.sh" I will need to apply the patch?
Also I noticed for my case "extern int _gl_warn_on_use" occurs in two places,
and at different line numbers than yours (lines 75 and 92 for me).
66 #ifndef _GL_WARN_ON_USE
67
68 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
69 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
70 # define _GL_WARN_ON_USE(function, message) \
71 extern __typeof__ (function) function __attribute__ ((__warning__
(message)))
72
73 # else /* Unsupported. */
74 # define _GL_WARN_ON_USE(function, message) \
75 extern int _gl_warn_on_use
76 # endif
77 #endif
78
79 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes,
"string")
80 is like _GL_WARN_ON_USE (function, "string"), except that the function is
81 declared with the given prototype, consisting of return type, parameters,
82 and attributes.
83 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE
does
84 not work in this case. */
85 #ifndef _GL_WARN_ON_USE_CXX
86 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
87 # define
_GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
88 extern rettype function parameters_and_attributes \
89 __attribute__ ((__warning__ (msg)))
90 # else /* Unsupported. */
91 # define
_GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
92 extern int _gl_warn_on_use
93 # endif
94 #endif
I'm presently building by ...
(1) hg pull; hg update -C
(2) ./autogen.sh
(3) sed -i 's/^extern int _gl_warn_on_use$/_GL_EXTERN_C int _gl_warn_on_use/g'
./build-aux/warn-on-use.h
(4) ./configure ....
(5) make
Is this the correct thing to do? My make now fails with ...
libtool: compile: g++-4.2 -DHAVE_CONFIG_H -I. -I.. -I/sw/lib/flex/include
-I/sw/include -O0 -g -m32 -I/sw/include/freetype2 -I/sw/include/qhull
-I/usr/include -I../libgnu -I../libgnu -I../libcruft/misc -I../liboctave
-I../liboctave -I. -I. -I/sw/lib/flex/include -I/sw/include -O0 -g -m32
-I/sw/include/freetype2 -I/sw/include/qhull -I/usr/include -I/sw/include -O0 -g
-m32 -D_THREAD_SAFE -D_REENTRANT -DHAVE_CONFIG_H -mieee-fp -I/sw/include
-I/sw/include/freetype2 -I/sw/include -I/usr/X11/include -Wall -W -Wshadow
-Wold-style-cast -Wformat -I/sw/include -O0 -g -m32 -D_THREAD_SAFE -D_REENTRANT
-D_THREAD_SAFE -pthread -I/sw/include -O0 -g -m32 -D_THREAD_SAFE -D_REENTRANT
-MT liboctinterp_la-sighandlers.lo -MD -MP -MF
.deps/liboctinterp_la-sighandlers.Tpo -c sighandlers.cc -fno-common -DPIC -o
.libs/liboctinterp_la-sighandlers.o
sighandlers.cc: In function ‘void my_friendly_exit(const char*, int, bool)’:
sighandlers.cc:132: warning: use of old-style cast
sighandlers.cc:158: warning: use of old-style cast
sighandlers.cc: In function ‘void (* octave_set_signal_handler(int, void
(*)(int), bool))(int)’:
sighandlers.cc:198: error: expected unqualified-id before ‘(’ token
sighandlers.cc:199: error: expected unqualified-id before ‘(’ token
sighandlers.cc: In function ‘void sigchld_handler(int)’:
sighandlers.cc:232: error: expected unqualified-id before ‘(’ token
sighandlers.cc:232: error: expected unqualified-id before ‘(’ token
sighandlers.cc:232: error: expected unqualified-id before ‘(’ token
sighandlers.cc: In function ‘octave_interrupt_handler
octave_ignore_interrupts()’:
sighandlers.cc:506: warning: use of old-style cast
sighandlers.cc: In function ‘void install_signal_handlers()’:
sighandlers.cc:646: warning: use of old-style cast
make[3]: *** [liboctinterp_la-sighandlers.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Ben
Re: safer way to use gnulib, Jaroslav Hajek, 2010/03/16
- Re: safer way to use gnulib,
Ben Abbott <=
Re: safer way to use gnulib, Ben Abbott, 2010/03/16
Re: safer way to use gnulib, Ben Abbott, 2010/03/16
Re: safer way to use gnulib, Ben Abbott, 2010/03/16