nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] build issues on Mingw32


From: Benno Schulenberg
Subject: [Nano-devel] build issues on Mingw32
Date: Tue, 26 Dec 2017 12:55:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0


Op 25-12-17 om 15:46 schreef Liu Hao:
It is easy: I just install it somewhere then pass the path of `include` and
`lib` directories to `configure`. Much of this work is done using the script
here:

<https://github.com/lhmouse/nano-win/blob/master/build-nano-win.sh#L28>

I don't see any reference to a regex lib.  But maybe you removed it already?

This turned out to be a duplicate of bug 50705 <https://savannah.gnu.org/bugs/?50705>. On current master it no longer persists.

Good.

However there are other issues about gnulib:

The outputs of the following command have been attached: (I removed GNU regex library headers and libraries from the directories above, but CFLAGS and LDFLAGS had to be kept for ncurses.)

```sh CPPFLAGS="-I\"$(pwd)\"/i686-w64-mingw32/include" LDFLAGS="-L\"$(pwd)\"/i686-w64-mingw32/lib" ./configure 2>std.err | tee std.out ```

This does not make nano build; `make` will end up in undefined references:

```text gcc -g -O2 -Wall -L"/e/GitHub/nano-win"/i686-w64-mingw32/lib -o nano.exe browser.o chars.o color.o cut.o files.o global.o help.o history.o move.o nano.o prompt.o rcfile.o search.o text.o utils.o winio.o ../lib/libgnu.a -pthread -lz -LC:/MinGW/MSYS2/mingw32/lib -lncursesw
text.o: In function `do_formatter': E:\GitHub\nano-win\src/text.c:3448:
undefined reference to `fork' E:\GitHub\nano-win\src/text.c:3470: undefined
reference to `wait' E:\GitHub\nano-win\src/text.c:3472: undefined reference to
`WIFEXITED' E:\GitHub\nano-win\src/text.c:3472: undefined reference to
`WEXITSTATUS' E:\GitHub\nano-win\src/text.c:3506: undefined reference to
`WIFEXITED' E:\GitHub\nano-win\src/text.c:3506: undefined reference to
`WEXITSTATUS' collect2.exe: error: ld returned 1 exit status make[2]: ***
[Makefile:1541: nano.exe] Error 1 make[2]: Leaving directory
'/e/GitHub/nano-win/src' make[1]: *** [Makefile:1543: all-recursive] Error 1
make[1]: Leaving directory '/e/GitHub/nano-win' make: *** [Makefile:1482: all]
Error 2 ```

In order to build nano successfully, `--disable-speller` has to be passed to `configure` due to absence of `fork()` and `wait()`.
The --disable-speller option is enough to get nano to build on Mingw32?
You don't pass any other options?  That would be strange, because the
linter uses fork() too and it doesn't get disabled by --disable-speller.

In your build script you pass --disable-justify to ./configure.  Is there
any specific reason that you pass this option?  And if your nano does not
do any justification, shouldn't you mention this in the README?

Benno



reply via email to

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