GNU bug report logs -
#76706
[PATCH] build: fix compile errors on platforms without getopt.h
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
I found that GNU sed does not compile on platforms with <getopt.h> or
getopt_long. For example on AIX:
make[2]: Entering directory '/home/collinfunk/sed-4.9.51-0f74-modified'
CC sed/sed-sed.o
sed/sed.c:20:10: fatal error: getopt.h: No such file or directory
20 | #include <getopt.h>
| ^~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:6188: sed/sed-sed.o] Error 1
make[2]: Leaving directory '/home/collinfunk/sed-4.9.51-0f74-modified'
make[1]: *** [Makefile:6425: all-recursive] Error 1
make[1]: Leaving directory '/home/collinfunk/sed-4.9.51-0f74-modified'
make: *** [Makefile:3595: all] Error 2
This is because the following commit:
commit 71de42fd346688b131e7364d7ea7be4e973fb0c3
Author: Assaf Gordon <assafgordon <at> gmail.com>
AuthorDate: Sat Jan 2 23:41:51 2021 -0700
Commit: Assaf Gordon <assafgordon <at> gmail.com>
CommitDate: Tue Jan 5 17:02:10 2021 -0700
maint: update all copyright year number ranges
Run "make update-copyright" and then...
[...]
* bootstrap.conf (gnulib_modules): Remove getopt module, depracated in
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0abc38bd2a1398f0
[...]
The deprecation of getopt was because it split into getopt-posix and
getopt-gnu. GNU sed uses <getopt.h> and getopt_long, so we need
getopt-gnu.
I have attached a patch that fixes this. I added a note in NEWS since
the 4.9 was released after that commit so the tarball won't build on
platforms like AIX.
Collin
[0001-build-fix-compile-errors-on-platforms-without-getopt.patch (text/x-patch, attachment)]
This bug report was last modified 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.