Skip to contentSkip to conversation

busybox-static linking failed

PATCH New Steffen Sledz 2 participants 5 messages Oct 28, 2009 – Oct 30, 2009

lore
Share & tools
lore
#0 lore raw

After a long time i tried to build an initramfs image containing busybox-static which fails to link (besides some warnings) with these errors:

/home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:189:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:190:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:202:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:214:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:224:
undefined reference to `__cpu_to_be16' networking/libiproute/lib.a(iptunnel.o):/home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:225:
more undefined references to `__cpu_to_be16' follow

This is really obscure for me because i can't identify the code lines responsible for them. :(

Steffen

#1 lore raw

PATCH 2/2 busybox-1.11.3: undefined reference __cpu_to_be16 fixed for busybox-static

---
 recipes/busybox/busybox-1.11.3/iptunnel.patch |   11 +++++++++++
 recipes/busybox/busybox.inc                   |    2 +-
 recipes/busybox/busybox_1.11.3.bb             |    1 +
 3 files changed, 13 insertions(+), 1 deletions(-)
 create mode 100644 recipes/busybox/busybox-1.11.3/iptunnel.patch
recipes/busybox/busybox-1.11.3/iptunnel.patch new file +11 -0
new file mode 100644
index 0000000..18734fc
@@ -0,0 +1,11 @@
+diff -Nurd busybox-1.11.3.orig//networking/libiproute/iptunnel.c busybox-1.11.3/networking/libiproute/iptunnel.c
+--- busybox-1.11.3.orig//networking/libiproute/iptunnel.c	2009-10-29 12:49:58.000000000 +0100
++++ busybox-1.11.3/networking/libiproute/iptunnel.c	2009-10-29 12:50:33.000000000 +0100
+@@ -21,6 +21,7 @@
+ #ifndef __constant_htons
+ #define __constant_htons htons
+ #endif
++#include <asm/byteorder.h>
+ #include <linux/if_tunnel.h>
+ 
+ #include "ip_common.h"  /* #include "libbb.h" is inside */
recipes/busybox/busybox.inc +1 -1
index 0ff65a4..753b402 100644
@@ -11,7 +11,7 @@ LICENSE = "GPL"
 SECTION = "base"
 PRIORITY = "required"
 
-INC_PR = "r22"
+INC_PR = "r23"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
recipes/busybox/busybox_1.11.3.bb +1 -0
index 293608b..0ec753f 100644
@@ -7,6 +7,7 @@ SRC_URI = "\
   file://udhcpscript.patch;patch=1 \
   file://B921600.patch;patch=1 \
   file://fdisk_lineedit_segfault.patch;patch=1 \
+  file://iptunnel.patch;patch=1 \
   file://busybox-appletlib-dependency.patch;patch=1 \
   file://busybox-cron \
   file://busybox-httpd \
Signature · 1 line
1.6.4.2
#2 lore raw
In reply to Steffen Sledz
Quoted 17 lines · Steffen Sledz

After a long time i tried to build an initramfs image containing busybox-static which fails to link (besides some warnings) with these errors:

/home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:189:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:190:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:202:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:214:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:224:
undefined reference to `__cpu_to_be16' networking/libiproute/lib.a(iptunnel.o):/home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:225:
more undefined references to `__cpu_to_be16' follow

Quoted 2 lines

This is really obscure for me because i can't identify the code lines responsible for them. :(

you need this kernel patch here
http://lkml.org/lkml/2009/6/18/223

Quoted 10 lines

Steffen

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 17 lines · Khem Raj
Quoted 17 lines

After a long time i tried to build an initramfs image containing busybox-static which fails to link (besides some warnings) with these errors:

/home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:189:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:190:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:202:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:214:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:224:
undefined reference to `__cpu_to_be16' networking/libiproute/lib.a(iptunnel.o):/home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:225:
more undefined references to `__cpu_to_be16' follow

Quoted 5 lines
Quoted 2 lines

This is really obscure for me because i can't identify the code lines responsible for them. :(

you need this kernel patch here
http://lkml.org/lkml/2009/6/18/223

This fixes the missing include inside the kernel. My patch suggestion adds the missing include inside busybox. I would prefer the kernel patch. Any objections?

Steffen

#4 lore raw
Quoted 21 lines · Steffen Sledz
Quoted 20 lines · Khem Raj
Quoted 19 lines

After a long time i tried to build an initramfs image containing busybox-static which fails to link (besides some warnings) with these errors:

/home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:189:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:190:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:202:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:214:
undefined reference to `__cpu_to_be16' /home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:224:
undefined reference to `__cpu_to_be16' networking/libiproute/lib.a(iptunnel.o):/home/OE/tmp.3/work/armv5te-angstrom-linux-gnueabi/busybox-static-1.11.3-r22.1/busybox-1.11.3/networking/libiproute/iptunnel.c:225:
more undefined references to `__cpu_to_be16' follow

This is really obscure for me because i can't identify the code lines responsible for them. :(

Quoted 6 lines
Quoted 2 lines

you need this kernel patch here
http://lkml.org/lkml/2009/6/18/223

This fixes the missing include inside the kernel. My patch suggestion adds the missing include inside busybox. I would prefer the kernel patch. Any objections?

This patch have not been applied in kernel upstream yet. So it would be nice to get
an idea if this will be pushed upstream or not. Otherwise patching busybox will be
right thing to do. May be you can ping the author of kernel patch to retry to push
it

Thanks

-Khem

Quoted 10 lines

Steffen

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel