Rick Houkes wrote:
So I decided to try out the latest systemd LFS dev book (SVN-20150811). The
build when until I reached ncurses 6.0 in chapter 5. Ncurses 6.0 would not
compile. The exact error:
gcc -DHAVE_CONFIG_H -I. -I../include -D_GNU_SOURCE -DNDEBUG -O2 --param
max-inline-insns-single=1200 -fPIC -c ../ncurses/lib_gen.c -o
../obj_s/lib_gen.o
In file included from ./curses.priv.h:325:0,
from ../ncurses/lib_gen.c:19:
_13345.c:1372:15: error: expected ')' before 'int'
../include/curses.h:1943:56: note: in definition of macro 'mouse_trafo'
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
^
Makefile:1034: recipe for target '../obj_s/lib_gen.o' failed
make[1]: *** [../obj_s/lib_gen.o] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/ncurses-6.0/ncurses'
Makefile:113: recipe for target 'all'
Note: Build host is Kubuntu 15.04 amd64 (x86_64). No C(XX) flags were set.
First I tried applying my basic knowledge of C, but could not find an eror.
So on to google it was. Seems the problem is know upstream:
http://lists.gnu.org/archive/html/bug-ncurses/2015-01/msg00018.html
For me, I grabbed an applied the patch under:
ftp://invisible-island.net/ncurses/6.0/ncurses-6.0-20150810.patch.gz
Now ncurses compiles happily for me under the latest dev build.
Thanks for the patch. Please do not compress small patches in your
email. In this case it was about 7K uncompressed and that's fine.
Otherwise we have to save the file and uncompress manually.
Looking at the patch, there is a lot of fluff not needed for LFS. What
I see that is really needed is:
--- ncurses-6.0-20150808+/ncurses/base/MKlib_gen.sh 2015-08-07 +0000
+++ ncurses-6.0-20150810/ncurses/base/MKlib_gen.sh 2015-08-10 +0000
@@ -72,7 +72,7 @@
# appears in gcc 5.0 and (with modification) in 5.1, making it
necessary to
# determine if we are using gcc, and if so, what version because the
proposed
# solution uses a nonstandard option.
-PRG=`echo "$1" | $AWK '{ sub(/^[[:space:]]*/,""); sub(/[[:space:]].*$/,
""); print; }' || exit 0`
+PRG=`echo "$1" | $AWK '{ sub(/^[ ]*/,""); sub(/[ ].*$/, ""); print;
}' || exit 0`
FSF=`"$PRG" --version 2>/dev/null || exit 0 | fgrep "Free Software
Foundation" | head -n 1`
That's just a one line change.
It can be fixed with:
sed -i 's/.:space:./ \t/g' ncurses/base/MKlib_gen.sh
The dots match [ and ] which would need to be \[ and \], but we can use
the wildcard . in this case.
On the other hand, I see this message:
+20150810
+ + workaround for Debian #65617, which was fixed in mawk's upstream
+ releases in 2009 (report by Sven Joachim). See
+ http://invisible-island.net/mawk/CHANGES.html#t20090727
Have you run the host system requirements and made the change from mawk
to gawk? If that's the problem, then this change is not needed for LFS.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page