ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] Compiling a development header package


From: Stuart Hughes
Subject: Re: [Ltib] Compiling a development header package
Date: Fri, 11 Jun 2010 13:27:41 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Ferdinand,

You're right, in this case you can comment out build-requires (and you can in general for LTIB).

I  guess you mean the gdb that LTIB built and put in bin ? if not you should.

To have the source files visible you need to leave the sources unpacked in rpm/BUILD/... and use the dir command in gdb.  There's some more info on the mailing list archive here:

http://lists.gnu.org/archive/html/ltib/2010-02/msg00014.html

In your spec file you should have:  --host=$CFGHOST  what you have now may be incorrect, and it's certainly not going to work for other targets.

>From within gdb, I would do an 'up' command to get to a stack frame that shows a more meaningful context.
You could also pass -O0 to CFLAGS to try to get some more more easy to follow (caution though, this may move the bug).

I would also check the build log (./ltib -p xxxx -f 2>&1 | tee logfile) to see if you can spot anything bad.

Regards, Stuart

Ferdinand Jacobs wrote:
Hi Stuart,

Thank you for your reply,
The reason I asked because in the gst-rtsp-server.spec file there is a line that says
BuildRequires:  gstreamer-devel >= 0.10.11

I asked on irc in the gstreamer channel if I could edit this out and they said that was not possible because then the header files of my host were used. But i understand now that with ltib it is possible to edit it out.

I get some errors though in my application that makes use of this rtsp library that I don't get on my host machine,
Thats why I wanted to debug the application to make sure it is not because of the gstreamer-devel >= 0.10.11.
So I put -g after make in the spec file and it seems to be succesfully compiling with the debug flag..
..
...
+ make CFLAGS=-g
make  all-recursive
make[1]: Entering directory `/home/notroot/ltib/rpm/BUILD/rtsp_imp-0.1'
Making all in src
make[2]: Entering directory `/home/notroot/ltib/rpm/BUILD/rtsp_imp-0.1/src'
  CC     main.o
etc....

The strange thing however is, when i run the arm-compatible gdb on my target and for example enter the command 'list' gdb returns this: 

1       main.c: No such file or directory.

And when i do a backtrace after the program has crashed,  it seems the compiler has optimized the code.

 #1  0x403bc124 in _g_gnulib_vasnprintf (resultbuf=0x0, lengthp=0xbe9c75cc, 
    format=<value optimized out>, args=<value optimized out>)

I guess there is something wrong with my .spec file but I don't understand what I'm doing wrong.. as it seems to compile with the -g CFLAGS ?
Below is my spec file..


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

Name           : rtsp_imp
Version         : 0.1
Release        : 1
Summary      : RTSP Server Implementatie
License         : LGPL
Vendor          : Dealogic
Packager      : Ferdinand Jacobs
Group           : Applications/System
Source          : %{name}-%{version}.tar.gz
BuildRoot       : %{_tmppath}/%{name}
Prefix          : %{pfx}

%Description
%{summary}

%Prep
%setup -n rtsp_imp-%{version}

%Build
./configure --prefix=%{_prefix} --build=%{_build} --host=arm-none-linux-gnueabi \
            --disable-valgrind --without-check  --enable-maintainer-mode 
  
make 'CFLAGS=-g' 'CXXFLAGS=-g' 'JFLAGS=-g' 'FFLAGS=-g'

%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
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%Clean
rm -rf $RPM_BUILD_ROOT

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

Thanks in advance for any pointers .

Regards, Ferdinand

2010/6/9 Stuart Hughes <address@hidden>
Hi Ferdinand,

No, do not try to install binary rpms you download directly.

To answer your question though, if you're building a package that nees
from gstreamer headers, then these should have been installed for you
when you built gstreamer in LTIB.  For example gstreamer-core installs:

rootfs/
//usr/include/gstreamer-0.10
//usr/include/gstreamer-0.10/gst
//usr/include/gstreamer-0.10/gst/base
//usr/include/gstreamer-0.10/gst/base/gstadapter.h
//usr/include/gstreamer-0.10/gst/base/gstbasesink.h
//usr/include/gstreamer-0.10/gst/base/gstbasesrc.h
....


Other packages using these headers would normally get then using pkg-config

Regards, Stuart


F I wrote:
> Hi All,
>
> The package i'm trying to to compile with ltib needs certain development
> headers previously installed before compilation.. (I'm trying to compile
> gst-rtsp-server wich needs gstreamer-devel ).
> I can find the development headers of this particular package online but
> these are all in RPM format.
>
> So I went over to the gstreamer people and asked if there are any source
> packages that contains these development headers so gst-rtsp-server
> would work correctly.
>
> They explained to me that the development header package is created from
> the compiler:
> "The source code includes the header files; when the source tarballs get
> made into packages, the packagers will usually split the headers into a
> seperate -devel package and put the library binaries into another package"
>
> So my question basically is:
> Is it possible to install RPM files via ltib?
> And does ltib creates these -devel packages?
>
> Thanks in advance!
> Ferdinand
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> LTIB home page: http://ltib.org
>
> Ltib mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ltib


reply via email to

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