All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] nbd fails to compile with /usr/bin/klcc: unknown option: --sysroot=
@ 2010-06-23 22:53 Peter Hüwe
  2010-06-24  7:44 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Hüwe @ 2010-06-23 22:53 UTC (permalink / raw)
  To: buildroot

Hi,

the atngw100_defconfig has nbd client and server enabled, and unfortunately it fails to compile, with the message

/usr/bin/klcc: unknown option: --sysroot=/avr/buildroot/output/staging/

$klcc --version
x86_64-pc-linux-gnu-gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.3)

How can I fix this ? - Unfortunately I'm not that into the whole buildroot system (yet, but I'd like to learn and contribute to it).

Thanks,
Peter

Here are the last few lines:


/usr/bin/klcc -DHAVE_CONFIG_H -I.     -Os -pipe -Os  -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -
I/avr/buildroot/output/staging/usr/include -I/avr/buildroot/output/staging/include --sysroot=/avr/buildroot/output/staging/ -isysroot /avr/buildroot/output/staging -c -o 
knbd_client-nbd-client.o nbd-client.c
/avr/buildroot/output/staging/usr/bin/avr32-unknown-linux-uclibc-gcc -Os -pipe -Os  -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -
D_FILE_OFFSET_BITS=64 -I/avr/buildroot/output/staging/usr/include -I/avr/buildroot/output/staging/include --sysroot=/avr/buildroot/output/staging/ -isysroot 
/avr/buildroot/output/staging -DHAVE_CONFIG_H -I.     -Os -pipe -Os  -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -
D_FILE_OFFSET_BITS=64 -I/avr/buildroot/output/staging/usr/include -I/avr/buildroot/output/staging/include --sysroot=/avr/buildroot/output/staging/ -isysroot 
/avr/buildroot/output/staging -MT nbd-client.o -MD -MP -MF .deps/nbd-client.Tpo -c -o nbd-client.o nbd-client.c
/usr/bin/klcc: unknown option: --sysroot=/avr/buildroot/output/staging/
make[2]: *** [knbd_client-nbd-client.o] Fehler 25
make[2]: *** Warte auf noch nicht beendete Prozesse...
In file included from nbd-client.c:17:
lfs.h:7:1: warning: "_LARGEFILE_SOURCE" redefined
<command-line>: warning: this is the location of the previous definition
In file included from nbd-server.c:56:
lfs.h:7:1: warning: "_LARGEFILE_SOURCE" redefined
<command-line>: warning: this is the location of the previous definition
mv -f .deps/nbd-client.Tpo .deps/nbd-client.Po
mv -f .deps/nbd_server-nbd-server.Tpo .deps/nbd_server-nbd-server.Po
make[2]: Leaving directory `/avr/buildroot/output/build/nbd-2.9.11'
make[1]: *** [all] Fehler 2
make[1]: Leaving directory `/avr/buildroot/output/build/nbd-2.9.11'
make: *** [/avr/buildroot/output/build/nbd-2.9.11/.stamp_built] Fehler 2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] nbd fails to compile with /usr/bin/klcc: unknown option: --sysroot=
  2010-06-23 22:53 [Buildroot] nbd fails to compile with /usr/bin/klcc: unknown option: --sysroot= Peter Hüwe
@ 2010-06-24  7:44 ` Thomas Petazzoni
  2010-06-24 10:46   ` [Buildroot] [PATCH] nbd: Bump nbd to version 2.9.15 and remove klcc issue Peter Huewe
  2010-06-24 10:47   ` [Buildroot] nbd fails to compile with /usr/bin/klcc: unknown option: --sysroot= Peter Hüwe
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2010-06-24  7:44 UTC (permalink / raw)
  To: buildroot

On Thu, 24 Jun 2010 00:53:12 +0200
Peter H?we <PeterHuewe@gmx.de> wrote:

> the atngw100_defconfig has nbd client and server enabled, and unfortunately it fails to compile, with the message
> 
> /usr/bin/klcc: unknown option: --sysroot=/avr/buildroot/output/staging/
> 
> $klcc --version
> x86_64-pc-linux-gnu-gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.3)
> 
> How can I fix this ? - Unfortunately I'm not that into the whole buildroot system (yet, but I'd like to learn and contribute to it).

It's because you have klcc installed on your development system, nbd
detects it and uses it. Unfortunately, it doesn't understand all the
usual gcc options.

You have two options to solve this problem:

 *) Pass the --disable-klcc option to NBD's configure script. You could
    add this to NBD_CONF_OPT.

 *) Update to nbd 2.9.15 (the current version in Buildroot is 2.9.11),
    which has removed support for klcc.

In any case, don't forget to send a patch ! :-)

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] nbd: Bump nbd to version 2.9.15 and remove klcc issue.
  2010-06-24  7:44 ` Thomas Petazzoni
