Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Robson <Chris.Robson@nrl.navy.mil>
To: buildroot@busybox.net
Subject: [Buildroot] Application package cross linked to package libraries problem
Date: Tue, 12 Jan 2010 07:35:00 -0500	[thread overview]
Message-ID: <4B4C6C74.9040703@nrl.navy.mil> (raw)
In-Reply-To: <e4b6ec781001120358g3202f322qa8ae8c9408d8de40@mail.gmail.com>

Stefan

OK, I've built Sofia-SIP libraires as a library package and even as 
dynamic libraries that install into the target system.  Now I'm trying 
to build a home-grown application that must link against the Sofia-SIP 
libraries, aka "-l sofia-sip" as well as header files that reside in the 
Sofia-SIP package build tree.  The following example error shows the 
issue with the header files.  By hard-coding I can over come both issues 
but obviously that is not the way to go.

make[3]: Entering directory `/develop/output/build/msdpi-11Jan10.1200/src'
/develop/output/staging/usr/bin/x86_64-linux-uclibc-gcc -Os -pipe -Os  
-I/develop/output/staging/usr/include -I/develop/output/staging/include 
--sysroot=/develop/output/staging/ -isysroot /develop/output/staging 
-mtune=generic -fPIC -DPIC -DHAVE_CONFIG_H -I. -I.. 
-I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 
-I/usr/include/sofia-sip 
-I~/rpmbuild/BUILD/kernel-2.6.31/linux-2.6.31.x86_64/include    -Os 
-pipe -Os  -I/develop/output/staging/usr/include 
-I/develop/output/staging/include --sysroot=/develop/output/staging/ 
-isysroot /develop/output/staging -mtune=generic -fPIC -DPIC -MT 
build-juniper-commandline.o -MD -MP -MF 
.deps/build-juniper-commandline.Tpo -c -o build-juniper-commandline.o 
build-juniper-commandline.c
build-juniper-commandline.c:8:27: error: sofia-sip/nua.h: No such file 
or directory
make[3]: *** [build-juniper-commandline.o] Error 1
make[3]: Leaving directory `/develop/output/build/msdpi-11Jan10.1200/src'
make[2]: *** [all-recursive] Error 1

Extract of my apps ".mk" file:

SDPI_VERSION:=11Jan10.1200
MSDPI_SOURCE:=msdpi-$(MSDPI_VERSION).tar.bz2
MSDPI_SITE:=http://localhost/BUILDROOT
MSDPI_AUTORECONF = NO
MSDPI_INSTALL_STAGING = YES
MSDPI_INSTALL_TARGET = YES
MSDPI_INSTALL_STAGING_OPT = CC="$(TARGET_CC)" DESTDIR=$(STAGING_DIR) install

$(eval $(call AUTOTARGETS,package,msdpi))

# msdpi for the host
MSDPI_HOST_DIR:=$(BUILD_DIR)/msdpi-$(MSDPI_VERSION)-host

$(DL_DIR)/$(MSDPI_SOURCE):
     $(call DOWNLOAD,$(MSDPI_SITE),$(MSDPI_SOURCE))

$(STAMP_DIR)/host_msdpi_unpacked: $(DL_DIR)/$(MSDPI_SOURCE)
     mkdir -p $(MSDPI_HOST_DIR)
     $(INFLATE$(suffix $(MSDPI_SOURCE))) $< | \
         $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(MSDPI_HOST_DIR) 
$(TAR_OPTIONS) -
     toolchain/patch-kernel.sh $(MSDPI_HOST_DIR) package/msdpi/ \*.patch
     touch $@

$(STAMP_DIR)/host_msdpi_configured: $(STAMP_DIR)/host_msdpi_unpacked
     (cd $(MSDPI_HOST_DIR); rm -rf config.cache; \
         $(HOST_CONFIGURE_OPTS) \
         CFLAGS="$(HOST_CFLAGS)" \
         LDFLAGS="$(HOST_LDFLAGS)" \
         ./configure $(QUIET) \
         --prefix="$(HOST_DIR)/usr" \
         --sysconfdir="$(HOST_DIR)/etc"
     )
     touch $@

$(STAMP_DIR)/host_msdpi_compiled: $(STAMP_DIR)/host_msdpi_configured
     $(MAKE) -C $(MSDPI_HOST_DIR)
     touch $@

$(STAMP_DIR)/host_msdpi_installed: $(STAMP_DIR)/host_msdpi_compiled
     $(MAKE) -C $(MSDPI_HOST_DIR) install
     touch $@

host-msdpi: $(STAMP_DIR)/host_msdpi_installed

host-msdpi-clean:
     rm -f $(addprefix $(STAMP_DIR)/host_msdpi_,unpacked compiled installed)
     -$(MAKE) -C $(MSDPI_HOST_DIR) uninstall
     -$(MAKE) -C $(MSDPI_HOST_DIR) clean

host-msdpi-dirclean:
     rm -rf $(MSDPI_HOST_DIR)


Thanks......Chris

On 01/12/2010 06:58 AM, Stefan Schake wrote:
> Hey,
>
> I think it would actually be more helpful if you could tell us what
> exact package you're trying to build, since linking and the like can
> be done very different, all depending on the package. Most of the time
> though, it should not be necessary to explicitly tell an application
> where to find the libary its trying to link to.
>
> Greetings
>
> 2010/1/12 Chris Robson<Chris.Robson@nrl.navy.mil>:
>    
>> I'm looking for an example of how to package cross link to package
>> libraries.  That is a package which is a library and then another package
>> that links to that library.  I've built a package library with success (to
>> include runtime install) and compiled a package application but getting the
>> package application to link against the new package library is not working.
>>   Obviously its a path issue but an example might help me see what is wrong
>> with my setup.
>>
>> Thanks....Chris
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>>
>>      
>
>    

  reply	other threads:[~2010-01-12 12:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 11:42 [Buildroot] Application package cross linked to package libraries problem Chris Robson
2010-01-12 11:58 ` Stefan Schake
2010-01-12 12:35   ` Chris Robson [this message]
2010-01-12 13:21     ` Thomas Petazzoni
2010-01-12 13:41       ` Chris Robson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4C6C74.9040703@nrl.navy.mil \
    --to=chris.robson@nrl.navy.mil \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox