I've now finished compiling my full project for ARM (core, opencv, camera1394, hokuyo, tf, joy, image_transport), and there is a couple of point I noticed after my initial post. See below. On 07/09/10 14:55, Cedric Pradalier wrote: > Hi, > > I'd like to suggest the 2 micro-patch to help cross-compiling ros. > > ======== ROS BUILD ======== > I now use more the rostoolchain.cmake and I really think that's the way > forward. Mine looks like that: > set(CMAKE_SYSTEM_NAME Linux) > set(CMAKE_SYSTEM_PROCESSOR arm-angstrom-linux-gnueabi) > set(GUMSTIXTOP [...]/overo-oe) > set(GUMSTIXFS [...]/overo-dev) > set(CMAKE_C_COMPILER > > ${GUMSTIXTOP}/tmp/cross/armv7a/bin/arm-angstrom-linux-gnueabi-gcc-sysroot) > set(CMAKE_CXX_COMPILER > > ${GUMSTIXTOP}/tmp/cross/armv7a/bin/arm-angstrom-linux-gnueabi-g++-sysroot) > set(CMAKE_FIND_ROOT_PATH ${GUMSTIXFS}) > set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) > set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) > set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) > > The CMAKE_FIND... directives are conflicting with the > _rosbuild_add_rostest and _rosbuild_add_pyunit in > rosbuild/private.cmake. This can be corrected by applying the following > patch: > - find_file(_file_name ${file} ${PROJECT_SOURCE_DIR} /) > + find_file(_file_name "${file}" "${PROJECT_SOURCE_DIR}" / > NO_CMAKE_FIND_ROOT_PATH) > in both function. This will force find_file to ignore the > CMAKE_FIND_ROOT_PATH for these functions. This is fine since they seem > to be used only to refer to local files. > > This actually also affect rosbuild_add_executable in public.cmake. > ======== OpenCV ======== > [...] ======== TF ======== In package tf, in tf/CMakeLists.txt, the -ssse3 is not prefixed by a system type. I've changed it by copy-pasting from opencv (I guess it could be done nicer with a OR :)): rosbuild_add_compile_flags(pytf_py -g -Wno-missing-field-initializers) if(CMAKE_COMPILER_IS_GNUCXX) if(${CMAKE_SYSTEM_PROCESSOR} MATCHES arm*) # We can use only -O2 because the -O3 causes gcc crash set(X86 0) endif() if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc*) set(X86 0) endif () if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*) set(X86_64 1) endif() if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64*) set(X86_64 1) endif() if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686*) set(X86 1) endif() if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i386*) set(X86 1) endif() if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86*) set(X86 1) endif() if(X86 OR X86_64) rosbuild_add_compile_flags(pytf_py -msse3) endif() endif() ======== libtheora ======== In libtheora, I need to add -host arm-gumstix-linux-gnu --disable-asm to autogen.sh but I'm not sure how to do it using the rostoolchain information. Again, HTH -- Dr. Cedric Pradalier http://www.asl.ethz.ch/people/cedricp