[openib-general] ofed 1.2 - compilation erros on ppc64 and ia64

Yosef Etigin yosefe at voltaire.com
Mon Dec 25 09:49:57 PST 2006


Michael S. Tsirkin wrote:
> Mutt Label Removed By VIM
> Quoting r. Yosef Etigin <yosefe at voltaire.com>:
> Subject: Re: ofed 1.2 - compilation erros on ppc64 and ia64
> 
> Michael S. Tsirkin wrote:
> 
> 
>>>>Quoting r. Yosef Etigin <yosefe at voltaire.com>:
>>>>Subject: ofed 1.2 - compilation erros on ppc64 and ia64
>>>>   
>>>>
>>>
>>>Which distro are you testing on?
>>>
>>> 
>>>
>>
>>I am testing on sles10, both ia64 and ppc64.
>>
>>
>>>>Hello,
>>>>I've been testing ofed 1.2 build from 
>>>>http://staging.openfabrics.org/builds/ 
>>>><http://staging.openfabrics.org/build/>, (latest.tgz versions both user 
>>>>and kernel) and got compilation erros on: ia64, ppc64:
>>>>
>>>>*ppc64:*
>>>>
>>>>   make -w -C ip ip
>>>>   make[2]: Entering directory
>>>>   `/tmp/openib_gen2/userspace/src/userspace/ipoibtools/iproute2/ip'
>>>>   [ ... omitted text ... ]
>>>>   gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
>>>>   -DRESOLVE_HOSTNAMES -c -o xfrm_monitor.o xfrm_monitor.c
>>>>   gcc -g -O2 -m64 -L/usr/lib64 ip.o ipaddress.o iproute.o iprule.o
>>>>   rtm_map.o iptunnel.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 ../lib/libnetlink.a ../lib/libutil.a
>>>>   -lresolv -L../lib -lnetlink -lutil -o ip
>>>>   /usr/bin/ld: skipping incompatible ../lib/libnetlink.a when
>>>>   searching for -lnetlink
>>>>   /usr/bin/ld: skipping incompatible
>>>>   /usr/lib/gcc/powerpc64-suse-linux/4.1.0/../../../libnetlink.a when
>>>>   searching for -lnetlink
>>>>   /usr/bin/ld: skipping incompatible /usr/lib/libnetlink.a when
>>>>   searching for -lnetlink
>>>>   /usr/bin/ld: cannot find -lnetlink
>>>>   collect2: ld returned 1 exit status
>>>>   make[2]: *** [ip] Error 1
>>>>
>>>>possible cause: the src/userspace/ipoibtools/iproute2/Makefile overrides 
>>>>CFLAGS (= instead of +=)
>>>>   
>>>>
>>>
>>>Isn't this makefile part of iproute2?
>>>Can you build iproute on this platform?
>>> 
>>>
>>
>>This makefile is indeed of iproute,
>>but it seems to make 32-bit object files for `iproute' during compilation
>>and therefore fails to find 64-bit during linkage of `ip'.
> 
> 
> Will installing the 32 bit version of the library help?
> 
>

I dont think so.. the issue arised during compilation, since `iproute' 
was inconsinsten in its use of -m64:
The iproute Makefile overrides any `CFLAGS' it might get from top-level, 
thus throwing `-m64' away, while LDFLAGS are not overriden.
Therefore, the compilation is done in 32bit while the linkage in 64bit

>>>	
>>> 
>>>
>>>
>>>>*ia64:*
>>>>
>>>>   make -f /usr/src/linux-2.6.16.21-0.8/scripts/Makefile.build
>>>>   obj=/tmp/openib_gen2/kernel/drivers/infiniband/core
>>>>   gcc [ ... omitted text ... ] -c -o
>>>>   /tmp/openib_gen2/kernel/drivers/infiniband/core/.tmp_addr.o
>>>>   /tmp/openib_gen2/kernel/drivers/infiniband/core/addr.c
>>>>   In file included from /tmp/openib_gen2/kernel/include/rdma/ib_addr.h:37,
>>>>   from /tmp/openib_gen2/kernel/drivers/infiniband/core/addr.c:38:
>>>>   /tmp/openib_gen2/kernel/include/rdma/ib_verbs.h: In function
>>>>   ‘ib_sg_dma_address’:
>>>>   /tmp/openib_gen2/kernel/include/rdma/ib_verbs.h:1577: error:
>>>>   implicit declaration of function ‘sg_dma_address’
>>>>   /tmp/openib_gen2/kernel/include/rdma/ib_verbs.h: In function
>>>>   ‘ib_sg_dma_len’:
>>>>   /tmp/openib_gen2/kernel/include/rdma/ib_verbs.h:1590: error:
>>>>   implicit declaration of function ‘sg_dma_len’
>>>>   /tmp/openib_gen2/kernel/drivers/infiniband/core/addr.c: At top level:
>>>>   /tmp/openib_gen2/kernel/drivers/infiniband/core/addr.c:61: warning:
>>>>   initialization from incompatible pointer type
>>>>   [ ... omitted text ... ]
>>>>   make: *** [kernel] Error 2
>>>>   
>>>>
>>>
>>>Probably a distro-specific backport problem - check how come sg_dma_len is not defined.
>>>I see this on upstream 2.6.16
>>>	asm-powerpc/scatterlist.h:#define sg_dma_len(sg) ((sg)->dma_length)
>>> 
>>>
>>
>>Im running this of ia64, `sg_dma_len' is not defined there, nor anywhere 
>>else in this file, but in:
>>        ./asm-ia64/pci.h:82:#define sg_dma_len(sg)    ((sg)->dma_length)
>>
> 
> 
> Isee, its fixed on 2.6.20.
> Need to do something about it in the backport then.
> 
> I wonder whether we can just put
> #ifdef __ia64__
> #define sg_dma_len(sg)          ((sg)->dma_length)
> #endif
> 
> in kernel_addons/backports/2.6.16/include/asm/scatterlist.h
> 
> Also need tofind out in which kernel this was fixed.
> 

Looks like in all kernels up to 2.6.20 it was in `pci.h' so need to 
backtort to.. all previous versions

Yossi





More information about the general mailing list