Patch to latest iproute to get it to compile on FC5

5 messages, 2 authors, 2008-02-14 · open the first message on its own page

Patch to latest iproute to get it to compile on FC5

From: Ben Greear <hidden>
Date: 2008-02-13 19:32:35

I notice that the latest snapshot and git repository for iproute
will not compile on FC5 due to not finding __constant_hton* symbols
and a lack of the hdlc/ioctl.h file on FC5.

I am attaching a patch that appears to fix the problems for me.

Please consider applying this or something similar.

Signed-off-by:  Ben Greear <redacted>


Thanks,
Ben

-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com

Re: Patch to latest iproute to get it to compile on FC5

From: Stephen Hemminger <hidden>
Date: 2008-02-13 19:57:10

On Wed, 13 Feb 2008 11:32:32 -0800
Ben Greear [off-list ref] wrote:
I notice that the latest snapshot and git repository for iproute
will not compile on FC5 due to not finding __constant_hton* symbols
and a lack of the hdlc/ioctl.h file on FC5.

I am attaching a patch that appears to fix the problems for me.

Please consider applying this or something similar.

Signed-off-by:  Ben Greear <redacted>


Thanks,
Ben
No. please don't change the configure script.
And the linux/if.h comes from kernel stripped headers so it should
not get crufted up by ifdef's.

Short term fix is to include stripped hdlc header if needed.
Long fix is to get rid of hdlc dependency if possible.

-- 
Stephen Hemminger [off-list ref]

Re: Patch to latest iproute to get it to compile on FC5

From: Stephen Hemminger <hidden>
Date: 2008-02-13 20:34:12

On Wed, 13 Feb 2008 11:32:32 -0800
Ben Greear [off-list ref] wrote:
I notice that the latest snapshot and git repository for iproute
will not compile on FC5 due to not finding __constant_hton* symbols
and a lack of the hdlc/ioctl.h file on FC5.

I am attaching a patch that appears to fix the problems for me.

Please consider applying this or something similar.

Signed-off-by:  Ben Greear <redacted>


Thanks,
Ben
I added include/linux/hdlc/ioctl.h to the santized headers in the
current git.

-- 
Stephen Hemminger [off-list ref]

Re: Patch to latest iproute to get it to compile on FC5

From: Ben Greear <hidden>
Date: 2008-02-13 20:53:23

Stephen Hemminger wrote:
On Wed, 13 Feb 2008 11:32:32 -0800
Ben Greear [off-list ref] wrote:
quoted
I notice that the latest snapshot and git repository for iproute
will not compile on FC5 due to not finding __constant_hton* symbols
and a lack of the hdlc/ioctl.h file on FC5.

I am attaching a patch that appears to fix the problems for me.

Please consider applying this or something similar.

Signed-off-by:  Ben Greear <redacted>


Thanks,
Ben
I added include/linux/hdlc/ioctl.h to the santized headers in the
current git.
That seems to fix the hdlc issue, but it still will not link due to missing
symbols:

gcc -Wl,-export-dynamic  ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o iplink_vlan.o link_veth.o ../lib/libnetlink.a ../lib/libutil.a  -lresolv -L../lib -lnetlink -lutil -ldl -o ip
iptunnel.o: In function `parse_args':
iptunnel.c:(.text+0x2c6): undefined reference to `__constant_htons'
iptunnel.c:(.text+0x404): undefined reference to `__constant_htons'
iptunnel.c:(.text+0x48d): undefined reference to `__constant_htons'
iptunnel.c:(.text+0x4a6): undefined reference to `__constant_htons'
iptunnel.c:(.text+0x4e2): undefined reference to `__constant_htons'
iptunnel.o:iptunnel.c:(.text+0x4fb): more undefined references to `__constant_htons' follow
collect2: ld returned 1 exit status
make[1]: *** [ip] Error 1
make[1]: Leaving directory `/root/iproute2/ip'
make: *** [all] Error 2


The attached patch fixes this.

Thanks,
Ben


-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com

Re: Patch to latest iproute to get it to compile on FC5

From: Ben Greear <hidden>
Date: 2008-02-14 06:06:40

Here's another try at the patch to make the __constant_htonl methods
be included, but without changing any of the .h files.  I tested this on
an FC2 system, and it compiles fine.

Interesting to me, it seems you are not supposed to #include 
<asm/byteorder.h> directly,
but when I tried the suggested <endian.h>, it didn't actually fix the 
problem.

Signed-off-by:  Ben Greear <redacted>

-- 
Ben Greear [off-list ref] 
Candela Technologies Inc  http://www.candelatech.com

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help