babelouest / ulfius

Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
https://babelouest.github.io/ulfius
GNU Lesser General Public License v2.1
1.08k stars 182 forks source link

Help: cross-compile as static libary for aarch64 #165

Closed pujag-xlnx closed 4 years ago

pujag-xlnx commented 4 years ago

Hi, This is not an issue but I am looking for some help. I am looking to compile this as static library to be able to use with c programs on aarch64 linux embedded target. Can you please tell me how to compile it as static library on x86 for aarch64 and all the headers that I will need to copy over? Thanks for your help,

babelouest commented 4 years ago

Hello @gupta05 ,

Thanks for asking, you made me realize the install documentation was incomplete. To build Ulfius in static mode you can either:

Yder and Orcania need similar compilation procedure. Concerning the dependencies (libmicrohttpd, jansson, libcurl), their documentation should mention how to build in static mode if applicable.

pujag-xlnx commented 4 years ago

Thanks for your response. How to cross compile ulfius for aarch64?

babelouest commented 4 years ago

I wouldn't know how to cross-compile, that's between you and your compiler.

A quick search gives me some results though: https://duckduckgo.com/?q=gcc+cross+compile+aarch64&ia=web

pujag-xlnx commented 4 years ago

Sorry for the confusion. I meant to ask if there was any variables I need to set for arch explicitly. I have the compiler but wasn't sure where to change it in ulfius makefile. Anyways I will figure out. Thanks.