All of lore.kernel.org
 help / color / mirror / Atom feed
* http2 support issue in curl #yocto #raspberrypi
@ 2019-12-05  7:32 Uzair Mazhar
  2019-12-05  8:53 ` [yocto] " Paul Barker
  0 siblings, 1 reply; 8+ messages in thread
From: Uzair Mazhar @ 2019-12-05  7:32 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

Hi All,
While testing my image on raspberry pi3b, I found that curl doesn’t have http2 support.
$ curl --http2 -I https://nghttp2.org/ ( https://nghttp2.org/ )
# Unsupported protocol

I tried to search for the solution and one of the possible answer [1][2] were adding --with-nghttp2 flag to curl. For that I modified curl recipes (curl_7.64.1.bb) and added “EXTRA_OECONF = --with-nghttp2 “ along with default parameter already set in this block but it again shows the same error.

After That I have been trying to resolve this issue from over a week now as per my understanding of this issue but I am not able to solve this.

I generated rpi image by following these steps:
Cloned warrior branch of poky, meta-raspberrypi and meta-openembedded
Edited conf/local.conf to add,
LICENSE_FLAGS_WHITELIST_append = " commercial_faad2 commercial_gstreamer1.0-plugins-ugly "
IMAGE_INSTALL_append += " avs-device-sdk curl”
Edited conf/bblayer.conf to add all relevant layers (meta-raspberrypi, meta-networking etc.)
Generate image using “bitbake -k core-image-base”

I have tried to replicate whole procedure with poky “Thud” branch but in vain.

My Environment setup:
Yocto version is 2.7.0
Ubuntu~18.04.1
Linux kernel 4.15.0-66-generic
Python3 version 3.6.8
gcc/g++ 7.4.0
Git 2.17.1
[1] https://github.com/alexa/avs-device-sdk/wiki/Ubuntu-Linux-Quick-Start-Guide#authorization
[2]https://serversforhackers.com/c/curl-with-http2-support

Any help in this matter will be appreciated.
Thanks,
Uzair Mazhar Awan
Design and Verification Engineer | www.Emumba.com Office: 3rd Floor, B-Block, STP-3, I9/3, Islamabad,Pakistan

[-- Attachment #2: Type: text/html, Size: 2398 bytes --]

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

* Re: [yocto] http2 support issue in curl #yocto #raspberrypi
  2019-12-05  7:32 http2 support issue in curl #yocto #raspberrypi Uzair Mazhar
@ 2019-12-05  8:53 ` Paul Barker
  2019-12-05 10:30   ` Uzair Mazhar
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Barker @ 2019-12-05  8:53 UTC (permalink / raw)
  To: Uzair Mazhar, yocto

On Thu, 5 Dec 2019, at 07:32, Uzair Mazhar wrote:
> Hi All, 
>  While testing my image on raspberry pi3b, I found that curl doesn’t 
> have http2 support.
>  $ curl --http2 -I https://nghttp2.org/ 
>  # Unsupported protocol 
> 
> I tried to search for the solution and one of the possible answer 
> [1][2] were adding --with-nghttp2 flag to curl. For that I modified 
> curl recipes (curl_7.64.1.bb) and added “EXTRA_OECONF = --with-nghttp2 
> “ along with default parameter already set in this block but it again 
> shows the same error.

Looking at the link you gave [1], you probably need to use "--with-nghttp2=<PATH>" and add nghttp2 to DEPENDS. You may need to find or write a recipe for that library.

[1]: https://serversforhackers.com/c/curl-with-http2-support

-- 
Paul Barker

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

* Re: http2 support issue in curl #yocto #raspberrypi
  2019-12-05  8:53 ` [yocto] " Paul Barker
@ 2019-12-05 10:30   ` Uzair Mazhar
  2019-12-05 11:07     ` [yocto] " Ross Burton
  0 siblings, 1 reply; 8+ messages in thread
From: Uzair Mazhar @ 2019-12-05 10:30 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

I added nghttp2 into depends but it gave dependency chain error about nghttp2-native.
"ERROR: Nothing PROVIDES 'nghttp2-native' (but virtual:native:/mnt/sdb1/yocto_exp/poky-warrior/meta/recipes-support/curl/curl_7.64.1.bb DEPENDS on or otherwise requires it). Close matches:
gtest-native
ncp-native
gyp-native "
NOTE: Runtime target 'core-image-base' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['core-image-base', 'apt-native', 'curl-native', 'nghttp2-native']
NOTE: Runtime target 'avs-device-sdk' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['avs-device-sdk', 'cmake-native', 'curl-native', 'nghttp2-native']

