Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/libcurl: drop override of LD_LIBRARY_PATH
@ 2023-04-25  4:33 James Knight
  2023-05-01 19:33 ` Yann E. MORIN
  2023-05-04 19:06 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: James Knight @ 2023-04-25  4:33 UTC (permalink / raw)
  To: buildroot; +Cc: James Knight

A previous commit [1] (libcurl 7.19.2) configured `LD_LIBRARY_PATH` to
prevent cross-compiling errors when target == host; however, such an
override is no longer needed [2][3] (libcurl 7.37, 7.74) and causes
build errors in some environments. Dropping the override.

Fixes:
- https://bugs.busybox.net/show_bug.cgi?id=15181

[1]: a51ce3194923430fc229fc2ad98b12795b5a1876
[2]: https://github.com/curl/curl/commit/e48a821ed580cd2897b3e1b0bc88ca9245ac234c
[3]: https://github.com/curl/curl/commit/6f3369bbcf9d0ebdaa5d141f8ca446448c24494c

Signed-off-by: James Knight <james.d.knight@live.com>
---
When using `./utils/test-pkg` with the original implementation and the
following configuration:

    BR2_PACKAGE_LIBCURL=y
    BR2_PACKAGE_LIBCURL_CURL=y
    BR2_PACKAGE_LIBCURL_OPENSSL=y
    BR2_PACKAGE_OPENSSL=y

The `libcurl` package never seems to pass the configuration stage on an
Arch development environment. For example:

    configure: OPT_OPENSSL: ~/br-test-pkg/bootlin-armv5-uclibc/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr
    configure: OPENSSL_ENABLED: 
    configure: error: --with-openssl was given but OpenSSL could not be detected
    make: *** [package/pkg-generic.mk:283: ~/br-test-pkg/bootlin-armv5-uclibc/build/libcurl-7.88.1/.stamp_configured] Error 1

or:

    configure: OPT_OPENSSL: ~/br-test-pkg/bootlin-x86-64-musl/host/x86_64-buildroot-linux-musl/sysroot/usr
    configure: OPENSSL_ENABLED: 
    configure: error: --with-openssl was given but OpenSSL could not be detected
    make: *** [package/pkg-generic.mk:283: ~/br-test-pkg/bootlin-x86-64-musl/build/libcurl-7.88.1/.stamp_configured] Error 1

With the change applied in this proposed patch, the default toolchain
configurations used by test-pkg all pass:

    $ ./utils/test-pkg -c libcurl.config -p libcurl
                        bootlin-armv5-uclibc [1/6]: OK
                         bootlin-armv7-glibc [2/6]: OK
                       bootlin-armv7m-uclibc [3/6]: OK
                         bootlin-x86-64-musl [4/6]: OK
                          br-arm-full-static [5/6]: OK
                                sourcery-arm [6/6]: OK
    6 builds, 0 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---
 package/libcurl/libcurl.mk | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index 1a1594a45e23a01fa259d0d377ef60d200309c91..dd715c1bb67202897f8a51243591676921fde24b 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -56,11 +56,6 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBCURL_OPENSSL),y)
 LIBCURL_DEPENDENCIES += openssl
-# configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up
-# native stuff during the rest of configure when target == host.
-# Fix it by setting LD_LIBRARY_PATH to something sensible so those libs
-# are found first.
-LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)/lib:/usr/lib
 LIBCURL_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr \
 	--with-ca-path=/etc/ssl/certs
 else
-- 
2.39.1.windows.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/libcurl: drop override of LD_LIBRARY_PATH
  2023-04-25  4:33 [Buildroot] [PATCH] package/libcurl: drop override of LD_LIBRARY_PATH James Knight
@ 2023-05-01 19:33 ` Yann E. MORIN
  2023-05-04 19:06 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2023-05-01 19:33 UTC (permalink / raw)
  To: James Knight; +Cc: buildroot

James, All,

