<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Hello<br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">Thanks for the link to nslu2 and the information that I basically just need to set these bunch of variables correct for cross compiling. I was now able to create a mostly working package for Buildroot. The .mk file is attached for others which may run into the same situation.<br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">Thanks<br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">Benjamin</div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">Am Mi., 24. Juni 2020 um 18:05 Uhr schrieb Ovidiu Sas <<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I haven't cross compiled in a long time ...<br>
For proper cross-compilation, the CROSS_COMPILE flag must be set to<br>
something, then the LOCALBASE and SYSBASE should point to the staging<br>
directory where the toolchain and all the libraries and include files<br>
for the target platform are present.<br>
Extra compile and link options can be passed via CC_EXTRA_OPTS and<br>
LD_EXTRA_OPTS.<br>
<br>
An old example for optware can be found here:<br>
<a href="https://raw.githubusercontent.com/nslu2-linux/Optware/master/make/kamailio.mk" rel="noreferrer" target="_blank">https://raw.githubusercontent.com/nslu2-linux/Optware/master/make/kamailio.mk</a><br>
<br>
Some modules have a proper Makefile that will use the pkg-config from<br>
staging directory and detect proper compile and link flags while other<br>
modules require manual tinkering with the Makefile.<br>
It's good to enable the noisy build (Q=0) and check that proper<br>
include files and libs are used (from the staging directory and not<br>
from the build machine).<br>
<br>
Regards,<br>
Ovidiu Sas<br>
<br>
On Wed, Jun 24, 2020 at 4:52 AM Daniel-Constantin Mierla<br>
<<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> I haven't cross compiled myself, but there is a makefile flag CROSS_COMPILE that you can set in such cases -- the Makefile of the modules sets the path to includes and libs based on it. You may need to set other Makefile variables to get it done, look in the src/Makefile.defs to see most of them.<br>
><br>
> Ovidiu Sas seemed to be active in this space some time ago, maybe he can give further guidelines.<br>
><br>
> Cheers,<br>
> Daniel<br>
><br>
> On 19.06.20 14:11, Benjamin Marty wrote:<br>
><br>
> Hello<br>
><br>
> I would like to ask if someone already tried to build Kamailio for the Embedded Distribution Buildroot. I tried it myself but it looks like Kamailio is not that easy to cross compile.<br>
><br>
> Thanks<br>
><br>
> Benjamin<br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
> --<br>
> Daniel-Constantin Mierla -- <a href="http://www.asipto.com" rel="noreferrer" target="_blank">www.asipto.com</a><br>
> <a href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">www.linkedin.com/in/miconda</a><br>
> Funding: <a href="https://www.paypal.me/dcmierla" rel="noreferrer" target="_blank">https://www.paypal.me/dcmierla</a><br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
<br>
-- <br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" rel="noreferrer" target="_blank">http://www.voipembedded.com</a><br>
</blockquote></div></div>