[LU-1461] Compile problems on ppc64 Created: 31/May/12  Updated: 27/Sep/12  Resolved: 27/Sep/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.3.0

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: Oleg Drokin
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 4487

 Description   

Testing ppc64 build node I found this issue:
echo_client.c: In function 'echo_md_build_name':
echo_client.c:1415: error: format '%llu' expects type 'long long unsigned int', but argument 3 has type '__u64'

This is due to direct usage of %llu instead of %LPU64

Similar issue in lfs.c:
lfs.c: In function 'lfs_data_version':
lfs.c:2788: error: format '%llu' expects type 'long long unsigned int', but argument 2 has type '__u64'



 Comments   
Comment by Peter Jones [ 31/May/12 ]

http://review.whamcloud.com/#change,2994

Comment by Oleg Drokin [ 05/Jun/12 ]

Another issue, now in server build in ldiskfs, introduced by: http://review.whamcloud.com/1095

/var/lib/jenkins/workspace/lustre-ppc-builder/arch/ppc64/build_type/server/distro/el6/ib_stack/ofa/BUILD/BUILD/lustre-ldiskfs-3.3.0/ldiskfs/mballoc.c: In function 'ldiskfs_mb_init_backend':
/var/lib/jenkins/workspace/lustre-ppc-builder/arch/ppc64/build_type/server/distro/el6/ib_stack/ofa/BUILD/BUILD/lustre-ldiskfs-3.3.0/ldiskfs/mballoc.c:2419: error: implicit declaration of function 'vmalloc'
/var/lib/jenkins/workspace/lustre-ppc-builder/arch/ppc64/build_type/server/distro/el6/ib_stack/ofa/BUILD/BUILD/lustre-ldiskfs-3.3.0/ldiskfs/mballoc.c:2419: warning: assignment makes pointer from integer without a cast
/var/lib/jenkins/workspace/lustre-ppc-builder/arch/ppc64/build_type/server/distro/el6/ib_stack/ofa/BUILD/BUILD/lustre-ldiskfs-3.3.0/ldiskfs/mballoc.c:2461: error: implicit declaration of function 'vfree'
make[5]: *** [/var/lib/jenkins/workspace/lustre-ppc-builder/arch/ppc64/build_type/server/distro/el6/ib_stack/ofa/BUILD/BUILD/lustre-ldiskfs-3.3.0/ldiskfs/mballoc.o] Error 1
make[5]: *** Waiting for unfinished jobs....

Patch tracking at http://review.whamcloud.com/3036

Comment by James A Simmons [ 11/Jul/12 ]

I noticed also the crypto problem on x86 builds if you have a older gcc.

Comment by James A Simmons [ 27/Jul/12 ]

Here is the exact error I get.

crc32-pclmul_asm.S:321: Error: no such instruction: `pextrd $0x01,%xmm1,%eax'

This is on a x86_64 box with gcc 4.1.2.

Comment by Alexander Boyko [ 28/Jul/12 ]

James, I check my Centos5, and have no any trouble with
gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)

Comment by James A Simmons [ 30/Jul/12 ]

Could be what instruction supported on the cpu on the build box messing it up. On the build box I have the cpu flags of:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc pni cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw

What flags do you have?

This is a Quad-Core AMD Opteron(tm) Processor 2389

Comment by Alexander Boyko [ 28/Aug/12 ]

No, cpuinfo does not show this instruction. And one more thing, if cpu support new instructions old kernels does not show this instructions through /proc/cpuinfo, but instructions work well.
You have the problem with old gcc, it doesn`t know pextrd instruction. Any way, if gcc compiled code successful, when libcfs is loading, it checks the pclmulqdq instruction support by cpu and provide this functionality or not.

Comment by Alexander Boyko [ 28/Aug/12 ]

pextrd exist on intel CPU from SSE4.1

Comment by Alexander Boyko [ 28/Aug/12 ]

James, try this patch
http://review.whamcloud.com/3801

Comment by James A Simmons [ 28/Aug/12 ]

Thanks. Will move reporting to LU-1786

Comment by Jodi Levi (Inactive) [ 27/Sep/12 ]

Please reopen ticket if more work is needed.

Generated at Sat Feb 10 01:16:50 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.