From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Daniel Sangue <daniel.sangue@sangue.ch>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/libftdi1: fix static build with libusb and -latomic
Date: Sat, 10 Dec 2022 09:47:32 +0100 [thread overview]
Message-ID: <20221210084732.GR2855@scaer> (raw)
In-Reply-To: <20221208202338.4085-1-fontaine.fabrice@gmail.com>
Fabrice, All,
On 2022-12-08 21:23 +0100, Fabrice Fontaine spake thusly:
> Use pkg-config to retrieve libusb dependencies such as -latomic and
> avoid the following static build failure raised since bump of libusb to
> version 1.0.25 in commit aad609936fc83acfe1eac6ffc86d29ac35dcf54e:
>
> /nvmedata/autobuild/instance-29/output-1/per-package/libftdi1/host/bin/../lib/gcc/sparc-buildroot-linux-uclibc/10.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /nvmedata/autobuild/instance-29/output-1/per-package/libftdi1/host/sparc-buildroot-linux-uclibc/sysroot/lib/libusb-1.0.a(core.o): in function `libusb_unref_device':
> /nvmedata/autobuild/instance-29/output-1/build/libusb-1.0.25/libusb/core.c:1186: undefined reference to `__atomic_fetch_add_4'
>
> Fixes:
> - http://autobuild.buildroot.org/results/1ca7cd85ae60ad4797a6d8a83b2fb51d7eab96d9
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> ...ix-static-build-with-libusb-and-lato.patch | 47 +++++++++++++++++++
> package/libftdi1/libftdi1.mk | 2 +-
> 2 files changed, 48 insertions(+), 1 deletion(-)
> create mode 100644 package/libftdi1/0003-CMakeLists.txt-fix-static-build-with-libusb-and-lato.patch
>
> diff --git a/package/libftdi1/0003-CMakeLists.txt-fix-static-build-with-libusb-and-lato.patch b/package/libftdi1/0003-CMakeLists.txt-fix-static-build-with-libusb-and-lato.patch
> new file mode 100644
> index 0000000000..c818c58d68
> --- /dev/null
> +++ b/package/libftdi1/0003-CMakeLists.txt-fix-static-build-with-libusb-and-lato.patch
> @@ -0,0 +1,47 @@
> +From b5b8fab6063ad90bb5ef05a72708ecde1796bc81 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Fri, 13 May 2022 18:11:50 +0200
> +Subject: [PATCH] CMakeLists.txt: fix static build with libusb and -latomic
> +
> +Use pkg-config to retrieve libusb dependencies such as -latomic and
> +avoid the following static build failure:
> +
> +/nvmedata/autobuild/instance-29/output-1/per-package/libftdi1/host/bin/../lib/gcc/sparc-buildroot-linux-uclibc/10.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /nvmedata/autobuild/instance-29/output-1/per-package/libftdi1/host/sparc-buildroot-linux-uclibc/sysroot/lib/libusb-1.0.a(core.o): in function `libusb_unref_device':
> +/nvmedata/autobuild/instance-29/output-1/build/libusb-1.0.25/libusb/core.c:1186: undefined reference to `__atomic_fetch_add_4'
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/1ca7cd85ae60ad4797a6d8a83b2fb51d7eab96d9
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Retrieved from:
> +http://developer.intra2net.com/git/?p=libftdi;a=commit;h=b5b8fab6063ad90bb5ef05a72708ecde1796bc81]
> +---
> + CMakeLists.txt | 12 ++++++++++--
> + 1 files changed, 10 insertions(+), 2 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 58f664a..d20aa94 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -25,8 +25,16 @@ if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
> + endif(${CMAKE_BUILD_TYPE} STREQUAL Debug)
> +
> + # find libusb
> +-find_package ( USB1 REQUIRED )
> +-include_directories ( ${LIBUSB_INCLUDE_DIR} )
> ++find_package( PkgConfig )
> ++if (PkgConfig_FOUND)
> ++ pkg_check_modules( LIBUSB libusb-1.0 )
> ++ if (LIBUSB_FOUND)
> ++ include_directories ( ${LIBUSB_INCLUDE_DIRS} )
> ++ else()
> ++ find_package ( USB1 REQUIRED )
> ++ include_directories ( ${LIBUSB_INCLUDE_DIR} )
> ++ endif()
> ++endif()
> +
> + # Find Boost
> + if (FTDIPP OR BUILD_TESTS)
> +--
> +1.7.1
> +
> diff --git a/package/libftdi1/libftdi1.mk b/package/libftdi1/libftdi1.mk
> index d2e3f42e14..66798addc4 100644
> --- a/package/libftdi1/libftdi1.mk
> +++ b/package/libftdi1/libftdi1.mk
> @@ -8,7 +8,7 @@ LIBFTDI1_VERSION = 1.5
> LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2
> LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download
> LIBFTDI1_INSTALL_STAGING = YES
> -LIBFTDI1_DEPENDENCIES = libusb
> +LIBFTDI1_DEPENDENCIES = host-pkgconf libusb
> LIBFTDI1_LICENSE = LGPL-2.1 (libftdi1), MIT (libftdi1)
> LIBFTDI1_LICENSE_FILES = LICENSE COPYING.LIB
> LIBFTDI1_CONFIG_SCRIPTS = libftdi1-config
> --
> 2.35.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-12-10 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 20:23 [Buildroot] [PATCH 1/1] package/libftdi1: fix static build with libusb and -latomic Fabrice Fontaine
2022-12-09 9:01 ` Yegor Yefremov via buildroot
2022-12-10 8:47 ` Yann E. MORIN [this message]
2022-12-10 14:51 ` Yann E. MORIN
2022-12-20 7:44 ` Peter Korsgaard
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=20221210084732.GR2855@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=daniel.sangue@sangue.ch \
--cc=fontaine.fabrice@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.