bug-gnulib
[Top][All Lists]
Advanced

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

Re: test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'


From: Jim Meyering
Subject: Re: test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'
Date: Sun, 21 Mar 2010 14:54:38 +0100

Bruno Haible wrote:
> Jim Meyering wrote:
>> I produced the preprocessed output using this trick:
>>
>>     make -C gnulib-tests AM_CXXFLAGS='-dD -E' test-fcntl-h-c++.o
>
> You teach me about the -dD option. Nice!
>
>> #define _GL_FCNTL_H
>> # 59 "../lib/fcntl.h" 3
>> #define GL_LINK_WARNING(message) GL_LINK_WARNING1 (__FILE__, __LINE__, 
>> message)
>>
>> #define GL_LINK_WARNING1(file,line,message) GL_LINK_WARNING2 (file, line, 
>> message)
>>
>> #define GL_LINK_WARNING2(file,line,message) GL_LINK_WARNING3 (file ":" #line 
>> ": warning: " message)
>>
>> #define GL_LINK_WARNING3(message) ({ static const char warning[sizeof 
>> (message)] __attribute__ ((__unused__, __section__ (".gnu.warning"), 
>> __aligned__ (1))) = message "\n"; (void)0; })

Thanks for the analysis.

> Your copy of gnulib-tests/fcntl.h is more than two months old. It contains

Actually, the one in gnulib-tests/fcntl.h is brand new.
It's the one in ../lib/fcntl.h that is the culprit.
And *it* was not removed via "make distclean"
since grep proper does not use the fcntl module.
There was also a lib/fcntl.in.h symlink.

> traces of GL_LINK_WARNING, which we are not using any more since 2010-01-20.
> At the same time, you are using a test-fcntl-h-c++.cc from a couple of days
> ago.
>
> I would recommend to do
>   1. "make distclean"

I'd done this numerous times before reporting.

>   2. verify that gnulib-tests/fcntl.h is gone
>   3. "./configure"
>
> Did you by bad chance run './bootstrap' without a prior "make distclean"?
> Or were the timestamps disturbed by git?

I had also removed my gnulib directory altogether,
in case something about it was causing the trouble.

The solution was simply to remove the vestigial lib/fcntl.{,in.}h

Since grep does use fcntl.h (system.h includes it), so it might
as well also use the module, and adding fcntl to the list of modules
in bootstrap.conf (which I'm about to do) would have solved my problem, too.




reply via email to

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