On Sat, Feb 15, 2025 at 11:44:37AM +0100, Alexandre Detiste wrote:
In my previous attempts, I was post-editing config.h with sed.
I know it's horrible ... but it get things done.
I was later stuck by the other problems solved by наб
Alexandre
Le sam. 15 févr. 2025 à 10:53, Andreas Tille <andreas@an3as.eu> a écrit :
Hi,
thanks to the help of наб[1] most issues in ncftp where fixed in Git[2].
The only remaining issue is that the binary
/usr/bin/ncftpbookmarks
is not build which is IMHO due to a problem in detecting the ncurses library inside the M4 code. The configure.in snippet[3] is seeking for the variable wi_LIB_CURSES which is actually set in aclocal[4] but something seems to go wrong here. Any help to fix this code would be welcome to make sure ncftpbookmarks will be built.
Kind regards
Andreas.
[1] https://salsa.debian.org/debian/ncftp/-/merge_requests/1
[2] https://salsa.debian.org/debian/ncftp
[3] https://salsa.debian.org/debian/ncftp/-/blob/master/configure.in?ref_type=heads#L100-106
[4] https://salsa.debian.org/debian/ncftp/-/blob/master/autoconf_local/aclocal.m4?ref_type=heads#L5128
I gave it a shot. I did:
(sid)joostvb@agni:~/git/build-area/ncftp-3.2.7% ./configure
.../build-area/ncftp-3.2.7% less config.log
shows:
configure:6364: checking for sys/ioctl.h
configure:6453: checking for curses library
configure:6491: gcc -o conftest -D_REENTRANT -D_LARGEFILE64_SOURCE -O2 -W -Wall -Wno-format-y2k conftest.c -lresolv -lncursesw 1>&5
configure: In function 'main':
configure:6484:21: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
6484 | if (strcmp("jimmy", "floyd") == 0)
| ^~~~~~
configure:6477:1: note: include '<string.h>' or provide a declaration of 'strcmp'
6476 | # include <ncurses.h>
+++ |+#include <string.h>
6477 | #else
configure:6486:17: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
6486 | exit(0);
| ^~~~
configure:6477:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
6476 | # include <ncurses.h>
+++ |+#include <stdlib.h>
6477 | #else
configure:6486:17: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
6486 | exit(0);
| ^~~~
configure:6486:17: note: include '<stdlib.h>' or provide a declaration of 'exit'
configure: failed program was:
I guess patching the testing C code in autoconf_local/aclocal.m4 around these lines:
5127 /* function body */
5128 if (strcmp("jimmy", "floyd") == 0)
5129 initscr();
5130 exit(0);
could work? I am guessing the C code is not modern enough and therefore fails.
Don't have time to investigate more now, but anyway: HTH!
Hi,
On Sat, Feb 15, 2025 at 03:02:57PM +0100, Joost van Baal-Ilić wrote:
I gave it a shot. I did:
(sid)joostvb@agni:~/git/build-area/ncftp-3.2.7% ./configure
.../build-area/ncftp-3.2.7% less config.log
lines:
5127 /* function body */
5128 if (strcmp("jimmy", "floyd") == 0)
5129 initscr();
5130 exit(0);
could work? I am guessing the C code is not modern enough and therefore fails.
Don't have time to investigate more now, but anyway: HTH!
Hrm, or in vis/Makefile.in , change
CURSESLIBS=@LIBCURSES@
into
CURSESLIBS=-lncurses
I guess patching the testing C code in autoconf_local/aclocal.m4 around these lines:
5127 /* function body */
5128 if (strcmp("jimmy", "floyd") == 0)
5129 initscr();
5130 exit(0);
[0]: https://salsa.debian.org/itd/ncftp/-/commit/600b2ea2d4f2c2ed9d9b34f7267de82c8513e08e
[1]: https://salsa.debian.org/itd/ncftp/-/jobs/7094979#L1914
The patch there is beautiful, it should get in imnsho. However, I'm
afraid I don't have the time to prepare another upload...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 167:03:17 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,529 |