[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: safer way to use gnulib
From: |
John W. Eaton |
Subject: |
Re: safer way to use gnulib |
Date: |
Tue, 16 Mar 2010 12:32:59 -0400 |
On 16-Mar-2010, Ben Abbott wrote:
| 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).
Is your copy of gnulib up to date? When was the last time you ran git
pull in the gnulib directory?
Yes, there are two places where the _gl_warn_on_use extern declaration
appears. One looks to me like it is only intended for C code, so I
left it alone. But I guess it wouldn't hurt to use _GL_EXTERN_C
instead of extern in both places since _GL_EXTERN_C expands to extern
in C code and extern "C" in C++ code.
| 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'l ./build-aux/warn-on-use.h
| (4) ./configure ....
| (5) make
|
| Is this the correct thing to do? My make now fails with ...
Try
hg pull; hg update -C
cd gnulib
git pull
## patch the gnulib/build-aux/warn-on-use.h file
cd ..
./autogen.sh
./configure ...
make
| 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
This looks like a separate problem. From the preprocessed source you
sent separately, it looks like the following lines in sighandlers.cc
gnulib::sigemptyset (&act.sa_mask);
gnulib::sigemptyset (&oact.sa_mask);
are being transformed to
gnulib::(*(&act.sa_mask) = 0, 0);
gnulib::(*(&oact.sa_mask) = 0, 0);
So apparently, sigemptyset is a macro on your system. As a quick
workaround, what happens if you add
#undef sigemptyset
just before these lines in sighandlers.cc? Does that avoid the
problem for you?
jwe
Re: safer way to use gnulib, Jaroslav Hajek, 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
Re: safer way to use gnulib, Ben Abbott, 2010/03/16
Re: safer way to use gnulib, Ben Abbott, 2010/03/16