bug-texinfo
[Top][All Lists]
Advanced

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

Re: info '(latex2e)\indent & \noindent' doesn't work with Msys2


From: Gavin Smith
Subject: Re: info '(latex2e)\indent & \noindent' doesn't work with Msys2
Date: Mon, 3 Apr 2023 13:14:12 +0100

On Mon, Apr 03, 2023 at 11:32:14AM +0200, Arash Esbati wrote:
> Gavin Smith <gavinsmith0123@gmail.com> writes:
> 
> > That definition was removed by mistake.  Please try "git pull --rebase"
> > on the master branch and try again.  You could also try building after
> > doing "git switch release/7.0" to build on the release branch to get
> > something that is closer to the released versions.
> 
> Thanks, I did "git pull" and the issue went away.  Now I get
> 
> --8<---------------cut here---------------start------------->8---
> install-info.c: In function 'output_dirfile':
> install-info.c:936:7: warning: implicit declaration of function 'fchmod'; did 
> you mean 'chmod'? [-Wimplicit-function-declaration]
>   936 |   if (fchmod (tempfile, 0666 & ~um) < 0)
>       |       ^~~~~~
>       |       chmod

> Sorry for all the hassle.

If we want to release this and it work on your platform, it's better
to find out about problems sooner rather than later so we can fix them,
so it is good that you've reported this.

The problems here are due to an attempt to replace the dir file
atomically, which was made after the 7.0 release branch.

It appears that fchmod does not exist on your system.  It appears that
chmod can be used instead:

diff --git a/install-info/install-info.c b/install-info/install-info.c
index 0899f8c683..150b7c199c 100644
--- a/install-info/install-info.c
+++ b/install-info/install-info.c
@@ -933,7 +933,7 @@ output_dirfile (char *dirfile, int dir_nlines, struct 
line_data *dir_lines,
   /* Reset the mode that the file is set to.  */
   mode_t um = umask (0022);
   umask (um);
-  if (fchmod (tempfile, 0666 & ~um) < 0)
+  if (chmod (tempname, 0666 & ~um) < 0)
     {
       perror ("chmod");
       remove (tempname);

Could you try this change?

> gcc  -g -O2   -o ginstall-info.exe install-info.o ../gnulib/lib/libgnu.a 
> /mingw64/lib/libintl.dll.a -L/mingw64/lib
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  install-info.o: in function `output_dirfile':
> Z:/texinfo/install-info/install-info.c:936: undefined reference to `fchmod'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  ../gnulib/lib/libgnu.a(libgnu_a-getrandom.o): in function `getrandom':
> Z:/texinfo/gnulib/lib/getrandom.c:128: undefined reference to 
> `BCryptGenRandom'
> collect2.exe: error: ld returned 1 exit status
> --8<---------------cut here---------------end--------------->8---

This may be harder to fix.  This is coming from gnulib code.

I saw a reference to this in the bug-gnulib archives:

https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00052.html

This change does appear to have been made in Gnulib so I don't see
why there is still a problem with getrandom.

I have re-importing from gnulib (last imported in October 2022) - could
you try running "git pull --rebase" and trying again?

If there are still problems, we may have to report it to the gnulib
developers.






reply via email to

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