* [Buildroot] host-ncurses: cannot find -lstdc++
@ 2010-12-10 17:44 Quotient Remainder
2010-12-10 18:29 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Quotient Remainder @ 2010-12-10 17:44 UTC (permalink / raw)
To: buildroot
OK, possibly a little bit OT since this isn't actually in mainline but
it's very close and may be useful.
I "added" host-ncurses by applying this trivial patch.
--8<--
diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
index 0a49887..0aa66d7 100644
--- a/package/ncurses/ncurses.mk
+++ b/package/ncurses/ncurses.mk
@@ -121,3 +121,4 @@ define NCURSES_INSTALL_TARGET_CMDS
endef # NCURSES_INSTALL_TARGET_CMDS
$(eval $(call AUTOTARGETS,package,ncurses))
+$(eval $(call AUTOTARGETS,package,ncurses,host))
-->8--
Minimum test case is configure for ARM CodeSourcery 2010q1 and try "make
dirs cross && make host-ncurses".
make[2]: Entering directory `/home/qvr/obair/community/buildroot/output/build/host-ncurses-5.7/c++'
/usr/lib64/ccache/g++ -o demo ../objects/demo.o -L../lib -lncurses++ -static -L../lib -lform -lmenu -lpanel -lncurses -dynamic -L/home/qvr/obair/community/buildroot/output/host/lib -L/home/qvr/obair/community/buildroot/output/host/usr/lib -Wl,-rpath,/home/qvr/obair/community/buildroot/output/host/usr/lib -I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include -D_GNU_SOURCE -DNDEBUG -I/home/qvr/obair/community/buildroot/output/host/usr/include/ncurses -I/home/qvr/obair/community/buildroot/output/host/include -I/home/qvr/obair/community/buildroot/output/host/usr/include
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make[2]: *** [demo] Error 1
make[2]: Leaving directory `/home/qvr/obair/community/buildroot/output/build/host-ncurses-5.7/c++'
"locate libstdc++.so" gives:
/usr/lib/libstdc++.so.6
/usr/lib/libstdc++.so.6.0.14
/usr/lib/gcc/x86_64-redhat-linux/4.5.1/libstdc++.so
/usr/lib/gcc/x86_64-redhat-linux/4.5.1/32/libstdc++.so
/usr/lib64/libstdc++.so.5
/usr/lib64/libstdc++.so.5.0.7
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.14
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/armv4t/usr/lib/libstdc++.so
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/armv4t/usr/lib/libstdc++.so.6
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/armv4t/usr/lib/libstdc++.so.6.0.12
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/thumb2/usr/lib/libstdc++.so
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/thumb2/usr/lib/libstdc++.so.6
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/thumb2/usr/lib/libstdc++.so.6.0.12
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/lib/libstdc++.so
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/lib/libstdc++.so.6
/home/qvr/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/lib/libstdc++.so.6.0.12
I don't see anything specifically on libstdc++ on the list previously.
Build machine x86_64 running Fedora 14 with make downgraded to v3.81.
Any ideas?
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] host-ncurses: cannot find -lstdc++
2010-12-10 17:44 [Buildroot] host-ncurses: cannot find -lstdc++ Quotient Remainder
@ 2010-12-10 18:29 ` Mike Frysinger
2010-12-13 12:48 ` Quotient Remainder
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2010-12-10 18:29 UTC (permalink / raw)
To: buildroot
On Fri, Dec 10, 2010 at 12:44 PM, Quotient Remainder wrote:
> ? ? ? ?make[2]: Entering directory `/home/qvr/obair/community/buildroot/output/build/host-ncurses-5.7/c++'
> ? ? ? ?/usr/lib64/ccache/g++ ?-o demo ../objects/demo.o -L../lib -lncurses++ -static -L../lib -lform -lmenu -lpanel -lncurses ?-dynamic ?-L/home/qvr/obair/community/buildroot/output/host/lib -L/home/qvr/obair/community/buildroot/output/host/usr/lib -Wl,-rpath,/home/qvr/obair/community/buildroot/output/host/usr/lib ?-I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include ?-D_GNU_SOURCE -DNDEBUG -I/home/qvr/obair/community/buildroot/output/host/usr/include/ncurses -I/home/qvr/obair/community/buildroot/output/host/include -I/home/qvr/obair/community/buildroot/output/host/usr/include
> ? ? ? ?/usr/bin/ld: cannot find -lstdc++
> ? ? ? ?collect2: ld returned 1 exit status
> ? ? ? ?make[2]: *** [demo] Error 1
i see no value in building the demos for the host. if you're after
the helper binaries (like `tic`), then build only the few tools you
actually need.
along those lines, last time i looked, the ncurses build system does
not automatically build up a local `tic` to generate terminfo files.
which means BR' ncurses.mk should be doing this already. otherwise
you can hit random problems with using the host `tic` which can be a
different version from the one you're cross-compiling.
-mike
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] host-ncurses: cannot find -lstdc++
2010-12-10 18:29 ` Mike Frysinger
@ 2010-12-13 12:48 ` Quotient Remainder
2010-12-13 13:32 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Quotient Remainder @ 2010-12-13 12:48 UTC (permalink / raw)
To: buildroot
Hello Mike,
Ar Aoine, 2010-12-10 ag 13:29 -0500, scr?obh Mike Frysinger:
> i see no value in building the demos for the host. if you're after
> the helper binaries (like `tic`), then build only the few tools you
> actually need.
It took me a second reading of your message to understand what you were
getting at. I made the mistake of forgetting that NCURSES_CONF_OPT is
not used in host builds so I added HOST_NCURSES_CONF_OPT and set it to
generate tic, etc.
I don't imagine it will ignite much interest but for any RHEL5
developers experiencing problems building ncurses 5.7 with the host
ncurses 5.5 RPM, this patch should help. Those without such problems
will curse it [see what I did there ;-) ].
diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
index 0a49887..499e2af 100644
--- a/package/ncurses/ncurses.mk
+++ b/package/ncurses/ncurses.mk
@@ -27,6 +27,7 @@ NCURSES_VERSION = 5.7
NCURSES_SITE = $(BR2_GNU_MIRROR)/ncurses
NCURSES_SOURCE = ncurses-$(NCURSES_VERSION).tar.gz
NCURSES_INSTALL_STAGING = YES
+NCURSES_DEPENDENCIES = host-ncurses
NCURSES_CONF_OPT = \
--with-shared \
@@ -43,13 +44,23 @@ NCURSES_CONF_OPT = \
--enable-broken_linker \
--disable-static
+HOST_NCURSES_CONF_OPT = \
+ --with-shared \
+ --disable-static \
+ --without-cxx-binding \
+
+
ifneq ($(BR2_ENABLE_DEBUG),y)
NCURSES_CONF_OPT += --without-debug
endif
define NCURSES_BUILD_CMDS
- $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR)
+ PATH=$(HOST_DIR)/usr/bin:$(PATH) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR)
+endef
+
+define HOST_NCURSES_BUILD_CMDS
+ $(MAKE1) -C $(@D) DESTDIR=$(HOST_DIR)
endef
define NCURSES_PATCH_NCURSES_CONFIG
@@ -57,7 +68,12 @@ define NCURSES_PATCH_NCURSES_CONFIG
$(STAGING_DIR)/usr/bin/ncurses5-config
endef
-NCURSES_POST_STAGING_INSTALL_HOOKS += NCURSES_PATCH_NCURSES_CONFIG
+define HOST_NCURSES_PATCH_NCURSES_CONFIG
+ $(SED) 's^prefix="^prefix="$(HOST_DIR)^' \
+ $(HOST_DIR)/usr/bin/ncurses5-config
+endef
+
+HOST_NCURSES_POST_STAGING_INSTALL_HOOKS += HOST_NCURSES_PATCH_NCURSES_CONFIG
ifeq ($(BR2_HAVE_DEVFILES),y)
define NCURSES_INSTALL_TARGET_DEVFILES
@@ -121,3 +137,4 @@ define NCURSES_INSTALL_TARGET_CMDS
endef # NCURSES_INSTALL_TARGET_CMDS
$(eval $(call AUTOTARGETS,package,ncurses))
+$(eval $(call AUTOTARGETS,package,ncurses,host))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] host-ncurses: cannot find -lstdc++
2010-12-13 12:48 ` Quotient Remainder
@ 2010-12-13 13:32 ` Mike Frysinger
0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2010-12-13 13:32 UTC (permalink / raw)
To: buildroot
On Monday, December 13, 2010 07:48:51 Quotient Remainder wrote:
> --- a/package/ncurses/ncurses.mk
> +++ b/package/ncurses/ncurses.mk
> define NCURSES_BUILD_CMDS
> - $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR)
> + PATH=$(HOST_DIR)/usr/bin:$(PATH) $(MAKE1) -C $(@D)
> DESTDIR=$(STAGING_DIR)
there's already a HOST_PATH for you to leverage
> +define HOST_NCURSES_PATCH_NCURSES_CONFIG
> + $(SED) 's^prefix="^prefix="$(HOST_DIR)^' \
> + $(HOST_DIR)/usr/bin/ncurses5-config
> +endef
doesnt package/Makefile.autotools.in already set prefix to the host dir ? so
is this really necessary ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101213/f47df52b/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-13 13:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-10 17:44 [Buildroot] host-ncurses: cannot find -lstdc++ Quotient Remainder
2010-12-10 18:29 ` Mike Frysinger
2010-12-13 12:48 ` Quotient Remainder
2010-12-13 13:32 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox