[OpenWrt-Devel] Problem cross compiling gammu

2010-08-16 Thread Bas Mevissen

Hi,

I took some stuff from https://dev.openwrt.org/ticket/7649 to compile
gammu for OpenWRT on AVR32.

Most of it seems fine, but a few things fail:

- The compilation needs cmake on the host, which is not checked for.
OpenWRT does not provide support for cmake, but a host installed recent
cmake should do.

- The compilation is not cross compile aware. So the host cc is checked
for instead of the cross compiler

- Cmake fails because it cannot find libm.so. This is in
staging_dir/toolchain-*/lib. But there is no environement variable set
for this directory. The STAGING_DIR variable points to
staging_dir/target-* and something like STAGING_TOOLCHAIN_DIR is not
set. At least not when configuring the package.

- I peeked around and found that OpenEmbedded added the parameter
-DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_TARGET} to cmake. When I
manually let the root path point to the toolchain dir, it seems to
compile OK.


-- 
Bas
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Problem cross compiling gammu

2010-08-16 Thread Bas Mevissen
On 08/16/2010 05:55 PM, Bas Mevissen wrote:
 
 Hi,
 
 I took some stuff from https://dev.openwrt.org/ticket/7649 to compile
 gammu for OpenWRT on AVR32.
 
 Most of it seems fine, but a few things fail:
 
 - The compilation needs cmake on the host, which is not checked for.
 OpenWRT does not provide support for cmake, but a host installed recent
 cmake should do.
 
 - The compilation is not cross compile aware. So the host cc is checked
 for instead of the cross compiler
 
 - Cmake fails because it cannot find libm.so. This is in
 staging_dir/toolchain-*/lib. But there is no environement variable set
 for this directory. The STAGING_DIR variable points to
 staging_dir/target-* and something like STAGING_TOOLCHAIN_DIR is not
 set. At least not when configuring the package.
 
 - I peeked around and found that OpenEmbedded added the parameter
 -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_TARGET} to cmake. When I
 manually let the root path point to the toolchain dir, it seems to
 compile OK.
 
 

Oops, mail escaped before I was finished typing it.

Anyway, gammu seems to work on platform. At least, it is no worse than
on a desktop PC.

My question is: what to do? How is normally libm.so detected? Maybe
someone with more experience with cmake and cross compiling can shine a
light on it. Would be very much appreciated!

Regards,

Bas.

-- 
Bas
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel