Compiling errors for ARM device....

  • Thread starter Thread starter Gamerjin
  • Start date Start date
  • Views Views 3,067
  • Replies Replies 16

Gamerjin

No emulator code questions
Member
GBAtemp Patron
Joined
May 25, 2016
Messages
3,567
Reaction score
5,402
Trophies
3
XP
8,899
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?
 
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,
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
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,
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.
 
@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,
"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?
Perhaps, I used the latest commit, it should be updated frequently. There's probably an even newer version than what I have.
 
"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,
**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.
 
Did you ask at the XDA forum? We're just script kiddies here, all the good stuff is on specialized forums.
 

Site & Scene News

Popular threads in this forum