Home > Kernel > GT-P6800 Kernel Building Error missing terminating ” character

GT-P6800 Kernel Building Error missing terminating ” character

从三星的https://opensource.samsung.com下载了GT-6800的源码,自己编译了一下,结果Kernel出了个奇怪的错误: ‘error: missing terminating ” character’ 和 ‘error: expected expression before ‘)’ token’, 在网上搜了一圈找到一个解决方法,是因为系统使用的是中文,如果设在为英文环境就好了。

具体错误信息如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
border@b0rder:/bvcom/P6800/GT-P6800_CHN_HC_Opensource/GT-P6800_CHN_Kernel$ make c210_p8_rev01_defconfig
border@b0rder:/bvcom/P6800/GT-P6800_CHN_HC_Opensource/GT-P6800_CHN_Kernel$ make
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      drivers/media/video/samsung/mali/common/mali_kernel_core.o
arm-none-linux-gnueabi-gcc: ": No such file or directory
<command-line>:0: warning: missing terminating " character
drivers/media/video/samsung/mali/common/mali_kernel_core.c: In function 'mali_kernel_constructor':
drivers/media/video/samsung/mali/common/mali_kernel_core.c:172: error: missing terminating " character
drivers/media/video/samsung/mali/common/mali_kernel_core.c:172: error: expected expression before ')' token
make[5]: *** [drivers/media/video/samsung/mali/common/mali_kernel_core.o] 错误 1
make[4]: *** [drivers/media/video/samsung/mali] 错误 2
make[3]: *** [drivers/media/video/samsung] 错误 2
make[2]: *** [drivers/media/video] 错误 2
make[1]: *** [drivers/media] 错误 2
make: *** [drivers] 错误 2

查看一下 drivers/media/video/samsung/mali/common/mali_kernel_core.c 的代码和宏:

1
2
3
4
5
6
    err  = initialize_subsystems();
    if (_MALI_OSK_ERR_OK != err) goto error3;
 
    MALI_PRINT(("Mali device driver %s loaded\n", SVN_REV_STRING));   // 172 line
 
    MALI_SUCCESS;

宏:

1
2
3
4
#define MALI_PRINT(args) do{ \
	MALI_PRINTF(("Mali: ")); \
	MALI_PRINTF(args); \
	} while (0)

看代码没有什么问题, 参考了这里的解决方法: http://bbs.chinaunix.net/thread-2317413-1-1.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
border@b0rder:/bvcom/P6800/GT-P6800_CHN_HC_Opensource/GT-P6800_CHN_Kernel$ locale
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:en
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=
 
border@b0rder:/bvcom/P6800/GT-P6800_CHN_HC_Opensource/GT-P6800_CHN_Kernel$ export LANG=en_US.UTF-8
border@b0rder:/bvcom/P6800/GT-P6800_CHN_HC_Opensource/GT-P6800_CHN_Kernel$ export LANGUAGE=en_US:en
 
border@b0rder:/bvcom/P6800/GT-P6800_CHN_HC_Opensource/GT-P6800_CHN_Kernel$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

重新设置了locale,就可以正常编译通过了,真是奇怪。

参考: http://bbs.chinaunix.net/thread-2317413-1-1.html

–EOF–

  1. No comments yet.
  1. No trackbacks yet.