[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "rpl_fprintf" not found if compiled with options "-ggdb -Og"
From: |
Bjarni Ingi Gislason |
Subject: |
Re: "rpl_fprintf" not found if compiled with options "-ggdb -Og" |
Date: |
Sun, 1 Aug 2021 01:33:00 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Sat, Jul 31, 2021 at 01:31:55AM -0700, Paul Eggert wrote:
> On 7/30/21 6:43 PM, Bjarni Ingi Gislason wrote:
> > Actually I am using the current repository of both "groff" and
> > "gnulib".
>
> I can't reproduce the problem that way, either. I'm using Ubuntu 21.04. I
> clone Savannah's latest groff (7ae6d67b7c310c54bb7176c761b1f9719e64201a),
> run this:
>
> ./bootstrap --gnulib-srcdir=$HOME/src/gnu/gnulib-savannah
> ./configure
> make CFLAGS='-ggdb -Og'
>
> and it builds (there are quite a few warnings, which should get fixed, but
> nothing fatal to the build). $HOME/src/gnu/gnulib-savannah contains a copy
> of Savannah's latest Gnulib (commit
> 804ac808a9b17d7ee7cf49f7c713c4a4e4d6423f).
>
> The symptoms you're reporting are that of a partial build that isn't being
> resumed correctly somehow.
>
> By the way, I've not had much luck with -Og. I have better luck with -O0
> when debugging. But then, I mostly debug C code, not C++.
Thanks for testing.
I compile in the directory "groff/build".
I have two branches, my own and master.
The error is in my branch.
It is caused by having simultaneously
CFLAGS='-O...'
and
CPPFLAGS=-D_FORTIFY_SOURCE=2
Changing the value from 2 to 0 or 1, eliminates the error.
My version of glibc is 2.31-13 (Debian, testing).
As Debian uses both '-O2' and "-D_FORTIFY_SOURCE=2" for its
compilation,
a fix seems to be necessary.
###
In the master branch I get, with the default output from "configure",
this
CC src/devices/xditview/gxditview-page.o
In file included from /usr/include/X11/Xos.h:89,
from ../src/devices/xditview/page.c:7:
./lib/unistd.h:663:3: error: #error "Please include config.h first."
663 | #error "Please include config.h first."
| ^~~~~
./lib/unistd.h:665:24: error: expected ';' before 'extern'
665 | _GL_INLINE_HEADER_BEGIN
| ^
| ;
./lib/unistd.h:2815:22: error: expected ';' before 'struct'
2815 | _GL_INLINE_HEADER_END
| ^
| ;
make[1]: *** [Makefile:7219: src/devices/xditview/gxditview-page.o]
Error 1
make[1]: Leaving directory '/home/bg/git/groff/build'
In my branch I have added the missing '#include "config.h"' in
../src/devices/xditview/page.c
and other missing "config.h" lines in other source files.
--
Bjarni I. Gislason