Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 08 17:43
    allexk opened #607
  • Aug 03 19:12
    MikeRavenelle opened #606
  • Jul 29 09:55
    xilutian opened #605
  • Jul 29 07:26
    IO-create opened #604
  • Jul 27 04:27
    Jusedawg commented #475
  • Jul 26 10:01
    balintturueb edited #600
  • Jul 26 10:00
    balintturueb edited #600
  • Jul 26 09:59
    balintturueb commented #600
  • Jul 26 09:59
    balintturueb reopened #600
  • Jul 24 16:58
    hwhsu1231 edited #603
  • Jul 23 10:42
    oglimmer opened #69
  • Jul 23 07:16
    hwhsu1231 commented #603
  • Jul 23 05:17
    hwhsu1231 opened #603
  • Jul 22 06:22
    Crisliu7 closed #602
  • Jul 22 06:22
    Crisliu7 commented #602
  • Jul 22 01:42
    Crisliu7 opened #602
  • Jul 21 02:49
    TeslaHou opened #601
  • Jul 20 16:29
    balintturueb closed #600
  • Jul 20 16:29
    balintturueb commented #600
  • Jul 20 16:00
    balintturueb opened #600
AlexandreHURDYK
@AlexandreHURDYK
It's not a specific distribution : it's something specifically made by my company. It's just a 32 bits ARM Linux at core.
mmn
@mmn:matrix.org
[m]
And with what exactly in the process 1) install the dependencies (cmake, compiler etc.) 2) run cmake 3) run make are you having issues?
AlexandreHURDYK
@AlexandreHURDYK

Well first we tried to run the following commands :

$ git clone https://github.com/oatpp/oatpp.git
$ cd oatpp/
$ unset LD_LIBRARY_PATH
$ source /opt/phytec-yogurt/BSP-Yocto-i.MX6-PD18.1.1/environment-setup-cortexa9hf-neon-phytec-linux-gnueabi
$ mkdir build && cd build
$ cmake .. 
$ make install

Cmake build worked, but linux compilation in our program failed. We discovered that it was because these libraries were in 64 bits instead of 32 bits. So we tried this :

$ git clone https://github.com/oatpp/oatpp.git
$ cd oatpp/
$ unset LD_LIBRARY_PATH
$ source /opt/phytec-yogurt/BSP-Yocto-i.MX6-PD18.1.1/environment-setup-cortexa9hf-neon-phytec-linux-gnueabi
$ mkdir build && cd build
$ cmake .. -DCMAKE_CXX_FLAGS=-m32
$ make install

Cmake build worked as well. Libraries seemed to be 32 bits . I try to put the libraries in my actual application but now the libraries are actually ignored by our linker because they're "incompatible".

We're having trouble to make something that can be compiled on a Linux 32 bits ARM distribution through Yocto basically.
mmn
@mmn:matrix.org
[m]
Oat++ is quite small, I'd try first to compile it directly on some armhf distro instead of cross-compiling.
What arch is the machine you are compiling it on?
AlexandreHURDYK
@AlexandreHURDYK
So basically compiling it directly on our small Linux embarked system ?
We're compiling on kubuntu.
2 replies
mmn
@mmn:matrix.org
[m]
Yeah, even an old raspberry pi should work, or just run a minimal system in qemu.
If you succeed there, you can then play around with cross-compiling.
BTW, what error (about the incompatibility) you get from the linker?
AlexandreHURDYK
@AlexandreHURDYK
It just says "skipping incompatible ../ext/oatpp-1.3.0/lib/cortexa9hf_neon_Release/liboatpp.a when searching for -l:liboatpp.a" as an information message
And then we get "collect2: error: ld returned 1 exit status" probably because the linker couldn't find the skipped libraries.
1 reply
mmn
@mmn:matrix.org
[m]
So you actually succeeded to build oat++, but couldn't link to it, right?
AlexandreHURDYK
@AlexandreHURDYK
Pretty much.
Probably we didn't build it right for our embarked platform.
mmn
@mmn:matrix.org
[m]
The machine on which you compiled it wasn't arm, that's what I meant.
And of course there is ubuntu for arm.
AlexandreHURDYK
@AlexandreHURDYK
Yeah I don't think that kubuntu distribution was arm either.
Is there a way to check and be sure about my kubuntu version ?
mmn
@mmn:matrix.org
[m]
uname -a
Will tell you the arch for sure.
AlexandreHURDYK
@AlexandreHURDYK
Linux LX379-agurdyk 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22 09:25:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
mmn
@mmn:matrix.org
[m]
OK, so you are trying to cross-compile it from an x86_64 machine.
AlexandreHURDYK
@AlexandreHURDYK
Yeah. Target machine is 32 bits (so technically x86 right ?).
mmn
@mmn:matrix.org
[m]
No.
There is a ton of 32bit architectures.
x86 being only one of them, armhf (your target) another.
AlexandreHURDYK
@AlexandreHURDYK
Ouch
To things weren't even really compatible to begin with.
mmn
@mmn:matrix.org
[m]
So, if you have access to an old raspberry pi, that would be the easiest way to build it for your target (armhf) architecture.
Another option is to use qemu virtualisation.
AlexandreHURDYK
@AlexandreHURDYK
I don't think we have something like that, but maybe we can use the piece of hardware we're using that hosts our homemade OS in the same way. I'll try to ask a coworker.
If all else fails, it's qemu time to emulate a raspberry PI, right ?
mmn
@mmn:matrix.org
[m]
What are the ram/storage capacities of your target hw?
AlexandreHURDYK
@AlexandreHURDYK
No idea. Perhaps I can check with a command ?
mmn
@mmn:matrix.org
[m]
You don't know the device you are developing for?
AlexandreHURDYK
@AlexandreHURDYK
It's literaly a circuit board with an home made OS inside. Jobplace gave this to me monday without much precisions and told me to make my program work on that circuit board.
So I'm afraid that I lack a lot of critical information about what that improvised computer can do.
:/
I can however try to ask a coworker in a few minutes.
mmn
@mmn:matrix.org
[m]
Okay, but then that's maybe not a question for this forum. If you are going to cross-compile for an embedded device, that's quite a specialised discipline... I can try to compile oat++ on my lime2 this afternoon (which is 32 bit arm), but that one runs a full debian distro.
AlexandreHURDYK
@AlexandreHURDYK
All I should need is the two static library files so maybe just doing that on that debian distribution could work.
mmn
@mmn:matrix.org
[m]
What do you get after running
file ../ext/oatpp-1.3.0/lib/cortexa9hf_neon_Release/liboatpp.a
(replace the path with your actual path, of course)
AlexandreHURDYK
@AlexandreHURDYK
Linker says it ignores them outright because they're not compatible, then says "cannot find -l:liboatpp.a".
mmn
@mmn:matrix.org
[m]
But what does file say?
AlexandreHURDYK
@AlexandreHURDYK
Uuuuh hold on.
I got confused and didn't realize "file" was a command.
liboatpp.a: current ar archive
Mmmmh that doesn't seem to say a lot.