I am trying to compile a custom package which depends heavily on libcurl an pcap, on my machine it works great,but when i try to compile it using the toolchain i get this errors:
$ /home/kavastudios/sites/proC/SDK/OpenWrt-Toolchain-ar71xx-for-mips_34kc-gcc-4.8-linaro_uClibc-0.9.33.2/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc airhog.c -o airhogfull -lpcap -lcurl
mips-openwrt-linux-uclibc-gcc.bin: warning: environment variable 'STAGING_DIR' not defined
In file included from /usr/include/curl/curl.h:35:0,
from airhog.c:16:
/usr/include/curl/curlrules.h:142:3: error: size of array '__curl_rule_01__' is negative
__curl_rule_01__
^
/usr/include/curl/curlrules.h:152:3: error: size of array '__curl_rule_02__' is negative
__curl_rule_02__
^
And if i compile it removing all the code using curl (leaving just pcap) I get this error:
cannot find -lpcap
collect2: error: ld returned 1 exit status
After reading many post, my guess is I need to cross compile pcap and curl and then reference them at the moment of trying to compile my script, but I am totally lost on how to do it.
I'd really appreaciate if you can give me a clue about:
setup the staging dir properly (i have been trying using the PATH/STAGING_DIR variables with no success)
how to compile the curl/pcap library (to be used at the moment of compile my script and not ending up with those libraries replacing the ones used in my machine)
which flags or commands I should include at the moment of compile my script.
I am using Ubuntu 14.04
Thanks.