[#5656] Build iproute2 fails at trunk for dlfcn.h when built as FLAT
Submitted By: Barry Song
Open Date
2009-11-04 02:20:52 Close Date
2009-11-06 06:07:29
Priority:
Medium Assignee:
Barry Song
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
N/A
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
gcc 4.3.4 (trunk/svn-3672)
App binary format:
N/A
Summary: Build iproute2 fails at trunk for dlfcn.h when built as FLAT
Details:
log:
bfin-uclinux-gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -DEMBED -D__uClinux__ -I/home/bhsong/develop/svn/uclinux-dist -mcpu=bf537-0.2 -c -o ipmroute.o ipmroute.c
iplink.c:18:19: error: dlfcn.h: No such file or directory
iplink.c: In function ‘get_link_kind’:
iplink.c:105: warning: implicit declaration of function ‘dlopen’
iplink.c:105: error: ‘RTLD_LAZY’ undeclared (first use in this function)
iplink.c:105: error: (Each undeclared identifier is reported only once
iplink.c:105: error: for each function it appears in.)
iplink.c:105: warning: assignment makes pointer from integer without a cast
iplink.c:110: warning: assignment makes pointer from integer without a cast
iplink.c:117: warning: implicit declaration of function ‘dlsym’
iplink.c:117: warning: assignment makes pointer from integer without a cast
Follow-ups
--- Barry Song 2009-11-04 05:19:34
It is said FLAT doesn't support dlopen/dlsym/dlclose..., so let iproute2 depend
on FDPIC in Kconfig.
--- Mike Frysinger 2009-11-04 07:59:52
i'm pretty sure very little of iproute's functionality requires dlopen. should
be easy to add support via NO_SHARED_LIBS like iptables does.
--- Mike Frysinger 2009-11-04 09:27:59
can you try the attached patch. it's against latest git iproute2.
--- Barry Song 2009-11-05 22:48:04
Great job! Your patch is ok:
bhsong@bhsong-desktop:~/.../romfs/bin# file ip
ip: BFLT executable - version 4 ram
root:/> ip link set can0 type can bitrate 125000
bfin_can bfin_can.0: setting can bitrate:125000 brp:125 prop_seg:3 phase_seg1:3
phase_seg2:1
root:/> ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
link/ether 00:e0:22:fe:4d:4b brd ff:ff:ff:ff:ff:ff
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN
qlen 10
link/can
There is still work to do in iproute2. Locally, I only replace all fork by
vfork for compiling and testing CAN. I need to figure out the right fix for
those fork in iproute2.
--- Mike Frysinger 2009-11-06 06:07:29
ive pushed the daemon() changes upstream already, but i dont know how to fix the
first fork() (the stats ones).
i'll push the static one now that you've tested it
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
0004-support-static-only-systems.patch application/octet-stream 8644 Mike Frysinger