gnulib vs libgnu

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

gnulib vs libgnu

apjanke-floss
Hi, Octave maintainers,

Could someone tell me about the relationship between the gnulib/ and
libgnu/ directories in the source tree? I'm working on the mkfifo bug
(https://savannah.gnu.org/bugs/index.php?55273) which is gnulib-related,
and I don't see how those two dirs fit together. It looks like libgnu is
a customized or subsetted variant of gnulib?

Cheers,
Andrew

Reply | Threaded
Open this post in threaded view
|

Re: gnulib vs libgnu

Mike Miller-4
On Wed, Dec 26, 2018 at 17:20:50 -0500, Andrew Janke wrote:
> Could someone tell me about the relationship between the gnulib/ and libgnu/
> directories in the source tree? I'm working on the mkfifo bug
> (https://savannah.gnu.org/bugs/index.php?55273) which is gnulib-related, and
> I don't see how those two dirs fit together. It looks like libgnu is a
> customized or subsetted variant of gnulib?

Gnulib is an independent project that acts as a shim to try to make
standard system calls behave consistently between operating systems.
Octave includes gnulib as a sub repository.

Octave is a consumer of gnulib, the list of modules that Octave uses is
in bootstrap.conf. As part of the bootstrap process, certain C source
files are copied from gnulib/lib into libgnu. The name "libgnu" is
entirely Octave's choice, it can be anything.

Then, as part of the configure process on a particular system, certain C
sources are conditionally compiled into the libgnu internal library,
which becomes part of liboctave.

I had asked on bug #55273 whether REPACE_MKFIFO is true or false on
affected systems, no answer yet. If REPLACE_MKFIFO is true on your
system, then Octave is including the gnulib mkfifo.c shim.

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gnulib vs libgnu

apjanke-floss


On 12/26/18 5:45 PM, Mike Miller wrote:

> On Wed, Dec 26, 2018 at 17:20:50 -0500, Andrew Janke wrote:
>> Could someone tell me about the relationship between the gnulib/ and libgnu/
>> directories in the source tree? I'm working on the mkfifo bug
>> (https://savannah.gnu.org/bugs/index.php?55273) which is gnulib-related, and
>> I don't see how those two dirs fit together. It looks like libgnu is a
>> customized or subsetted variant of gnulib?
>
> Gnulib is an independent project that acts as a shim to try to make
> standard system calls behave consistently between operating systems.
> Octave includes gnulib as a sub repository.
>
> Octave is a consumer of gnulib, the list of modules that Octave uses is
> in bootstrap.conf. As part of the bootstrap process, certain C source
> files are copied from gnulib/lib into libgnu. The name "libgnu" is
> entirely Octave's choice, it can be anything.
>
> Then, as part of the configure process on a particular system, certain C
> sources are conditionally compiled into the libgnu internal library,
> which becomes part of liboctave.
>
> I had asked on bug #55273 whether REPACE_MKFIFO is true or false on
> affected systems, no answer yet. If REPLACE_MKFIFO is true on your
> system, then Octave is including the gnulib mkfifo.c shim.
>

Thank you; that's helpful.

REPLACE_FIFO seems to be true on my system.

libgnu/Makefile:2005:REPLACE_MKFIFO = 1

I will post on the bug with details.

Cheers,
Andrew

Reply | Threaded
Open this post in threaded view
|

Re: gnulib vs libgnu

Carlo de Falco-2
In reply to this post by Mike Miller-4


> On 26 Dec 2018, at 23:45, Mike Miller <[hidden email]> wrote:
>
> I had asked on bug #55273 whether REPACE_MKFIFO is true or false on
> affected systems, no answer yet. If REPLACE_MKFIFO is true on your
> system, then Octave is including the gnulib mkfifo.c shim.

Hi,

Sorry for the late reply.

REPACE_MKFIFO is indeed true for me.

Here's all variables set by configure that seem to be related to mkfifo in config.log:

GNULIB_MKFIFO='1'
GNULIB_MKFIFOAT='0'
HAVE_MKFIFO='1'
HAVE_MKFIFOAT='1'
REPLACE_MKFIFO='1'

and in config.h :

config.h:#define GNULIB_TEST_MKFIFO 1
config.h:#define MKFIFO_TRAILING_SLASH_BUG 1

Now that others are looking at this I wonder if they get the same.

c.



Reply | Threaded
Open this post in threaded view
|

Re: gnulib vs libgnu

bpabbott
Administrator


On Dec 27, 2018, at 10:28 AM, Carlo De Falco <[hidden email]> wrote:



On 26 Dec 2018, at 23:45, Mike Miller <[hidden email]> wrote:

I had asked on bug #55273 whether REPACE_MKFIFO is true or false on
affected systems, no answer yet. If REPLACE_MKFIFO is true on your
system, then Octave is including the gnulib mkfifo.c shim.

Hi,

Sorry for the late reply.

REPACE_MKFIFO is indeed true for me.

Here's all variables set by configure that seem to be related to mkfifo in config.log:

GNULIB_MKFIFO='1'
GNULIB_MKFIFOAT='0'
HAVE_MKFIFO='1'
HAVE_MKFIFOAT='1'
REPLACE_MKFIFO='1'

and in config.h :

config.h:#define GNULIB_TEST_MKFIFO 1
config.h:#define MKFIFO_TRAILING_SLASH_BUG 1

Now that others are looking at this I wonder if they get the same.

c.

Carlo,

I get the same as you with both the current default branch and with 4.2.1.

83699:GNULIB_MKFIFO='1'
83700:GNULIB_MKFIFOAT='0'
84084:HAVE_MKFIFO='1'
84085:HAVE_MKFIFOAT='1'
84680:REPLACE_MKFIFO=‘1'

85277:#define MKFIFO_TRAILING_SLASH_BUG 1
85278:#define GNULIB_TEST_MKFIFO 1

Ben