[LU-4669] compile error on ppc64: __ksymtab_ldiskfs_ext_pblock causes a section type conflict Created: 25/Feb/14 Updated: 10/Nov/14 Resolved: 02/Sep/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.6.0 |
| Fix Version/s: | Lustre 2.7.0, Lustre 2.5.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jian Yu | Assignee: | Jian Yu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Lustre Build: http://build.whamcloud.com/job/lustre-master/1909/ |
||
| Attachments: |
|
| Severity: | 3 |
| Rank (Obsolete): | 12789 |
| 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/ldiskfs/extents.c:4832: error: __ksymtab_ldiskfs_ext_pblock causes a section type conflict /root/lustre-release/build/BUILD/lustre-2.5.55/ldiskfs/extents.c:4832: error: __ksymtab_ldiskfs_ext_pblock causes a section type conflict /root/lustre-release/build/BUILD/lustre-2.5.55/ldiskfs/extents.c:4829: error: __ksymtab_ldiskfs_ext_store_pblock causes a section type conflict /root/lustre-release/build/BUILD/lustre-2.5.55/ldiskfs/extents.c:4829: error: __ksymtab_ldiskfs_ext_store_pblock causes a section type conflict The lbuild log "lbuild.ppc64.log" is attached. |
| Comments |
| Comment by Jian Yu [ 25/Feb/14 ] |
|
This is because the static functions in ldiskfs/ldiskfs_extents.h are exported in ldiskfs/extents.c, which is not allowed by gcc. ldiskfs/ldiskfs_extents.h: static inline ldiskfs_fsblk_t ldiskfs_ext_pblock(struct ldiskfs_extent *ex) //...... static inline void ldiskfs_ext_store_pblock(struct ldiskfs_extent *ex, ldiskfs_fsblk_t pb) //...... ldiskfs/extents.c: EXPORT_SYMBOL(ldiskfs_ext_store_pblock); EXPORT_SYMBOL(ldiskfs_ext_pblock); The above EXPORT_SYMBOL codes were introduced in ldiskfs/kernel_patches/patches/rhel6.4/ext4-misc.patch by patch http://review.whamcloud.com/4804. |
| Comment by Jian Yu [ 26/Feb/14 ] |
|
Besides ldiskfs/extents.c, those exported functions are used in: ldiskfs/move_extent.c lustre/osd-ldiskfs/osd_io.c Since the functions are static inline functions, and ldiskfs/ldiskfs_extents.h is included in lustre/osd-ldiskfs/osd_io.c. I'm going to remove those EXPORT_SYMBOL(...)s from ldiskfs/kernel_patches/patches/rhel6.4/ext4-misc.patch. |
| Comment by Jian Yu [ 26/Feb/14 ] |
|
Here is the patch for master branch: http://review.whamcloud.com/9401 Patch http://review.whamcloud.com/9810 fixes the following compile errors: cc1: warnings being treated as errors /root/lustre-release/build/BUILD/lustre-2.5.55/lustre/lmv/lmv_obd.c:2329: error: 'lmv_adjust_dirpages' defined but not used make[6]: *** [/root/lustre-release/build/BUILD/lustre-2.5.55/lustre/lmv/lmv_obd.o] Error 1 Patch http://review.whamcloud.com/9811 fixes the following compile errors: cc1: warnings being treated as errors ../../lustre/ldlm/ldlm_request.c: In function 'ldlm_cli_enqueue_fini': ../../lustre/ldlm/ldlm_request.c:614: error: format '%llx' expects type 'long long unsigned int', but argument 5 has type '__u64' ../../lustre/ldlm/ldlm_request.c: In function 'ldlm_cli_enqueue': ../../lustre/ldlm/ldlm_request.c:925: error: format '%llx' expects type 'long long unsigned int', but argument 4 has type '__u64' ../../lustre/ldlm/ldlm_request.c:925: error: format '%llx' expects type 'long long unsigned int', but argument 3 has type '__u64' make[4]: *** [libptlrpc_a-ldlm_request.o] Error 1 make[4]: *** Waiting for unfinished jobs.... cc1: warnings being treated as errors ../../lustre/ldlm/ldlm_flock.c: In function 'ldlm_flock_destroy': ../../lustre/ldlm/ldlm_flock.c:142: error: format '%llx' expects type 'long long unsigned int', but argument 5 has type '__u64' ../../lustre/ldlm/ldlm_flock.c:142: error: format '%llx' expects type 'long long unsigned int', but argument 4 has type '__u64' ../../lustre/ldlm/ldlm_flock.c: In function 'ldlm_process_flock_lock': ../../lustre/ldlm/ldlm_flock.c:312: error: format '%#llx' expects type 'long long unsigned int', but argument 3 has type '__u64' ../../lustre/ldlm/ldlm_flock.c: In function 'ldlm_flock_completion_ast': ../../lustre/ldlm/ldlm_flock.c:676: error: format '%llx' expects type 'long long unsigned int', but argument 3 has type '__u64' make[4]: *** [libptlrpc_a-ldlm_flock.o] Error 1 |
| Comment by Jian Yu [ 18/Jul/14 ] |
|
All of the patches in this ticket were landed on master branch. |
| Comment by Jian Yu [ 27/Oct/14 ] |
|
Here are the back-ported patches for Lustre b2_5 branch: The issue fixed http://review.whamcloud.com/9810 does not exist on Lustre b2_5 branch. |