set-soft / setedit

SET's Editor, a friendly text editor
GNU General Public License v2.0
16 stars 4 forks source link

Configuration not working in MSYS2, check for fileutils fails because it's called "coreutils" now #2

Closed ahribellah closed 1 year ago

ahribellah commented 1 year ago

The check for fileutils fails in MSYS2.

Here's the error:

ari@DESKTOP-1ER5E33 MINGW64 ~/setedit/setedit
$ ./configure
Configuring SETEdit v0.5.8

Determining OS: Win32 [MinGW]
Please install the fileutils package. The name is usually something like it:
filXXXb.zip where XXX is the version.

Here's the relevant code:

sub LookForBasicTools
{
 my $test;
 if (($OS eq 'DOS') || ($OS eq 'Win32'))
   {
    #$test=RunRedirect('rm --version');
    $test=RunRedirect('cp --version');
    if (!($test=~/fileutils/))
      {
       print "Please install the fileutils package. The name is usually something like it:\n";
       print "filXXXb.zip where XXX is the version.\n";
       die "\n";
      }
   }
}

Here's the output of running that command directly:

ari@DESKTOP-1ER5E33 MINGW64 ~/setedit/setedit
$ cp --version
cp (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

It mentions coreutils, not fileutils.

I'm assuming this is just because the Win32 version has been neglected.


Configuration is also saying the xgettext tools aren't installed. However...

ari@DESKTOP-1ER5E33 MINGW64 ~/setedit/setedit
$ xgettext
D:\Applications\msys64\mingw64\bin\xgettext.exe: no input file given
Try 'D:\Applications\msys64\mingw64\bin\xgettext.exe --help' for more information.

ari@DESKTOP-1ER5E33 MINGW64 ~/setedit/setedit
$ gettext
gettext.exe: missing arguments
ahribellah commented 1 year ago

Forgot to mention that the build is failing after making it through configuration.

set-soft commented 1 year ago

Hi @ahribellah !

$ cp --version cp (GNU coreutils) 8.32

Ok, this should be easy to fix and fixed by the above mentioned patch.

Configuration is also saying the xgettext tools aren't installed.

What do you get in the errormsg.txt log file? Also try xgettext --version

ahribellah commented 1 year ago

The result of xgettext --version.

ari@DESKTOP-1ER5E33 MINGW64 ~
$ xgettext --version
xgettext.exe (GNU gettext-tools) 0.21
Copyright (C) 1995-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Ulrich Drepper.

Where is errormsg.txt supposed to be located? I don't have one in the setedit folder.

set-soft commented 1 year ago

The result of xgettext --version.

This is almost the same I get on Debian GNU/Linux.

Where is errormsg.txt supposed to be located? I don't have one in the setedit folder.

This is deleted after successful configuration, edit config.pl line 351 says:

unlink $ErrorLog;

Remove or comment it.

ahribellah commented 1 year ago

Apologies for the late reply.

No errors during configuration now. errormsg.txt just has the following.

$ cat errormsg.txt
sh: line 1: ../tvision/rhtv-config: No such file or directory
make:
test.cc: In function 'int main()':
test.cc:6:14: error: 'bzlibVersion' was not declared in this scope; did you mean 'BZ2_bzlibVersion'?
    6 |  printf("%s",bzlibVersion());
      |              ^~~~~~~~~~~~
      |              BZ2_bzlibVersion
sh: line 1: zip: command not found

However, the build is failing due to the fnctl() interface not being available in MSYS2. It seems like it would need some work to get building again on Windows.

$ make
make -C makes
make[1]: Entering directory '/home/ari/setedit/setedit/makes'
make -f editor.mkf
make[2]: Entering directory '/home/ari/setedit/setedit/makes'
g++  -I../include -I../setedit/include -I../settvuti/include -I../sdg/include -I../infview/include -ID:/Applications/msys64/usr/include/rhtvision -I../extra -I../easydiag -I../librhuti -I../mp3 -I../calcu -I../holidays       -DFOR_EDITOR -O2 -Wno-packed  -c ../setedit/editmain.cc -o obj/editmain.o
../setedit/editmain.cc:147:28: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
  147 | static char *EditorFileExt="setedit.inf";
      |                            ^~~~~~~~~~~~~
../setedit/editmain.cc: In function 'void OpenControlPipe()':
../setedit/editmain.cc:3164:21: error: 'F_GETFL' was not declared in this scope
 3164 |     int old=fcntl(h,F_GETFL,0);
      |                     ^~~~~~~
../setedit/editmain.cc:3164:13: error: 'fcntl' was not declared in this scope
 3164 |     int old=fcntl(h,F_GETFL,0);
      |             ^~~~~
../setedit/editmain.cc:3165:13: error: 'F_SETFL' was not declared in this scope
 3165 |     fcntl(h,F_SETFL,old|O_NONBLOCK);
      |             ^~~~~~~
../setedit/editmain.cc:3165:25: error: 'O_NONBLOCK' was not declared in this scope
 3165 |     fcntl(h,F_SETFL,old|O_NONBLOCK);
      |                         ^~~~~~~~~~
make[2]: *** [editor.umk:383: obj/editmain.o] Error 1
make[2]: Leaving directory '/home/ari/setedit/setedit/makes'
make[1]: *** [Makefile:26: editor] Error 2
make[1]: Leaving directory '/home/ari/setedit/setedit/makes'
make: *** [Makefile:41: editor] Error 2