[-- Attachment #2: Type: text/html, Size: 808 bytes --]

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

* Re: [yocto] http2 support issue in curl #yocto #raspberrypi
  2019-12-05 10:30   ` Uzair Mazhar
@ 2019-12-05 11:07     ` Ross Burton
  2019-12-05 11:23       ` Uzair Mazhar
  0 siblings, 1 reply; 8+ messages in thread
From: Ross Burton @ 2019-12-05 11:07 UTC (permalink / raw)
  To: Uzair Mazhar, yocto

On 05/12/2019 10:30, Uzair Mazhar wrote:
> I added nghttp2 into depends but it gave dependency chain error about 
> nghttp2-native.

As Paul said:

"You may need to find or write a recipe for that library."

layers.openembedded.org is your friend here:

https://layers.openembedded.org/layerindex/recipe/86423/

There's a recipe for this in meta-networking.

Ross

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

* Re: http2 support issue in curl #yocto #raspberrypi
  2019-12-05 11:07     ` [yocto] " Ross Burton
@ 2019-12-05 11:23       ` Uzair Mazhar
  2019-12-05 14:48         ` [yocto] " Ross Burton
  0 siblings, 1 reply; 8+ messages in thread
From: Uzair Mazhar @ 2019-12-05 11:23 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]

As I mentioned That I Cloned warrior branch of poky, meta-raspberrypi and meta-openembedded.
nghttp2 recipe is already in my repository under "meta-openembedded/meta- networking/recipes-support/ nghttp2"
but the problem is still persistent.

I tried to add nghttp2 as RDENPENDS in curl and it compiled successfully but libnghttp2 was not part of my image.

If I add nghttp2 in conf/local.conf inside "IMAGE_INSTALL_append ", the libnghttp2 becomes the part of my image under /usr/lib but again curl doesn't support http2.

[-- Attachment #2: Type: text/html, Size: 1747 bytes --]

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

* Re: [yocto] http2 support issue in curl #yocto #raspberrypi
  2019-12-05 11:23       ` Uzair Mazhar
@ 2019-12-05 14:48         ` Ross Burton
  2019-12-05 18:30           ` Uzair Mazhar
  0 siblings, 1 reply; 8+ messages in thread
From: Ross Burton @ 2019-12-05 14:48 UTC (permalink / raw)
  To: yocto

On 05/12/2019 11:23, Uzair Mazhar wrote:
> As I mentioned That I Cloned warrior branch of poky, meta-raspberrypi 
> and meta-openembedded.
> nghttp2 recipe is already in my repository under 
> "meta-openembedded/meta-networking/recipes-support/nghttp2"
> but the problem is still persistent.

Did you add meta-networking to bblayers.conf?

> I tried to add nghttp2 as RDENPENDS in curl and it compiled 
> successfully but libnghttp2 was not part of my image.

Probably because the dependency ended up on a package you didn't 
actually instally.  Also RDEPENDS are not in the sysroot, so the curl 
build wouldn't have been able to see nghttp2, you meant to add it to 
DEPENDS.

> If I add nghttp2 in conf/local.conf inside "IMAGE_INSTALL_append ", the 
> libnghttp2 becomes the part of my image under /usr/lib but again curl 
> doesn't support http2.

Adding the library to the image won't change the curl library which has 
already been built without nghttp2.


Looking at the curl recipe, nghttp2 support is there but disabled out of 
the box, so you just need to turn the support on. The recipe has:

PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"

The documentation covers the methods available to turn on/off 
PACKAGECONFIG options:

https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG

Ross

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

* Re: http2 support issue in curl #yocto #raspberrypi
  2019-12-05 14:48         ` [yocto] " Ross Burton
@ 2019-12-05 18:30           ` Uzair Mazhar
  2019-12-06 10:13             ` Uzair Mazhar
  0 siblings, 1 reply; 8+ messages in thread
From: Uzair Mazhar @ 2019-12-05 18:30 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

On Thu, Dec 5, 2019 at 07:48 PM, Ross Burton wrote:

> 
> Did you add meta-networking to bblayers.conf?

Yes! I have.

I am going to try " PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"" thing with the help of documentation and will get back to you with my findings.

Thanks,
Uzair

[-- Attachment #2: Type: text/html, Size: 411 bytes --]

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

* Re: http2 support issue in curl #yocto #raspberrypi
  2019-12-05 18:30           ` Uzair Mazhar
@ 2019-12-06 10:13             ` Uzair Mazhar
  0 siblings, 0 replies; 8+ messages in thread
From: Uzair Mazhar @ 2019-12-06 10:13 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

Hey Ross,
Thank you for your help.
The problem was I wasn't adding nghttp2 in PACKAGECONFIG??=.  Once I did it solved the http2 issue.

Regards,
Uzair

[-- Attachment #2: Type: text/html, Size: 1789 bytes --]

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

end of thread, other threads:[~2019-12-06 10:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05  7:32 http2 support issue in curl #yocto #raspberrypi Uzair Mazhar
2019-12-05  8:53 ` [yocto] " Paul Barker
2019-12-05 10:30   ` Uzair Mazhar
2019-12-05 11:07     ` [yocto] " Ross Burton
2019-12-05 11:23       ` Uzair Mazhar
2019-12-05 14:48         ` [yocto] " Ross Burton
2019-12-05 18:30           ` Uzair Mazhar
2019-12-06 10:13             ` Uzair Mazhar

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.