-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZFS kernel built-in failure during compilation. #3546
Comments
|
Not a problem with GCC v5.1 as I have this same error with GCC v4.9.2 on Kernel v4.1.1. Using nornal compile as always. I have built in the module for the v4.0.x series of kernels no problem. |
|
Since I said earlier that it worked on the 4.0.x kernels. I looked at all commits of ZFS and the kernel. Nothing changes for ZFS in dealing with Trace, but ftrace.h has this patch that is not even in the latest stable 4.0.7 kernel: Looks like code depending on this header needs to take this into account. Read more here: |
|
I thought as much. Guess I can rebuild LFS against an older kernel to double check. Sent from my Windows Phone From: Jonathan Scruggsmailto:notifications@github.com Not a problem with GCC v5.1 as I have this same error with GCC v4.9.2 on Kernel v4.1.1. Using nornal compile as always. I have built in the module for the v4.0.x series of kernels no problem. Reply to this email directly or view it on GitHub: |
|
I'll see about using it to make a patch to see if it fixes things. Thanks again. Sent from my Windows Phone From: Jonathan Scruggsmailto:notifications@github.com Since I said earlier that it worked on the 4.0.x kernels. I looked at all commits of ZFS and the kernel. Nothing changes for ZFS in dealing with Trace, but ftrace.h has this patch that is not even in the latest stable 4.0.7 kernel: That patch is what is breaking this. Either code depending on this header file need to somehow take this into account, or this is a bug upstream in the kernel. Reply to this email directly or view it on GitHub: |
|
@reaperx7 I updated my comment as it's now correct information in it. :) Also, it works if you compile outside the kernel as a module, but I too want it built in to the kernel. Also, heads up: the ftrace.h has been renamed to trace_events.h in kernel 4.2. |
|
The issue is that there are several Because ZFS module includes it several times, the function The solution (see pull request), is to add 2 lines in each problem solved. |
See also openzfs#3546, @c1718e9 Signed-off-by: Chris Dunlop <chris@onthe.net.au>
See also openzfs#3546, commit c1718e9 Signed-off-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#3673
OS: LinuxFromScratch-SVN-20150630
Compiler: GCC-5.1.0
Kernel: 4.1.1
SPL: 0.6.4.2
ZFS: 0.6.4.2
I was trying to build a kernel for my system with ZFS built-in when I got this error during the kernel build phase. I was using make with -j1 to avoid any issues with the build if at all possible. Here's the error readout:
CC fs/zfs/zfs/trace.o
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_acl.h:160,
from fs/zfs/zfs/trace.c:40:
include/trace/ftrace.h:25:23: error: redefinition of 'str__zfs__trace_system_name'
#define app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace.h:66,
from fs/zfs/zfs/trace.c:39:
include/trace/ftrace.h:25:23: note: previous definition of 'str__zfs__trace_system_name' was here
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_arc.h:426,
from fs/zfs/zfs/trace.c:41:
include/trace/ftrace.h:25:23: error: redefinition of 'str__zfs__trace_system_name'
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_acl.h:160,
from fs/zfs/zfs/trace.c:40:
include/trace/ftrace.h:25:23: note: previous definition of 'str__zfs__trace_system_name' was here
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_dbuf.h:97,
from fs/zfs/zfs/trace.c:42:
include/trace/ftrace.h:25:23: error: redefinition of 'str__zfs__trace_system_name'
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_arc.h:426,
from fs/zfs/zfs/trace.c:41:
include/trace/ftrace.h:25:23: note: previous definition of 'str__zfs__trace_system_name' was here
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_dmu.h:115,
from fs/zfs/zfs/trace.c:43:
include/trace/ftrace.h:25:23: error: redefinition of 'str__zfs__trace_system_name'
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_dbuf.h:97,
from fs/zfs/zfs/trace.c:42:
include/trace/ftrace.h:25:23: note: previous definition of 'str__zfs__trace_system_name' was here
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_dnode.h:115,
from fs/zfs/zfs/trace.c:44:
include/trace/ftrace.h:25:23: error: redefinition of 'str__zfs__trace_system_name'
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_dmu.h:115,
from fs/zfs/zfs/trace.c:43:
include/trace/ftrace.h:25:23: note: previous definition of 'str__zfs__trace_system_name' was here
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_txg.h:70,
from fs/zfs/zfs/trace.c:45:
include/trace/ftrace.h:25:23: error: redefinition of 'str__zfs__trace_system_name'
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_dnode.h:115,
from fs/zfs/zfs/trace.c:44:
include/trace/ftrace.h:25:23: note: previous definition of 'str__zfs__trace_system_name' was here
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_zil.h:125,
from fs/zfs/zfs/trace.c:46:
include/trace/ftrace.h:25:23: error: redefinition of 'str__zfs__trace_system_name'
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_txg.h:70,
from fs/zfs/zfs/trace.c:45:
include/trace/ftrace.h:25:23: note: previous definition of 'str__zfs__trace_system_name' was here
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_zrlock.h:82,
from fs/zfs/zfs/trace.c:47:
include/trace/ftrace.h:25:23: error: redefinition of 'str__zfs__trace_system_name'
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro 'app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
In file included from include/trace/define_trace.h:90:0,
from ./include/zfs/sys/trace_zil.h:125,
from fs/zfs/zfs/trace.c:46:
include/trace/ftrace.h:25:23: note: previous definition of 'str__zfs__trace_system_name' was here
#define __app(x, y) str__##x##y
^
include/trace/ftrace.h:26:21: note: in expansion of macro 'app'
#define app(x, y) __app(x, y)
^
include/trace/ftrace.h:28:29: note: in expansion of macro '__app'
#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
^
include/trace/ftrace.h:31:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
static const char TRACE_SYSTEM_STRING[] =
^
include/trace/ftrace.h:34:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
TRACE_MAKE_SYSTEM_STR();
^
scripts/Makefile.build:258: recipe for target 'fs/zfs/zfs/trace.o' failed
make[3]: *** [fs/zfs/zfs/trace.o] Error 1
scripts/Makefile.build:403: recipe for target 'fs/zfs/zfs' failed
make[2]: *** [fs/zfs/zfs] Error 2
scripts/Makefile.build:403: recipe for target 'fs/zfs' failed
make[1]: *** [fs/zfs] Error 2
Makefile:946: recipe for target 'fs' failed
make: *** [fs] Error 2
Is this a problem with GCC-5.1.0 and can this be patched? If any further information is needed, please let me know.
Thanks,
Jim
The text was updated successfully, but these errors were encountered: