[LU-7042] config.h header conflict with OFED 3.18 Created: 25/Aug/15 Updated: 11/Jul/17 Resolved: 19/Sep/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Chris Horn | Assignee: | Dmitry Eremin (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
This issue was mentioned on the mailing list, but we just hit it ourselves attempting to build Lustre 2.7 on SLES 12 with OFED 3.18. [ 128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42: [ 128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:398:0: error: "PACKAGE_BUGREPORT" redefined [-Werror] [ 128s] #define PACKAGE_BUGREPORT "http://bugs.openfabrics.org/bugzilla" [ 128s] ^ [ 128s] In file included from <command-line>:0:0: [ 128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:558:0: note: this is the location of the previous definition [ 128s] #define PACKAGE_BUGREPORT "https://jira.hpdd.intel.com/" [ 128s] ^ [ 128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42: [ 128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:401:0: error: "PACKAGE_NAME" redefined [-Werror] [ 128s] #define PACKAGE_NAME "compat_ofa" [ 128s] ^ [ 128s] In file included from <command-line>:0:0: [ 128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:561:0: note: this is the location of the previous definition [ 128s] #define PACKAGE_NAME "Lustre" [ 128s] ^ [ 128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42: [ 128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:404:0: error: "PACKAGE_STRING" redefined [-Werror] [ 128s] #define PACKAGE_STRING "compat_ofa 1.0" [ 128s] ^ [ 128s] In file included from <command-line>:0:0: [ 128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:564:0: note: this is the location of the previous definition [ 128s] #define PACKAGE_STRING "Lustre LUSTRE_VERSION" [ 128s] ^ [ 128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42: [ 128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:407:0: error: "PACKAGE_TARNAME" redefined [-Werror] [ 128s] #define PACKAGE_TARNAME "compat_ofa" [ 128s] ^ [ 128s] In file included from <command-line>:0:0: [ 128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:567:0: note: this is the location of the previous definition [ 128s] #define PACKAGE_TARNAME "lustre" [ 128s] ^ [ 128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67, [ 128s] from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42: [ 128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:413:0: error: "PACKAGE_VERSION" redefined [-Werror] [ 128s] #define PACKAGE_VERSION "1.0" [ 128s] ^ [ 128s] In file included from <command-line>:0:0: [ 128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:573:0: note: this is the location of the previous definition [ 128s] #define PACKAGE_VERSION "LUSTRE_VERSION" [ 128s] ^ It seems OFED 3.18 now automatically generates a config.h in the same fashion that Lustre does, and these PACKAGE_* defines in the two config.h files are conflicting. |
| Comments |
| Comment by James A Simmons [ 26/Aug/15 ] |
|
That is resulting from the macro AC_PACKAGE_NAME which is pretty standard in usage. |
| Comment by James A Simmons [ 28/Aug/15 ] |
|
Hmmm. The only solution I can think of is doing #undef PACKAGE_XXX after #include <compact-2.6.h> |
| Comment by Gerrit Updater [ 11/Sep/15 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/16381 |
| Comment by Gerrit Updater [ 14/Sep/15 ] |
|
Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/16418 |
| Comment by Dmitry Eremin (Inactive) [ 14/Sep/15 ] |
|
This is very serious issue because of all checks will fail if they include <compact-2.6.h> which redefine PACKAGE_* macros. | /* confdefs.h. */ | #define PACKAGE_NAME "Lustre" | #define PACKAGE_TARNAME "lustre" | #define PACKAGE_VERSION "LUSTRE_VERSION" | #define PACKAGE_STRING "Lustre LUSTRE_VERSION" | #define PACKAGE_BUGREPORT "https://jira.hpdd.intel.com/" | #define PACKAGE "lustre" | #define VERSION "2.7.59" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define SIZEOF_UNSIGNED_LONG_LONG 8 | #define HAVE_MODULE_LOADING_SUPPORT 1 | #define STACKTRACE_OPS_HAVE_WALK_STACK 1 | #define HAVE_SHRINKER_WANT_SHRINK_PTR 1 | #define HAVE_SYSCTL_CTLNAME 1 | #define HAVE_KSTRTOUL 1 | #define HAVE_STACKTRACE_WARNING 1 | #define HAVE_CRC32 1 | #define NEED_CRC32_ACCEL 1 | #define HAVE_HLIST_ADD_AFTER 1 | #define CPU_AFFINITY 1 | #define HAVE_COMPAT_RDMA 1 | #define HAVE_KTHREAD_WORK 1 | #define HAVE_RDMA_CREATE_ID_4ARG 1 | /* end confdefs.h. */ | | #include <linux/kernel.h> | | #ifdef HAVE_COMPAT_RDMA | #include <linux/compat-2.6.h> | #endif | #include <rdma/ib_verbs.h> | | int | main (void) | { | | struct ib_cq_init_attr cq_attr; | | cq_attr.comp_vector = NULL; | | ; | return 0; | } My patch resolve this issue. |
| Comment by Gerrit Updater [ 19/Sep/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16418/ |
| Comment by Peter Jones [ 19/Sep/15 ] |
|
Landed for 2.8 |