[LU-4668] compile error on ppc64: asm/stacktrace.h: No such file or directory Created: 25/Feb/14  Updated: 10/Mar/14  Resolved: 10/Mar/14

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

Type: Bug Priority: Critical
Reporter: Jian Yu Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: None
Environment:

Lustre Build: http://build.whamcloud.com/job/lustre-master/1909/
Distro/Arch: RHEL6.5/ppc64


Attachments: Text File lbuild.ppc64.log    
Issue Links:
Related
is related to LU-4199 Lustre client support for ARM platform Resolved
Severity: 3
Rank (Obsolete): 12788

 Description   

While compiling Lustre master branch against kernel 2.6.32-431.5.1.el6 on RHEL6.5/ppc64 by using lbuild, I hit the following errors:

/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:188:28: error: asm/stacktrace.h: No such file or directory
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:220: error: variable 'print_trace_ops' has initializer but incomplete type
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:225: error: unknown field 'stack' specified in initializer
cc1: warnings being treated as errors
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:225: error: excess elements in struct initializer
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:225: error: (near initialization for 'print_trace_ops')
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:226: error: unknown field 'address' specified in initializer
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:226: error: excess elements in struct initializer
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:226: error: (near initialization for 'print_trace_ops')
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c: In function 'libcfs_debug_dumpstack':
/root/lustre-release/build/BUILD/lustre-2.5.55/libcfs/libcfs/linux/linux-debug.c:241: error: implicit declaration of function 'dump_trace'

The lbuild log "lbuild.ppc64.log" is attached.



 Comments   
Comment by Jian Yu [ 25/Feb/14 ]

This is because patch http://review.whamcloud.com/5403 removed LIBCFS_FUNC_DUMP_TRACE test.

Since dump_trace is not supported by powerpc arch, we need restore the test. Here is the patch for master branch: http://review.whamcloud.com/9381

Comment by James A Simmons [ 25/Feb/14 ]

We ran into the same problem for the ARM client support. Can you try patch

http://review.whamcloud.com/#/c/8872

If that patch works for you can this ticket be linked to LU-4199 since the same problem overlaps.

Comment by Jian Yu [ 26/Feb/14 ]

Hi James,

Thank you for the info. I just tried patch #8872 and got the following compile error on ppc64:

/root/lustre-release/build/BUILD/lustre-2.5.56/libcfs/libcfs/linux/linux-debug.c:188:28: error: asm/stacktrace.h: No such file or directory
make[6]: *** [/root/lustre-release/build/BUILD/lustre-2.5.56/libcfs/libcfs/linux/linux-debug.o] Error 1
make[6]: *** Waiting for unfinished jobs....

This is because:

# pwd
/root/kernel/rpmbuild/SOURCES/linux-2.6.32-431.5.1.el6/arch

# find ./arm -name stacktrace.h
./arm/include/asm/stacktrace.h

# find ./powerpc -name stacktrace.h
#

The stacktrace.h is supported by arm (although it does not support dump_trace), but not by powerpc.
So, a check is still needed before "#include <asm/stacktrace.h>" in libcfs/libcfs/linux/linux-debug.c.

Comment by James A Simmons [ 26/Feb/14 ]

Since we are only support dump_trace on X86 anyways this means we can move stacktrace.h and nmi.h to the CONFIG_X86 section of the patch. I pushed a new version of the patch to handle this.

Comment by James A Simmons [ 03/Mar/14 ]

Jian does the updated patch at http://review.whamcloud.com/#/c/8872 fix your build issue now?

Comment by Jian Yu [ 03/Mar/14 ]

Hi James, I was intended to verify the updated patch but did not find time.

Just verified that the compile error was resolved with the patch applied on the master branch. Thanks, James.

Comment by Jodi Levi (Inactive) [ 10/Mar/14 ]

Patch landed to Master.

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