Compiling errors for ARM device....

Gamerjin

Well-Known Member
OP
Member
Joined
May 25, 2016
Messages
2,758
Trophies
1
XP
6,427
Country
United States
Hello one and all!
I am having trouble figuring out what is going wrong with 'make' compiling a image for micro-sd card.
For those who are familiar with Libreelec, the latest one has the emulators built right it.
So for those who are not, in short its a media center(kodi) with emulators(retroarch) combined.

i have tried using google for answer, but its not being helpful, its keep referring to C+ errors or anything NOT arm related...
so for those of you who would say 'use google', i have. (and i'm almost positive someone will say it.)
and while i know i'm a beginning to this, the only reason why i'm doing this is because no one has compiled it for a cubox-i ARM device.

now then, to the problem...
here and there several error messages pop up:
make [2]: warning: jobserver unavailable: using -j1. add '+' to parent make rule. (x8-10)
../libcrypto.so: file not recognized: file truncated
collect2: error: ld returned 1 exit status
make[3]: *** [../MakeFile.shared:167: link_o.gnu] Error 1
make[2]: *** [MakeFile:76: Lib] Error 2
make[1]: *** [MakeFile:291: build_engines] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [release] error 2

currently using Ubuntu 16.04 LTS server addition, dual core.
so, what did google not tell me?
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,252
Trophies
4
Location
Space
XP
13,805
Country
Norway
Wow, interesting. I hadn't heard of LibreELEC yet, but my Raspberry Pi 2 is running OpenELEC, with RetroPie added onto it by using a custom install script I found online and a Kodi addon to switch between them. I might switch to this instead.
I'll see if I can compile it, and get back to you.

Edit: @Gamerjin What commands do you use to configure and compile?
I mean all the commands mentioned in step 5 onwards here, plus any additional commands not mentioned there (if any): https://wiki.libreelec.tv/index.php?title=Compile

Edit2: You may need to have build-essential installed, though it's not mentioned on that page.
 
Last edited by The Real Jdbye,

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,564
Country
Chile
Hello one and all!
I am having trouble figuring out what is going wrong with 'make' compiling a image for micro-sd card.
For those who are familiar with Libreelec, the latest one has the emulators built right it.
So for those who are not, in short its a media center(kodi) with emulators(retroarch) combined.

i have tried using google for answer, but its not being helpful, its keep referring to C+ errors or anything NOT arm related...
so for those of you who would say 'use google', i have. (and i'm almost positive someone will say it.)
and while i know i'm a beginning to this, the only reason why i'm doing this is because no one has compiled it for a cubox-i ARM device.

now then, to the problem...
here and there several error messages pop up:
make [2]: warning: jobserver unavailable: using -j1. add '+' to parent make rule. (x8-10)
../libcrypto.so: file not recognized: file truncated
collect2: error: ld returned 1 exit status
make[3]: *** [../MakeFile.shared:167: link_o.gnu] Error 1
make[2]: *** [MakeFile:76: Lib] Error 2
make[1]: *** [MakeFile:291: build_engines] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [release] error 2

currently using Ubuntu 16.04 LTS server addition, dual core.
so, what did google not tell me?

Hello I hope this answer provides what you are looking for:


1) Meaning of the compiler output:
.so / .o / or other extensions generated from cc/g++ is the compiled object format

.a is the archive (library) of symbols/objects (through a header file declaration you can link these objects against the final object output (machine code with header, commonly))


years ago another user had (somehow) a similar question, except the compiler was not ranting that time:

https://gbatemp.net/threads/homebrew-development.360646/page-228#post-6048912


2) ../libcrypto.so: file not recognized: file truncated

