OpenWrt Forum Archive

Topic: Cross-compile tor fails

The content of this topic has been archived on 25 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello everyone,

I'm new on this forum so bear with me if I make mistakes.

I'm trying to cross-compile tor-0.2.4.20 for Attitude Adjustment (12.09 final), as the package for openwrt is quite old and soon will not join the tor network anymore.
I've built the buildroot and I was able to compile the firmware for my TP-Link mr3020,
(toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2)
I can also compile c programs against it. Now when I try to compile tor I get this error:

------------------------------------------------------------------------------------------------------
checking for libevent directory... configure: WARNING: Could not find a linkable libevent.  If you have it installed somewhere unusual, you can specify an explicit path using --with-libevent-dir
configure: WARNING: On Debian, you can install libevent using "apt-get install libevent-dev"
configure: error: Missing libraries; unable to proceed.
------------------------------------------------------------------------------------------------------
I made sure libevent is checked in .config and also I tried to pass the path with --with-libevent-dir
but whatever path I pass to it I get the same error.
any help would be greatly appreciated,
thanks
----- edit -----------
I got a little further, by using this:
./configure --host=mips-openwrt-linux-uclibc --with-libevent-dir=/home/builder/build/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib/libevent
I get this error:
checking for libevent directory... configure: WARNING: We found the libraries for libevent, but we could not find the C header files.  You may need to install a devel package.
configure: WARNING: On Debian, you can install headers for libevent using "apt-get install libevent-dev"
configure: error: Missing headers; unable to proceed.

------------- edit again -----
ok I went a little further. I'll post the complete solution in a while

(Last edited by pdev on 26 Feb 2014, 17:35)

I am having the same issue as you. Did you work out a way to resolve this error?

Try this and see if that will work:

./configure --host=mips-openwrt-linux-uclibc --with-libevent-dir=/home/builder/build/openwrt/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr

The discussion might have continued from here.