@ 2010-06-24 10:46   ` Peter Huewe
  2010-06-24 15:35     ` Peter Korsgaard
  2010-06-24 10:47   ` [Buildroot] nbd fails to compile with /usr/bin/klcc: unknown option: --sysroot= Peter Hüwe
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Huewe @ 2010-06-24 10:46 UTC (permalink / raw)
  To: buildroot

From: Peter Huewe <peterhuewe@gmx.de>

This patch bumps the version of nbd to 2.9.15.
The new version avoids problems with klcc installed on the host system
and also includes two former buildroot patches:
- nbd-fix-build-with-disable-lfs.patch
- nbd-server-fix-read-eagain.patch
These patches get removed from the buildroot tree by this patch too.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
Patch against buildroot of git-20100624

 package/nbd/nbd-fix-build-with-disable-lfs.patch |   30 ----------------------
 package/nbd/nbd-server-fix-read-eagain.patch     |   21 ---------------
 package/nbd/nbd.mk                               |    2 +-
 3 files changed, 1 insertions(+), 52 deletions(-)
 delete mode 100644 package/nbd/nbd-fix-build-with-disable-lfs.patch
 delete mode 100644 package/nbd/nbd-server-fix-read-eagain.patch

diff --git a/package/nbd/nbd-fix-build-with-disable-lfs.patch b/package/nbd/nbd-fix-build-with-disable-lfs.patch
deleted file mode 100644
index 5b270aa..0000000
--- a/package/nbd/nbd-fix-build-with-disable-lfs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6d452ab0247770a446cfa6dd9b8b4ddea6c8fa4b Mon Sep 17 00:00:00 2001
-From: Peter Korsgaard <jacmet@sunsite.dk>
-Date: Sun, 22 Nov 2009 23:01:52 +0100
-Subject: [PATCH] lfs.h: fix build with --disable-lfs
-
-Running ./configure with --disable-lfs #define's NBD_LFS to 0 and
-doesn't #undef it, so the LFS check should use #if rather than #ifdef
-similar to how it is done in cliserv.h
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- lfs.h |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/lfs.h b/lfs.h
-index 8f90f81..929ce08 100644
---- a/lfs.h
-+++ b/lfs.h
-@@ -2,7 +2,7 @@
- #define LFS_H
- 
- #include "config.h"
--#ifdef NBD_LFS
-+#if NBD_LFS
- #define _FILE_OFFSET_BITS 64
- #define _LARGEFILE_SOURCE
- #endif /* NBD_LFS */
--- 
-1.6.3.3
-
diff --git a/package/nbd/nbd-server-fix-read-eagain.patch b/package/nbd/nbd-server-fix-read-eagain.patch
deleted file mode 100644
index b1f966c..0000000
--- a/package/nbd/nbd-server-fix-read-eagain.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- nbd-2.9.11.orig/nbd-server.c
-+++ nbd-2.9.11/nbd-server.c
-@@ -304,10 +304,14 @@
- 	ssize_t res;
- 	while (len > 0) {
- 		DEBUG("*");
--		if ((res = read(f, buf, len)) <= 0)
--			err("Read failed: %m");
--		len -= res;
--		buf += res;
-+		if ((res = read(f, buf, len)) <= 0) {
-+			if(errno != EAGAIN) {
-+				err("Read failed: %m");
-+			}
-+		} else {
-+			len -= res;
-+			buf += res;
-+		}
- 	}
- }
- 
diff --git a/package/nbd/nbd.mk b/package/nbd/nbd.mk
index 8bffaf8..fa8dd4f 100644
--- a/package/nbd/nbd.mk
+++ b/package/nbd/nbd.mk
@@ -4,7 +4,7 @@
 #
 #############################################################
 
-NBD_VERSION = 2.9.11
+NBD_VERSION = 2.9.15
 NBD_SOURCE = nbd-$(NBD_VERSION).tar.bz2
 NBD_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nbd/
 NBD_CONF_OPT = $(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] nbd fails to compile with /usr/bin/klcc: unknown option: --sysroot=
  2010-06-24  7:44 ` Thomas Petazzoni
  2010-06-24 10:46   ` [Buildroot] [PATCH] nbd: Bump nbd to version 2.9.15 and remove klcc issue Peter Huewe
@ 2010-06-24 10:47   ` Peter Hüwe
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Hüwe @ 2010-06-24 10:47 UTC (permalink / raw)
  To: buildroot

Am Donnerstag 24 Juni 2010 09:44:17 schrieb Thomas Petazzoni:
>  *) Update to nbd 2.9.15 (the current version in Buildroot is 2.9.11),
>     which has removed support for klcc.
> 
> In any case, don't forget to send a patch ! :-)

Created a patch and sent it to the mailing list - compiles fine. :)
Thanks for the hint.

Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] nbd: Bump nbd to version 2.9.15 and remove klcc issue.
  2010-06-24 10:46   ` [Buildroot] [PATCH] nbd: Bump nbd to version 2.9.15 and remove klcc issue Peter Huewe
@ 2010-06-24 15:35     ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2010-06-24 15:35 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Huewe <PeterHuewe@gmx.de> writes:

 Peter> From: Peter Huewe <peterhuewe@gmx.de>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-24 15:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-23 22:53 [Buildroot] nbd fails to compile with /usr/bin/klcc: unknown option: --sysroot= Peter Hüwe
2010-06-24  7:44 ` Thomas Petazzoni
2010-06-24 10:46   ` [Buildroot] [PATCH] nbd: Bump nbd to version 2.9.15 and remove klcc issue Peter Huewe
2010-06-24 15:35     ` Peter Korsgaard
2010-06-24 10:47   ` [Buildroot] nbd fails to compile with /usr/bin/klcc: unknown option: --sysroot= Peter Hüwe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.