corrupted object generated, used an old ABI format to build that. Use the above steps to decompile the library (.a) if any. Otherwise get the source code and recompile. (remember to add the ARM CPU flags while compiling (generating) those objects.

An example for ARM9 (NDS) flags you must pass to Makefile:

Code:
CFLAGS     =  -marm -mcpu=arm946e-s -mtune=arm946e-s

edit: the default rule for Makefile feeds $(CFLAGS) to cc (compiler for C)

That way the ABI will generate a correct object file (from .c sources), and CPU specific.
 
Last edited by Coto, , Reason: added compile / linker info

Gamerjin

Well-Known Member
OP
Member
Joined
May 25, 2016
Messages
2,758
Trophies
1
XP
6,427
Country
United States
Wow, interesting. I hadn't heard of LibreELEC yet, but my Raspberry Pi 2 is running OpenELEC, with RetroPie added onto it by using a custom install script I found online and a Kodi addon to switch between them. I might switch to this instead.
I'll see if I can compile it, and get back to you.

Edit: @Gamerjin What commands do you use to configure and compile?
I mean all the commands mentioned in step 5 onwards here, plus any additional commands not mentioned there (if any): https://wiki.libreelec.tv/index.php?title=Compile

Edit2: You may need to have build-essential installed, though it's not mentioned on that page.

ok, well starting from the top...:
the command line used was 'PROJECT=imx6 ARCH=arm LINUX_VERSION=sr-3.14' since it mention solidrun (who i got the cubox-i from...)
as for config, i went the default, so IF it successfully compiled, i could look into customize it...

would it help if i log the result to a text file, zip it, and (i think) upload it to filetrip?



(remember to add the ARM CPU flags while compiling (generating) those objects.
i tried running a search for 'arm compiler flags' and got this website: "https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html"
but i got confused reading that page, i not sure what cubox-i arm type is....
i will have to look into that...

edit: found it: Cortex-A9
so in that case should i change the command to:
"PROJECT=imx6 ARCH=arm LINUX_VERSION=sr-3.14 MTUNE=Cortex-A9" ?


and finally.....thank you both for your help
 
Last edited by Gamerjin,

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,252
Trophies
4
Location
Space
XP
13,805
Country
Norway
ok, well starting from the top...:
the command line used was 'PROJECT=imx6 ARCH=arm LINUX_VERSION=sr-3.14' since it mention solidrun (who i got the cubox-i from...)
as for config, i went the default, so IF it successfully compiled, i could look into customize it...

would it help if i log the result to a text file, zip it, and (i think) upload it to filetrip?




i tried running a search for 'arm compiler flags' and got this website: "https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html"
but i got confused reading that page, i not sure what cubox-i arm type is....
i will have to look into that...

edit: found it: Cortex-A9
so in that case should i change the command to:
"PROJECT=imx6 ARCH=arm LINUX_VERSION=sr-3.14 MTUNE=Cortex-A9" ?


and finally.....thank you both for your help
Trying to compile it now with the "PROJECT=imx6 ARCH=arm LINUX_VERSION=sr-3.14 MTUNE=Cortex-A9" flags, I'll let you know if I'm successful, and if not I'll look for workarounds. It might take a while though.
 

Gamerjin

Well-Known Member
OP
Member
Joined
May 25, 2016
Messages
2,758
Trophies
1
XP
6,427
Country
United States
Trying to compile it now with the "PROJECT=imx6 ARCH=arm LINUX_VERSION=sr-3.14 MTUNE=Cortex-A9" flags, I'll let you know if I'm successful, and if not I'll look for workarounds. It might take a while though.

i know what you mean, it took me around 5-7 hours first time.
 

Gamerjin

Well-Known Member
OP
Member
Joined
May 25, 2016
Messages
2,758
Trophies
1
XP
6,427
Country
United States
@The Real Jdbye
i forgot to ask...what environment are you building with? Ubuntu, Lbuntu, maybe mint?

it maybe not important, but i didnt use git to get the source code.
so, maybe that why i haven't gotten that error yet?
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,252
Trophies
4
Location
Space
XP
13,805
Country
Norway
@The Real Jdbye
i forgot to ask...what environment are you building with? Ubuntu, Lbuntu, maybe mint?

it maybe not important, but i didnt use git to get the source code.
so, maybe that why i haven't gotten that error yet?
Ubuntu 16.04 in WSL.
I can't find anything about that error, so I'm not sure how to fix it.
But it must be related to one of these files:
./build.LibreELEC-imx6.arm-9.0-devel/openssl-1.0.2k/.x86_64-linux-gnu/libcrypto.a
./build.LibreELEC-imx6.arm-9.0-devel/openssl-1.0.2k/.x86_64-linux-gnu/libcrypto.pc
./build.LibreELEC-imx6.arm-9.0-devel/openssl-1.0.2k/.x86_64-linux-gnu/libcrypto.so
./build.LibreELEC-imx6.arm-9.0-devel/openssl-1.0.2k/.x86_64-linux-gnu/libcrypto.so.1.0.0
./build.LibreELEC-imx6.arm-9.0-devel/toolchain/lib/libcrypto.a
./build.LibreELEC-imx6.arm-9.0-devel/toolchain/lib/libcrypto.so
./build.LibreELEC-imx6.arm-9.0-devel/toolchain/lib/libcrypto.so.1.0.0
./build.LibreELEC-imx6.arm-9.0-devel/toolchain/lib/pkgconfig/libcrypto.pc
I'm sure your error and mine are related somehow. Kind of seems like there's just something wrong with the latest commit.
 
Last edited by The Real Jdbye,

Gamerjin

Well-Known Member
OP
Member
Joined
May 25, 2016
Messages
2,758
Trophies
1
XP
6,427
Country
United States
"LibreELEC-imx6.arm-9.0-devel" ?

when i compiled i got:
"LibreELEC-imx6.arm-8.0-devel"

perhaps i need to update my source code and try again?
 

Gamerjin

Well-Known Member
OP
Member
Joined
May 25, 2016
Messages
2,758
Trophies
1
XP
6,427
Country
United States
"Ubuntu 16.04 in WSL." as in you're using Bash within Windows 10? if that's the case, you must have windows insider's edtition.

moving on....
re-acquired the source code, and.......compiling it.

will report what errors i find...

Edit: ok, its stuck at
cannot find find -lcrypto
collect2: error: ld returned 1 exit status

running 'make clean' and retrying...
 
Last edited by Gamerjin,

Gamerjin

Well-Known Member
OP
Member
Joined
May 25, 2016
Messages
2,758
Trophies
1
XP
6,427
Country
United States
**last update**

Well, after running 'make', 'make clean', script clean *insert trouble module name here*', re-acquiring the source three time, and making sure my linux server is up to date.

.....

I give up...
so for those who tried to help me, and you know who you are. Thank you for your help.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/IihvJBjUpNE?si=CsvoEbwzNKFf0GAm cool