On 2023-04-25 00:33 -0400, James Knight spake thusly:
> A previous commit [1] (libcurl 7.19.2) configured `LD_LIBRARY_PATH` to
> prevent cross-compiling errors when target == host; however, such an
> override is no longer needed [2][3] (libcurl 7.37, 7.74) and causes
> build errors in some environments. Dropping the override.
> 
> Fixes:
> - https://bugs.busybox.net/show_bug.cgi?id=15181
> 
> [1]: a51ce3194923430fc229fc2ad98b12795b5a1876
> [2]: https://github.com/curl/curl/commit/e48a821ed580cd2897b3e1b0bc88ca9245ac234c
> [3]: https://github.com/curl/curl/commit/6f3369bbcf9d0ebdaa5d141f8ca446448c24494c
> 
> Signed-off-by: James Knight <james.d.knight@live.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> When using `./utils/test-pkg` with the original implementation and the
> following configuration:
> 
>     BR2_PACKAGE_LIBCURL=y
>     BR2_PACKAGE_LIBCURL_CURL=y
>     BR2_PACKAGE_LIBCURL_OPENSSL=y
>     BR2_PACKAGE_OPENSSL=y
> 
> The `libcurl` package never seems to pass the configuration stage on an
> Arch development environment. For example:
> 
>     configure: OPT_OPENSSL: ~/br-test-pkg/bootlin-armv5-uclibc/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr
>     configure: OPENSSL_ENABLED: 
>     configure: error: --with-openssl was given but OpenSSL could not be detected
>     make: *** [package/pkg-generic.mk:283: ~/br-test-pkg/bootlin-armv5-uclibc/build/libcurl-7.88.1/.stamp_configured] Error 1
> 
> or:
> 
>     configure: OPT_OPENSSL: ~/br-test-pkg/bootlin-x86-64-musl/host/x86_64-buildroot-linux-musl/sysroot/usr
>     configure: OPENSSL_ENABLED: 
>     configure: error: --with-openssl was given but OpenSSL could not be detected
>     make: *** [package/pkg-generic.mk:283: ~/br-test-pkg/bootlin-x86-64-musl/build/libcurl-7.88.1/.stamp_configured] Error 1
> 
> With the change applied in this proposed patch, the default toolchain
> configurations used by test-pkg all pass:
> 
>     $ ./utils/test-pkg -c libcurl.config -p libcurl
>                         bootlin-armv5-uclibc [1/6]: OK
>                          bootlin-armv7-glibc [2/6]: OK
>                        bootlin-armv7m-uclibc [3/6]: OK
>                          bootlin-x86-64-musl [4/6]: OK
>                           br-arm-full-static [5/6]: OK
>                                 sourcery-arm [6/6]: OK
>     6 builds, 0 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
> ---
>  package/libcurl/libcurl.mk | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
> index 1a1594a45e23a01fa259d0d377ef60d200309c91..dd715c1bb67202897f8a51243591676921fde24b 100644
> --- a/package/libcurl/libcurl.mk
> +++ b/package/libcurl/libcurl.mk
> @@ -56,11 +56,6 @@ endif
>  
>  ifeq ($(BR2_PACKAGE_LIBCURL_OPENSSL),y)
>  LIBCURL_DEPENDENCIES += openssl
> -# configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up
> -# native stuff during the rest of configure when target == host.
> -# Fix it by setting LD_LIBRARY_PATH to something sensible so those libs
> -# are found first.
> -LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)/lib:/usr/lib
>  LIBCURL_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr \
>  	--with-ca-path=/etc/ssl/certs
>  else
> -- 
> 2.39.1.windows.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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/libcurl: drop override of LD_LIBRARY_PATH
  2023-04-25  4:33 [Buildroot] [PATCH] package/libcurl: drop override of LD_LIBRARY_PATH James Knight
  2023-05-01 19:33 ` Yann E. MORIN
@ 2023-05-04 19:06 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-05-04 19:06 UTC (permalink / raw)
  To: James Knight; +Cc: buildroot

>>>>> "James" == James Knight <james.d.knight@live.com> writes:

 > A previous commit [1] (libcurl 7.19.2) configured `LD_LIBRARY_PATH` to
 > prevent cross-compiling errors when target == host; however, such an
 > override is no longer needed [2][3] (libcurl 7.37, 7.74) and causes
 > build errors in some environments. Dropping the override.

 > Fixes:
 > - https://bugs.busybox.net/show_bug.cgi?id=15181

 > [1]: a51ce3194923430fc229fc2ad98b12795b5a1876
 > [2]: https://github.com/curl/curl/commit/e48a821ed580cd2897b3e1b0bc88ca9245ac234c
 > [3]: https://github.com/curl/curl/commit/6f3369bbcf9d0ebdaa5d141f8ca446448c24494c

 > Signed-off-by: James Knight <james.d.knight@live.com>

Committed to 2023.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-04 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25  4:33 [Buildroot] [PATCH] package/libcurl: drop override of LD_LIBRARY_PATH James Knight
2023-05-01 19:33 ` Yann E. MORIN
2023-05-04 19:06 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox