Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19749 closed defect (fixed)

trunk compiling fails at ncurses host-compile

Reported by: daniel.petre@… Owned by: developers
Priority: high Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: r45810, ncurses Cc:

Description

trunk r45810 breaks at:

make[3] -C package/libs/lzo compile
make[3] -C package/libs/zlib compile
make[3] -C package/libs/ncurses host-compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/dani/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make: * [world] Error 1

and with V=99 :

make[3]: Entering directory '/home/dani/openwrt/package/libs/ncurses'
make -C /home/dani/openwrt/build_dir/host/ncurses-5.9 libs
make[4]: Entering directory '/home/dani/openwrt/build_dir/host/ncurses-5.9'
cd include && make DESTDIR="" libs
make[5]: Entering directory '/home/dani/openwrt/build_dir/host/ncurses-5.9/include'
make[5]: Nothing to be done for 'libs'.
make[5]: Leaving directory '/home/dani/openwrt/build_dir/host/ncurses-5.9/include'
cd ncurses && make DESTDIR="" libs
make[5]: Entering directory '/home/dani/openwrt/build_dir/host/ncurses-5.9/ncurses'
gcc -DHAVE_CONFIG_H -I../ncurses -I. -I/home/dani/openwrt/staging_dir/host/include -I/home/dani/openwrt/staging_dir/host/usr/include -D_GNU_SOURCE -DNDEBUG -I. -I../include -I/home/dani/openwrt/staging_dir/host/include/ncurses -O2 -I/home/dani/openwrt/staging_dir/host/include -I/home/dani/openwrt/staging_dir/host/usr/include --param max-inline-insns-single=1200 -c ../ncurses/lib_gen.c -o ../objects/lib_gen.o
In file included from ../ncurses/curses.priv.h:288:0,

from ../ncurses/lib_gen.c:19:

_26981.c:835:15: error: expected ')' before 'int'
../include/curses.h:1594:56: note: in definition of macro 'mouse_trafo'

#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)


Makefile:785: recipe for target '../objects/lib_gen.o' failed
make[5]: * objects/lib_gen.o Error 1
make[5]: Leaving directory '/home/dani/openwrt/build_dir/host/ncurses-5.9/ncurses'
Makefile:131: recipe for target 'libs' failed
make[4]:
* [libs] Error 2
make[4]: Leaving directory '/home/dani/openwrt/build_dir/host/ncurses-5.9'
Makefile:178: recipe for target '/home/dani/openwrt/build_dir/host/ncurses-5.9/.built' failed
make[3]: * /home/dani/openwrt/build_dir/host/ncurses-5.9/.built Error 2
make[3]: Leaving directory '/home/dani/openwrt/package/libs/ncurses'
package/Makefile:187: recipe for target 'package/libs/ncurses/host/compile' failed
make[2]:
* [package/libs/ncurses/host/compile] Error 2
make[2]: Leaving directory '/home/dani/openwrt'
package/Makefile:184: recipe for target '/home/dani/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile' failed
make[1]: * /home/dani/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile Error 2
make[1]: Leaving directory '/home/dani/openwrt'
/home/dani/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make:
* [world] Error 2

Attachments (1)

patch (504 bytes) - added by anonymous 3 years ago.
ncurses patch

Download all attachments as: .zip

Change History (12)

comment:1 Changed 3 years ago by daniel.petre@…

Still happening with r45847 :

make[3]: Entering directory '/home/dani/openwrt/package/libs/ncurses'
make -C /home/dani/openwrt/build_dir/host/ncurses-5.9 libs
make[4]: Entering directory '/home/dani/openwrt/build_dir/host/ncurses-5.9'
cd include && make DESTDIR="" libs
make[5]: Entering directory '/home/dani/openwrt/build_dir/host/ncurses-5.9/include'
make[5]: Nothing to be done for 'libs'.
make[5]: Leaving directory '/home/dani/openwrt/build_dir/host/ncurses-5.9/include'
cd ncurses && make DESTDIR="" libs
make[5]: Entering directory '/home/dani/openwrt/build_dir/host/ncurses-5.9/ncurses'
gcc -DHAVE_CONFIG_H -I../ncurses -I. -I/home/dani/openwrt/staging_dir/host/include -I/home/dani/openwrt/staging_dir/host/usr/include -D_GNU_SOURCE -DNDEBUG -I. -I../include -I/home/dani/openwrt/staging_dir/host/include/ncurses -O2 -I/home/dani/openwrt/staging_dir/host/include -I/home/dani/openwrt/staging_dir/host/usr/include --param max-inline-insns-single=1200 -c ../ncurses/lib_gen.c -o ../objects/lib_gen.o
In file included from ../ncurses/curses.priv.h:288:0,

from ../ncurses/lib_gen.c:19:

_26981.c:835:15: error: expected ')' before 'int'
../include/curses.h:1594:56: note: in definition of macro 'mouse_trafo'

#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)


Makefile:785: recipe for target '../objects/lib_gen.o' failed
make[5]: * objects/lib_gen.o Error 1
make[5]: Leaving directory '/home/dani/openwrt/build_dir/host/ncurses-5.9/ncurses'
Makefile:131: recipe for target 'libs' failed
make[4]:
* [libs] Error 2
make[4]: Leaving directory '/home/dani/openwrt/build_dir/host/ncurses-5.9'
Makefile:178: recipe for target '/home/dani/openwrt/build_dir/host/ncurses-5.9/.built' failed
make[3]: * /home/dani/openwrt/build_dir/host/ncurses-5.9/.built Error 2
make[3]: Leaving directory '/home/dani/openwrt/package/libs/ncurses'
package/Makefile:187: recipe for target 'package/libs/ncurses/host/compile' failed
make[2]:
* [package/libs/ncurses/host/compile] Error 2
make[2]: Leaving directory '/home/dani/openwrt'
package/Makefile:184: recipe for target '/home/dani/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile' failed
make[1]: * /home/dani/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile Error 2
make[1]: Leaving directory '/home/dani/openwrt'
/home/dani/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make:
* [world] Error 2

comment:2 Changed 3 years ago by anonymous

Maybe a problem with gcc 5.1.0 that my Arch Linux runs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61832

Changed 3 years ago by anonymous

ncurses patch

comment:3 Changed 3 years ago by anonymous

try the attached patch

comment:4 Changed 3 years ago by ljozsa

Works like a charm. Thanks!

comment:5 Changed 3 years ago by anonymous

hello,
i have the same problem, how did you apply the patch?

comment:6 Changed 3 years ago by hauke

This patch only adds a "-P" to CPPFLAGS the other stuff is already defined by include $(INCLUDE_DIR)/host-build.mk is this patch really needed, for me OpenWrt builds on Fedora 22.

comment:7 Changed 3 years ago by anonymous

it was needed before a different patch solving this same issue was merged a few days ago.
Now it's useless.

This ticket can be closed.

comment:8 follow-up: Changed 3 years ago by StMartin81

Hello,

I'm having the same problem. Can you point out the patch to me which solved this issue?

comment:9 Changed 3 years ago by hauke

  • Resolution set to fixed
  • Status changed from new to closed

This should be fixed in current trunk.

comment:10 in reply to: ↑ 8 Changed 3 years ago by anonymous

Replying to StMartin81:

I'm having the same problem. Can you point out the patch to me which solved this issue?

I would also be interested :-)

comment:11 Changed 3 years ago by StMartin81

Sorry I didn't leave a reply: I was able to fix the compilation issue like this:

 meta/recipes-core/ncurses/ncurses.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index 10f7dd1..a7a265d 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -26,7 +26,7 @@ ENABLE_WIDEC ?= "true"
 # _GNU_SOURCE is required for widec stuff and is detected automatically
 # for target objects.  But it must be set manually for native and sdk
 # builds.
-BUILD_CPPFLAGS += "-D_GNU_SOURCE"
+BUILD_CPPFLAGS += "-D_GNU_SOURCE -P"

 # natives don't generally look in base_libdir
 base_libdir_class-native = "${libdir}"

Problem was that the ncurses build system relies on gcc not inserting any new lines. The BUILD_CPPFLAGS += -P prevents gcc from inserting new lines.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.