标题: 移植OpenHarmony,新建的linux kernel defcongfig 编译过程中出现如下错误`/tmp/vgettimeofday-72c2d7.s:4: Error: junk at end of line, first unrecognized character is ` 请问如何解决 [打印本页] 作者: xuxiyang 时间: 2024-3-28 16:01 标题: 移植OpenHarmony,新建的linux kernel defcongfig 编译过程中出现如下错误`/tmp/vgettimeofday-72c2d7.s:4: Error: junk at end of line, first unrecognized character is ` 请问如何解决 [md][OHOS ERROR] UPD include/generated/asm-offsets.h
[OHOS ERROR] CALL /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/kernel/linux-5.10/scripts/checksyscalls.sh
[OHOS ERROR] CALL /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/kernel/linux-5.10/scripts/atomic/check-atomics.sh
[OHOS ERROR] LDS arch/arm64/kernel/vdso/vdso.lds
[OHOS ERROR] CC arch/arm64/kernel/vdso/vgettimeofday.o
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s: Assembler messages:
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:3: Error: junk at end of line, first unrecognized character is `"' [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:3: Error: file number less than one [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:4: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:5: Error: junk at end of line, first unrecognized character is `"' [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:6: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:7: Error: junk at end of line, first unrecognized character is `"' [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:13: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:35: Error: junk at end of line, first unrecognized character is `"' [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:142: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:186: Error: junk at end of line, first unrecognized character is `"' [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:233: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:285: Error: junk at end of line, first unrecognized character is `"' [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:1159: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:1160: Error: junk at end of line, first unrecognized character is `"' [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:1161: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:1162: Error: junk at end of line, first unrecognized character is `"' [OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:1163: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] /tmp/vgettimeofday-72c2d7.s:1819: Error: junk at end of line, first unrecognized character is `"'
[OHOS ERROR] clang-15: error: assembler command failed with exit code 1 (use -v to see invocation)
[OHOS ERROR] make[3]: *** [/home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/kernel/linux-5.10/scripts/Makefile.build:294: arch/arm64/kernel/vdso/vgettimeofday.o] Error 1
[OHOS ERROR] make[2]: *** [arch/arm64/Makefile:186: vdso_prepare] Error 2
[OHOS ERROR] make[2]: Leaving directory '/home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/kernel/OBJ/linux-5.10'
[OHOS ERROR] make[1]: *** [Makefile:185: __sub-make] Error 2
[OHOS ERROR] make[1]: Leaving directory '/home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/kernel/linux-5.10'
[OHOS ERROR] make: *** [kernel.mk:83: /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/kernel/linux-5.10/arch/arm64/boot/Image] Error 2
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/services/ninja.py", line 49, in _execute_ninja_cmd
[OHOS ERROR] SystemUtil.exec_command(
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/util/system_util.py", line 63, in exec_command
[OHOS ERROR] raise OHOSException(
[OHOS ERROR] exceptions.ohos_exception.OHOSException: Please check build log in /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/build.log
[OHOS ERROR]
[OHOS ERROR] During handling of the above exception, another exception occurred:
[OHOS ERROR]
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/containers/status.py", line 47, in wrapper
[OHOS ERROR] return func(*args, **kwargs)
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/modules/ohos_build_module.py", line 67, in run
[OHOS ERROR] raise exception
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/modules/ohos_build_module.py", line 65, in run
[OHOS ERROR] super().run()
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/modules/interface/build_module_interface.py", line 72, in run
[OHOS ERROR] raise exception
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/modules/interface/build_module_interface.py", line 70, in run
[OHOS ERROR] self._target_compilation()
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/modules/ohos_build_module.py", line 103, in _target_compilation
[OHOS ERROR] self.target_compiler.run()
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/services/ninja.py", line 38, in run
[OHOS ERROR] self._execute_ninja_cmd()
[OHOS ERROR] File "/home/young/harmony_ax650/build/hb/services/ninja.py", line 52, in _execute_ninja_cmd
[OHOS ERROR] raise OHOSException('ninja phase failed', '4000')
[OHOS ERROR] exceptions.ohos_exception.OHOSException: ninja phase failed
[OHOS ERROR]
[OHOS ERROR] Code: 4000
[OHOS ERROR]
[OHOS ERROR] Reason: ninja phase failed
[OHOS ERROR]
[OHOS ERROR] Solution: Please check the compile log at out/{compiling product}/build.log, If you could analyze build logs.
[OHOS ERROR] Or you can try the following steps to solve this problem:
[OHOS ERROR] 1. cd to OHOS root path
[OHOS ERROR] 2. run 'hb clean --all' or 'rm -rf out build/resources/args/*.json'.
[OHOS ERROR] 3. repo sync
[OHOS ERROR] 4. repo forall -c 'git lfs pull'
[OHOS ERROR] 5. bash build/prebuilts_download.sh
[OHOS ERROR] 6. rebuild your product or component
[OHOS ERROR]
[OHOS ERROR] If you still cannot solve this problem, you could post this problem on:
[OHOS ERROR] https://gitee.com/openharmony/build/issues
[/md]作者: 论坛小助手 时间: 2024-4-16 10:00
错误指出在/tmp/vgettimeofday-72c2d7.s文件中有多个行出现了“junk at end of line, first unrecognized character is '`”这样的错误信息,可能是汇编器(Assembler)在处理源代码时遇到了无法识别的字符或格式错误,建议检查以下