Hi to all, Im using tumbleweed to cross compile linux kernel to lichee pi zero board. I was able to compile u-boot but with the linux kernel I’m having some difficulties. I’m getting this error
CC mm/page_alloc.o
**mm/page_alloc.c:** In function ‘**mem_init_print_info**’:
**mm/page_alloc.c:7515:27:****warning: **comparison between two arrays **-Warray-compare**]
7515 | if (start **<=** pos && pos < end && size > adj) \
| **^~**
**mm/page_alloc.c:7519:9:****note: **in expansion of macro ‘**adj_init_size**’
7519 | **adj_init_size**(__init_begin, __init_end, init_data_size,
| **^~~~~~~~~~~~~**
**mm/page_alloc.c:7515:27:****note: **use ‘**&__init_begin[0] <= &_sinittext[0]**’ to compare the addresses
7515 | if (start **<=** pos && pos < end && size > adj) \
| **^~**
**mm/page_alloc.c:7519:9:****note: **in expansion of macro ‘**adj_init_size**’
7519 | **adj_init_size**(__init_begin, __init_end, init_data_size,
| **^~~~~~~~~~~~~**
**mm/page_alloc.c:7515:41:****warning: **comparison between two arrays **-Warray-compare**]
7515 | if (start <= pos && pos **<** end && size > adj) \
| **^**
**mm/page_alloc.c:7519:9:****note: **in expansion of macro ‘**adj_init_size**’
7519 | **adj_init_size**(__init_begin, __init_end, init_data_size,
| **^~~~~~~~~~~~~**
**mm/page_alloc.c:7515:41:****note: **use ‘**&_sinittext[0] < &__init_end[0]**’ to compare the addresses
7515 | if (start <= pos && pos **<** end && size > adj) \
| **^**
**mm/page_alloc.c:7519:9:****note: **in expansion of macro ‘**adj_init_size**’
7519 | **adj_init_size**(__init_begin, __init_end, init_data_size,
| **^~~~~~~~~~~~~**
**mm/page_alloc.c:7515:27:****warning: **comparison between two arrays **-Warray-compare**]
7515 | if (start **<=** pos && pos < end && size > adj) \
| **^~**
**mm/page_alloc.c:7521:9:****note: **in expansion of macro ‘**adj_init_size**’
7521 | **adj_init_size**(_stext, _etext, codesize, _sinittext, init_code_size);
| **^~~~~~~~~~~~~**
| **^~~~~~~~~~~~~**
**arm-linux-gnueabihf-gcc:****fatal error: **Terminado (killed) signal terminated program cc1
compilation terminated.
make[1]: *** [scripts/Makefile.build:279: mm/page_alloc.o] Error 1
I really don’t know how to solve it because I tried this:
Increased swap memory
2)increased RAM
3)I checked and double check environment variables
4)tried with Linaro
5)used gcc gpp version 7, version 8 (missing version 9)
Could someone point me to the right direction?
Thanks
Gastón
- arm-linux-gnueabihf-gcc: fatal error: Terminado (killed) signal terminated program cc1
- compilation terminated.
- make[1]: *** [scripts/Makefile.build:278: mm/page_alloc.o] Error 1
Im using this page as reference https://zee2.github.io/2020/01/18/licheepi-zero/
I already install gcc7 and g++7 (missing gcc9 and g++9). I already increase swap and RAM memory. I can compile U-Boot but I’m unable to cross compile the linux for lichee pi zero .
Gastón
PS: arvidjaar there is a lot of data in there. I will reboot, compile kernel and share link
Well, when I try to follow steps on page you mentioned it fails at compiling DTD with yylloc redefinition (which appears to be quite popular on ARM platforms). So you probably need to provide more details to allow anyone to (try to) reproduce it. What compiler are you using, where it comes from, how you installed it, how you managed to get past yylloc error etc. Both for host and cross compilers. It does sound like compiler issue, but to make bug report you need to provides exact steps to reproduce it.
...
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
LEX scripts/dtc/dtc-lexer.lex.c
YACC scripts/dtc/dtc-parser.tab.h
HOSTCC scripts/dtc/dtc-lexer.lex.o
YACC scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x20): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:99: scripts/dtc/dtc] Error 1
I was able to compiled U-Boot without any problems. But for linux kernel for the lichee pi zero always got the out of memory error. I was trying to get the gcc9 and g++9 for opensuse but is only experimental.
Thanks
Gastón
Error: ./include/dt-bindings/input/linux-event-codes.h:1.1-3 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:311: arch/arm/boot/dts/sun8i-a23-evb.dtb] Error 1
make: *** [Makefile:1260: dtbs] Error 2
make: *** Se espera a que terminen otras tareas....
HOSTCC scripts/sortextable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/extract-cert
**scripts/extract-cert.c:** In function ‘**display_openssl_errors**’:
**scripts/extract-cert.c:46:2:** **warning: **‘**ERR_get_error_line**’ is deprecated: Since OpenSSL 3.0 **-Wdeprecated-declarations**]
**while** ((e = ERR_get_error_line(&file, &line))) {
**^~~~~**
In file included from **scripts/extract-cert.c:23:0**:
**/usr/include/openssl/err.h:411:15:** **note: **declared here
unsigned long **ERR_get_error_line**(const char **file, int *line);
**^~~~~~~~~~~~~~~~~~**
**scripts/extract-cert.c:** In function ‘**drain_openssl_errors**’:
**scripts/extract-cert.c:59:2:** **warning: **‘**ERR_get_error_line**’ is deprecated: Since OpenSSL 3.0 **-Wdeprecated-declarations**]
**while** (ERR_get_error_line(&file, &line)) {}
**^~~~~**
In file included from **scripts/extract-cert.c:23:0**:
**/usr/include/openssl/err.h:411:15:** **note: **declared here
unsigned long **ERR_get_error_line**(const char **file, int *line);
**^~~~~~~~~~~~~~~~~~**
**scripts/extract-cert.c:** In function ‘**main**’:
**scripts/extract-cert.c:124:3:** **warning: **‘**ENGINE_load_builtin_engines**’ is deprecated: Since OpenSSL 3.0 **-Wdeprecated-declarations**]
**ENGINE_load_builtin_engines**();
**^~~~~~~~~~~~~~~~~~~~~~~~~~~**
In file included from **scripts/extract-cert.c:24:0**:
**/usr/include/openssl/engine.h:358:28:** **note: **declared here
OSSL_DEPRECATEDIN_3_0 void **ENGINE_load_builtin_engines**(void);
**^~~~~~~~~~~~~~~~~~~~~~~~~~~**
**scripts/extract-cert.c:126:3:** **warning: **‘**ENGINE_by_id**’ is deprecated: Since OpenSSL 3.0 **-Wdeprecated-declarations**]
**e** = ENGINE_by_id("pkcs11");
**^**
In file included from **scripts/extract-cert.c:24:0**:
**/usr/include/openssl/engine.h:336:31:** **note: **declared here
OSSL_DEPRECATEDIN_3_0 ENGINE ***ENGINE_by_id**(const char *id);
**^~~~~~~~~~~~**
**scripts/extract-cert.c:128:3:** **warning: **‘**ENGINE_init**’ is deprecated: Since OpenSSL 3.0 **-Wdeprecated-declarations**]
**if** (ENGINE_init(e))
**^~**
In file included from **scripts/extract-cert.c:24:0**:
**/usr/include/openssl/engine.h:620:27:** **note: **declared here
OSSL_DEPRECATEDIN_3_0 int **ENGINE_init**(ENGINE *e);
**^~~~~~~~~~~**
**scripts/extract-cert.c:133:4:** **warning: **‘**ENGINE_ctrl_cmd_string**’ is deprecated: Since OpenSSL 3.0 **-Wdeprecated-declarations**]
**ERR**(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0), "Set PKCS#11 PIN");
**^~~**
In file included from **scripts/extract-cert.c:24:0**:
**/usr/include/openssl/engine.h:479:5:** **note: **declared here
int **ENGINE_ctrl_cmd_string**(ENGINE *e, const char *cmd_name, const char *arg,
**^~~~~~~~~~~~~~~~~~~~~~**
**scripts/extract-cert.c:134:3:** **warning: **‘**ENGINE_ctrl_cmd**’ is deprecated: Since OpenSSL 3.0 **-Wdeprecated-declarations**]
**ENGINE_ctrl_cmd**(e, "LOAD_CERT_CTRL", 0, &parms, NULL, 1);
**^~~~~~~~~~~~~~~**
In file included from **scripts/extract-cert.c:24:0**:
**/usr/include/openssl/engine.h:450:27:** **note: **declared here
OSSL_DEPRECATEDIN_3_0 int **ENGINE_ctrl_cmd**(ENGINE *e, const char *cmd_name,
whay “deprecated: Since OpenSSL 3.0”? how can I fix this??
You seem to misunderstand. I know how to fix it (and it is fixed in current upstream kernel anyway). But you never mentioned before that you did something to fix this error so there may be other steps that you did but never described. Which makes it impossible for anyone to follow what you did.
I download Linaro gcc-linaro-13.0.0-2022.08-x86_64_arm-linux-gnueabihf
There is no such package in Tumbleweed and you do not even say where you downloaded it from. But as the problem looks like compiler problem, you better ask maintainers of this compiler.
It is just a warning, the real problem is failure to compile DTD. Again, it could be result of your modifications (that you never described). But it is something better asked on github site that maintains this linux kernel fork. It is also unclear whether you solved your original problem and have another problem now.
There is nothing openSUSE specific in your questions. Of course you are free to ask anywhere you like, but chances to hit here someone intimately familiar with Linux kernel on this specific ARM board are really small …
You seem to misunderstand. I know how to fix it (and it is fixed in current upstream kernel anyway). But you never mentioned before that you did something to fix this error so there may be other steps that you did but never described. Which makes it impossible for anyone to follow what you did.
You ask for step, i put the step to the main problem which is the momory allocation on opensuse. Then you ask about how I modified the files to make the compilation error gonne away so i put those links and how I modified those files.
so there may be other steps that you did but never described.
No. I just follow the step in the link I give to cross compile the linux kernel.
I know how to fix it (and it is fixed in current upstream kernel anyway)
You may have started with this. If you know how to fixed then you know that I do not add or remove step to be able to compiled this linux kernel. If you already know this then you may know how can I cross compile this linux kernel with tumbleweed. Can you point me to the right direction?
There is no such package in Tumbleweed and you do not even say where you downloaded it from. But as the problem looks like compiler problem, you better ask maintainers of this compiler.
Again, you ask about steps to reproduce the error, and I put the compiler I used to cross compile the linux kernel. Nothing else. I suppose anyone used tumbleweed to cross compile kernels for ARM architecture, How? is it possible? or I just to move foward to another linux distro?
Why this error sames related to memory allocation?
I just said that I was able to cross compile U-Boot so this is not a compiler issue, if that would be the case why will it work with U-Boot?
If you manages to compile or solve this problem, how do you do it?
Gastón
If you manages to compile or solve this problem, how do you do it?
Tumbleweed cross-arm-gcc12 package does not fail compiling mm/page_alloc.c. I am not interested in compiling it further. I also do nor know the difference between various cross-compilers to decide which one (if any) is suitable for compiling your specific kernel. But for me it is sufficient proof that the problem is in the compiler you are using.
Actually Linux ARM kernel is built with -msoft-float option anyway, so toolchain defaulting to hard float is unneeded even though Tumbleweed compiler apparently defaults to hard float as well (judging by the spec file).