Skip to content
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

在内核5.4.268环境下-编译错误 #15

Open
kelo2014 opened this issue Aug 22, 2024 · 2 comments
Open

在内核5.4.268环境下-编译错误 #15

kelo2014 opened this issue Aug 22, 2024 · 2 comments

Comments

@kelo2014
Copy link

环境:
CentOS Linux release 7.9.2009 (Core)
CentOS Linux (5.4.268-1.el7.elrepo.x86_64) 7 (Core)

编译报如下错误:
make CONFIG_TOA=m -C /lib/modules/uname -r/build M=pwd modules
make[1]: Entering directory `/usr/src/kernels/5.4.268-1.el7.elrepo.x86_64'
CC [M] /share/kernel2/TCP_option_address-master/src/toa.o
In file included from :0:0:
./arch/x86/include/asm/page_64.h: In function ‘clear_page’:
././include/linux/compiler_types.h:214:24: error: expected ‘(’ before ‘__inline’
#define asm_inline asm __inline
^
./arch/x86/include/asm/alternative.h:256:2: note: in expansion of macro ‘asm_inline’
asm_inline volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,
^
./arch/x86/include/asm/page_64.h:49:2: note: in expansion of macro ‘alternative_call_2’
alternative_call_2(clear_page_orig,
^
In file included from ./arch/x86/include/asm/barrier.h:5:0,
from ./include/linux/compiler.h:325,
from ./include/linux/init.h:5,
from /share/kernel2/TCP_option_address-master/src/toa.h:4,
from /share/kernel2/TCP_option_address-master/src/toa.c:1:
./arch/x86/include/asm/alternative.h:128:2: error: expected identifier or ‘(’ before string constant
"# ALT: oldinstr2\n"
^
./arch/x86/include/asm/alternative.h:168:2: note: in expansion of macro ‘OLDINSTR_2’
OLDINSTR_2(oldinstr, 1, 2)
^
./arch/x86/include/asm/alternative.h:256:23: note: in expansion of macro ‘ALTERNATIVE_2’
asm_inline volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,
^
./arch/x86/include/asm/page_64.h:49:2: note: in expansion of macro ‘alternative_call_2’
alternative_call_2(clear_page_orig,
^
In file included from :0:0:
././include/linux/compiler_types.h:214:24: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#define asm_inline asm __inline
^
./arch/x86/include/asm/alternative.h:256:2: note: in expansion of macro ‘asm_inline’
asm_inline volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,
^
./arch/x86/include/asm/page_64.h:49:2: note: in expansion of macro ‘alternative_call_2’
alternative_call_2(clear_page_orig,
^
"output.log" 7019L, 343872C
error.log

@kelo2014
Copy link
Author

求指导

@kelo2014
Copy link
Author

4.19内核环境编译成功

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant