* [Buildroot] [PATCH v2 1/1] package/sispmctl: fix static linking
@ 2014-08-25 23:12 Romain Naour
2014-08-26 6:47 ` Phil Eichinger
2014-10-05 21:36 ` Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Romain Naour @ 2014-08-25 23:12 UTC (permalink / raw)
To: buildroot
The static linking doesn't works with libusb-compat when using libusb-config.
Also the CFLAGS initialization with libusb-config --cflags is comented out.
Based on libftdi's patch, add the support for pkg-config to link sispmctl
correctly.
This allow to add correct include directory to CFLAGS
(Add -I$(STAGING_DIR)/usr/include and -I$(STAGING_DIR)/usr/include/libusb-1.0)
Also add needed libraries during static linking (-lusb -lusb-1.0 and -pthread)
Since configure.ac is modified, the configure script needs to be regenerated
with autoreconf.
Fixes:
http://autobuild.buildroot.net/results/647/6473088e751d3ab3a5227e9d7876966934e66378/build-end.log
Cc: Phil Eichinger <phil.eichinger@gmail.com>
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
v2:
fix the patch log
...pmctl-01-configure-add-pkg-config-support.patch | 70 ++++++++++++++++++++++
package/sispmctl/sispmctl.mk | 3 +-
2 files changed, 72 insertions(+), 1 deletion(-)
create mode 100644 package/sispmctl/sispmctl-01-configure-add-pkg-config-support.patch
diff --git a/package/sispmctl/sispmctl-01-configure-add-pkg-config-support.patch b/package/sispmctl/sispmctl-01-configure-add-pkg-config-support.patch
new file mode 100644
index 0000000..9466080
--- /dev/null
+++ b/package/sispmctl/sispmctl-01-configure-add-pkg-config-support.patch
@@ -0,0 +1,70 @@
+From 8002a7e6fa965dfd304d098fbc64b0f1a6e3b465 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@openwide.fr>
+Date: Sun, 24 Aug 2014 22:34:29 +0200
+Subject: [PATCH 1/1] configure: add pkg-config support
+
+The static linking doesn't works with libusb-compat when using libusb-config.
+Also the CFLAGS initialization with libusb-config --cflags is comented out.
+
+Based on libftdi's patch, add the support for pkg-config to link sispmctl
+correctly.
+
+This allow to add correct include directory to CFLAGS
+(Add -I$(STAGING_DIR)/usr/include and -I$(STAGING_DIR)/usr/include/libusb-1.0)
+Also add needed libraries during static linking (-lusb -lusb-1.0 and -pthread)
+
+Signed-off-by: Romain Naour <romain.naour@openwide.fr>
+---
+ configure.in | 36 +++++++++++-------------------------
+ 1 file changed, 11 insertions(+), 25 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 08d39ea..65d0c1d 100644
+--- a/configure.in
++++ b/configure.in
+@@ -23,31 +23,17 @@ AC_SUBST(WEBDIR)
+ AC_ARG_WITH(bindaddr,[ --with-bindaddr=IP bind listening socket to IP], [BINDADDR="$withval"])
+ AC_SUBST(BINDADDR)
+
+-
+-# Checks for libraries.
+-dnl check for libusb-config
+-AC_PATH_PROG(HAVELIBUSB, libusb-config, $PATH)
+-
+-if test -e "$HAVELIBUSB"; then
+- dnl LIBUSB_CFLAGS=`$HAVELIBUSB --cflags`
+- LIBUSB_LIBS=`$HAVELIBUSB --libs`
+- CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
+- LIBS="$LIBS $LIBUSB_LIBS"
+-else
+- AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation. Version >=0.1.7])
+-fi
+-
+-dnl check for version of libusb
+-AC_MSG_CHECKING([if libusb version is >= 0.1.9])
+-libusb_version_needed="1009"
+-libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'`
+-
+-if test $libusb_version -lt $libusb_version_needed; then
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.9.])
+-else
+- AC_MSG_RESULT(yes)
+-fi
++dnl check for libusb
++PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11)
++CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
++LIBS="$LIBS $LIBUSB_LIBS"
++
++dnl Check for recent pkg-config which supports Requires.private
++case `$PKG_CONFIG --version` in
++0.?|0.1[0-7]) PKGCONFIG_REQUIRES="Requires"; ;;
++*) PKGCONFIG_REQUIRES="Requires.private"; ;;
++esac
++AC_SUBST(PKGCONFIG_REQUIRES)
+
+ # Checks for header files.
+ AC_HEADER_STDC
+--
+1.9.3
+
diff --git a/package/sispmctl/sispmctl.mk b/package/sispmctl/sispmctl.mk
index 2d2becf..2cde2e2 100644
--- a/package/sispmctl/sispmctl.mk
+++ b/package/sispmctl/sispmctl.mk
@@ -10,7 +10,8 @@ SISPMCTL_LICENSE = GPLv2+
SISPMCTL_LICENSE_FILES = LICENCE
SISPMCTL_DEPENDENCIES = libusb-compat
-SISPMCTL_CONF_ENV = HAVELIBUSB=$(STAGING_DIR)/usr/bin/libusb-config
+SISPMCTL_AUTORECONF = YES
+
SISPMCTL_CONF_OPT = --enable-webless
$(eval $(autotools-package))
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH v2 1/1] package/sispmctl: fix static linking
2014-08-25 23:12 [Buildroot] [PATCH v2 1/1] package/sispmctl: fix static linking Romain Naour
@ 2014-08-26 6:47 ` Phil Eichinger
2014-08-28 21:42 ` Romain Naour
2014-10-05 21:36 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Phil Eichinger @ 2014-08-26 6:47 UTC (permalink / raw)
To: buildroot
On 26 August 2014 01:12, Romain Naour <romain.naour@openwide.fr> wrote:
> The static linking doesn't works with libusb-compat when using
> libusb-config.
> Also the CFLAGS initialization with libusb-config --cflags is comented out.
>
> Based on libftdi's patch, add the support for pkg-config to link sispmctl
> correctly.
>
> This allow to add correct include directory to CFLAGS
> (Add -I$(STAGING_DIR)/usr/include and
> -I$(STAGING_DIR)/usr/include/libusb-1.0)
> Also add needed libraries during static linking (-lusb -lusb-1.0 and
> -pthread)
>
> Since configure.ac is modified, the configure script needs to be
> regenerated
> with autoreconf.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/647/6473088e751d3ab3a5227e9d7876966934e66378/build-end.log
>
> Cc: Phil Eichinger <phil.eichinger@gmail.com>
> Signed-off-by: Romain Naour <romain.naour@openwide.fr>
>
Thank you!
Cheers, Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140826/c046e63b/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 1/1] package/sispmctl: fix static linking
2014-08-26 6:47 ` Phil Eichinger
@ 2014-08-28 21:42 ` Romain Naour
0 siblings, 0 replies; 6+ messages in thread
From: Romain Naour @ 2014-08-28 21:42 UTC (permalink / raw)
To: buildroot
Hi, Phil,
Le 26/08/2014 08:47, Phil Eichinger a ?crit :
> On 26 August 2014 01:12, Romain Naour <romain.naour@openwide.fr
> <mailto:romain.naour@openwide.fr>> wrote:
>
> The static linking doesn't works with libusb-compat when using libusb-config.
> Also the CFLAGS initialization with libusb-config --cflags is comented out.
>
> Based on libftdi's patch, add the support for pkg-config to link sispmctl
> correctly.
>
> This allow to add correct include directory to CFLAGS
> (Add -I$(STAGING_DIR)/usr/include and -I$(STAGING_DIR)/usr/include/libusb-1.0)
> Also add needed libraries during static linking (-lusb -lusb-1.0 and -pthread)
>
> Since configure.ac <http://configure.ac> is modified, the configure script
> needs to be regenerated
> with autoreconf.
>
> Fixes:
> http://autobuild.buildroot.net/results/647/6473088e751d3ab3a5227e9d7876966934e66378/build-end.log
>
> Cc: Phil Eichinger <phil.eichinger at gmail.com <mailto:phil.eichinger@gmail.com>>
> Signed-off-by: Romain Naour <romain.naour@openwide.fr
> <mailto:romain.naour@openwide.fr>>
>
>
> Thank you!
>
> Cheers, Phil
Your welcome :)
Feel free to test this patch reply with your Tested-by.
Best regards,
Romain
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 1/1] package/sispmctl: fix static linking
2014-08-25 23:12 [Buildroot] [PATCH v2 1/1] package/sispmctl: fix static linking Romain Naour
2014-08-26 6:47 ` Phil Eichinger
@ 2014-10-05 21:36 ` Thomas Petazzoni
2014-10-08 20:17 ` Romain Naour
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-05 21:36 UTC (permalink / raw)
To: buildroot
Dear Romain Naour,
On Tue, 26 Aug 2014 01:12:33 +0200, Romain Naour wrote:
> The static linking doesn't works with libusb-compat when using libusb-config.
> Also the CFLAGS initialization with libusb-config --cflags is comented out.
>
> Based on libftdi's patch, add the support for pkg-config to link sispmctl
> correctly.
>
> This allow to add correct include directory to CFLAGS
> (Add -I$(STAGING_DIR)/usr/include and -I$(STAGING_DIR)/usr/include/libusb-1.0)
> Also add needed libraries during static linking (-lusb -lusb-1.0 and -pthread)
>
> Since configure.ac is modified, the configure script needs to be regenerated
> with autoreconf.
>
> Fixes:
> http://autobuild.buildroot.net/results/647/6473088e751d3ab3a5227e9d7876966934e66378/build-end.log
>
> Cc: Phil Eichinger <phil.eichinger@gmail.com>
> Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Thanks, applied. Please submit the patch upstream so that one day we
can remove it from Buildroot.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 1/1] package/sispmctl: fix static linking
2014-10-05 21:36 ` Thomas Petazzoni
@ 2014-10-08 20:17 ` Romain Naour
2014-10-08 20:29 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Romain Naour @ 2014-10-08 20:17 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Le 05/10/2014 23:36, Thomas Petazzoni a ?crit :
> Dear Romain Naour,
>
> On Tue, 26 Aug 2014 01:12:33 +0200, Romain Naour wrote:
>> The static linking doesn't works with libusb-compat when using libusb-config.
>> Also the CFLAGS initialization with libusb-config --cflags is comented out.
>>
>> Based on libftdi's patch, add the support for pkg-config to link sispmctl
>> correctly.
>>
>> This allow to add correct include directory to CFLAGS
>> (Add -I$(STAGING_DIR)/usr/include and -I$(STAGING_DIR)/usr/include/libusb-1.0)
>> Also add needed libraries during static linking (-lusb -lusb-1.0 and -pthread)
>>
>> Since configure.ac is modified, the configure script needs to be regenerated
>> with autoreconf.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/647/6473088e751d3ab3a5227e9d7876966934e66378/build-end.log
>>
>> Cc: Phil Eichinger <phil.eichinger@gmail.com>
>> Signed-off-by: Romain Naour <romain.naour@openwide.fr>
>
> Thanks, applied. Please submit the patch upstream so that one day we
> can remove it from Buildroot.
>
Patch submitted in the sispmctl forum:
https://sourceforge.net/p/sispmctl/discussion/539852/thread/35ad2797/
Best regards,
Romain
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-08 20:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25 23:12 [Buildroot] [PATCH v2 1/1] package/sispmctl: fix static linking Romain Naour
2014-08-26 6:47 ` Phil Eichinger
2014-08-28 21:42 ` Romain Naour
2014-10-05 21:36 ` Thomas Petazzoni
2014-10-08 20:17 ` Romain Naour
2014-10-08 20:29 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox