ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] spoofing problem


From: Andre Silva
Subject: Re: [Ltib] spoofing problem
Date: Tue, 02 Feb 2010 12:33:21 -0200
User-agent: Thunderbird 2.0.0.22 (X11/20090605)

John,

I have created a spec file in order to build opencv library on ltib, you can find it attached to this email.
you just have to change the toolchain path on it.

regards,

Andre




Stuart Hughes wrote:
Hi John,

If that package uses pkg-config then you don't need to add any -I/-L
flags at all.

If not, then you'll need to add this: -I $DEV_IMAGE/usr/include/opencv
(files in rootfs/usr/include are automatically found by spoofing).

You do not (and should not) add -L/usr/lib to the link line, only -lcv (and any other libraries required. Libraries in rootfs/usr/lib are found already using the "spoofing" mechanism.

Regards, Stuart

john bougs wrote:
I'm not sure if I'm doing things right, but I am compileing have
added opencv to to my tlib install.  I am trying to make the file in
the "-m shell" mode,  but my (crude) c++ makefile does not seem to
spoof -I/usr/include/opencv/.  the unspoofed version works fine.  Am
I doing something wrong? How should I be doing it?

# the follow should be spoofed by tlib but does not..... why? #CFLAGS=-Wall -I/usr/include/opencv/ CFLAGS=-Wall
-I../rootfs/usr/include/opencv/ CXXFLAGS = $(CFLAGS) LDFLAGS=
-L/usr/lib -lcv -lhighgui

main: main.o a.o b.o

clean: rm *.o  main





_______________________________________________ LTIB home page:
http://ltib.org

Ltib mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/ltib



_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib

%define pfx /opt/freescale/rootfs/%{_target_cpu}

Summary         : The Open Computer Vision Library (Intel)
Name            : opencv
Version         : 1.1.0
Release         : 0
License         : LGPL
Vendor          : .
Packager        : Andre Silva
Group           : System Environment/Daemons
Source          : %{name}-%{version}.tar.gz
BuildRoot       : %{_tmppath}/%{name}
Prefix          : %{pfx}

%Description
%{summary}

%Prep
%setup 

%Build
export 
CC=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
export 
CXX=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-g++
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} 
--without-python --disable-apps

make

cd samples/c/
chmod +x build_all.sh
./build_all.sh
cd ../..

%Install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
find $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/ -name "*.la" | xargs rm -f

# Tests install workaround
export TESTDIR=$RPM_BUILD_ROOT/%{pfx}/%{_prefix}/share/opencv/samples/c/
cp -a samples/c/* $TESTDIR

%Clean
rm -rf $RPM_BUILD_ROOT


%Files
%defattr(-,root,root)
%{pfx}/*

reply via email to

[Prev in Thread] Current Thread [Next in Thread]