Compiling errors for ARM device....

Discussion in 'Computer Programming, Emulation, and Game Modding' started by Gamerjin, Apr 26, 2017.

  1. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    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?
     
  2. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,439
    4,753
    Mar 17, 2010
    Norway
    Alola
    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, Apr 26, 2017
  3. Coto

    Coto GBAtemp Addict

    Member
    2,343
    394
    Jun 4, 2010
    Chile
    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, Apr 27, 2017 - Reason: added compile / linker info
  4. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    United States
    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
     
    Last edited by Gamerjin, Apr 27, 2017
  5. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,439
    4,753
    Mar 17, 2010
    Norway
    Alola
    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.
     
  6. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    United States
    i know what you mean, it took me around 5-7 hours first time.
     
  7. Coto

    Coto GBAtemp Addict

    Member
    2,343
    394
    Jun 4, 2010
    Chile
    I have updated some definitions a bit (even for the older post!).
     
  8. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    United States
    ???
     
  9. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,439
    4,753
    Mar 17, 2010
    Norway
    Alola
    I get a different error, but also related to libcrypto.so:
     
  10. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    United States
    maybe "libcrypto.so" dislikes me?
     
  11. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    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?
     
  12. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,439
    4,753
    Mar 17, 2010
    Norway
    Alola
    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:
    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, Apr 28, 2017
  13. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    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?
     
  14. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,439
    4,753
    Mar 17, 2010
    Norway
    Alola
    Perhaps, I used the latest commit, it should be updated frequently. There's probably an even newer version than what I have.
     
  15. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    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, Apr 29, 2017
  16. Gamerjin
    OP

    Gamerjin Advanced Member

    Newcomer
    74
    9
    May 25, 2016
    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.
     
  17. Futurdreamz

    Futurdreamz GBAtemp Advanced Maniac

    Member
    1,615
    902
    Jun 15, 2014
    Canada
    Did you ask at the XDA forum? We're just script kiddies here, all the good stuff is on specialized forums.