Application package cross linked to package libraries problem
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
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 <[email protected]>:
Quoted 15 lines
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
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/BUILDROOTMSDPI_AUTORECONF = NOMSDPI_INSTALL_STAGING = YESMSDPI_INSTALL_TARGET = YESMSDPI_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) cleanhost-msdpi-dirclean:
rm -rf $(MSDPI_HOST_DIR)
Thanks......Chris
Quoted 29 lines · Stefan Schake
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<[email protected]>:
Quoted 15 lines
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
Quoted 2 lines · On Tue, 12 Jan 2010 07:35:00 -0500 Chris Robson <[email protected]>…
build-juniper-commandline.c:8:27: error:
sofia-sip/nua.h: No such file or directory
Looks like the sofia-sip headers haven't been installed into $(STAGING_DIR)/usr/include.
The issue is likely to be in the sofia-sip.mk file rather than in your application .mk.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Thomas
Ah, yes, its the softlink that's missing aka.....
sofia-sip is installed into .... $(STAGING_DIR)/usr/include/sofia-sip-[version number]
thus nua.h is located in:
$(STAGING_DIR)/usr/include/sofia-sip-[version number]/sofia-sip/nua.h ergo what is need is:
$(STAGING_DIR)/usr/include/sofia-sip -> $(STAGING_DIR)/usr/include/sofia-sip-[version number]
Is there an example how to do this? (right now its manually coded to get past this)
thanks....Chris
Quoted 15 lines · Thomas Petazzoni
Quoted 3 lines · On Tue, 12 Jan 2010 07:35:00 -0500 Chris Robson<[email protected]>…
build-juniper-commandline.c:8:27: error:
sofia-sip/nua.h: No such file or directoryLooks like the sofia-sip headers haven't been installed into $(STAGING_DIR)/usr/include.
The issue is likely to be in the sofia-sip.mk file rather than in your application .mk.
Thomas