curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: 'curl: (1) Error' when using curl with --http2 option

From: rostokus . via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 22 Jun 2017 14:50:57 +0300

I have successfully resolved this issue. It appeared that I haven't set
STAGING_DIR:

STAGING_DIR=~/projects/openwrt_vanilla/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2

2017-06-22 13:47 GMT+03:00 rostokus . <rostokus_at_gmail.com>:

> I have cross compiler polarssl and nghhtp2. No I am trying to compile
> curl. I am using commands as below:
>
> PATH=/home/rspolyak/projects/openwrt_vanilla/staging_dir/
> toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/:"$PATH"
> PKG_CONFIG_PATH=/home/rspolyak/projects/curl_http2/nghttp2/build_dir/lib/pkgconfig/:$PKG_CONFIG_PATH
>
> export CROSS_COMPILE="mipsel-openwrt-linux-uclibc"
> export AR=${CROSS_COMPILE}-ar
> export AS=${CROSS_COMPILE}-as
> export LD=${CROSS_COMPILE}-ld
> export RANLIB=${CROSS_COMPILE}-ranlib
> export CC=${CROSS_COMPILE}-gcc
> export NM=${CROSS_COMPILE}-nm
>
> ./configure --prefix=${ROOTDIR}/build_dir --target=${CROSS_COMPILE}
> --host=${CROSS_COMPILE} --build=x86_64-pc-linux-gnu --without-ssl
> --with-polarssl --with-nghttp2=/home/rspolyak/projects/curl_http2/nghttp2/
> build_dir/lib
>
> Last command fails with:
>
> *checking for recv... noconfigure: error: Unable to link function recv*
>
> The same issue is mentioned here
> <https://stackoverflow.com/questions/44343570/cross-compiling-libcurl-for-arm-linux-gnueabihf-unable-to-link-function-recv>
> and here <https://cmake.org/pipermail/cmake/2008-January/019512.html>.
> But neither of them was addressed...
>
> Please advice.
>
>
> 2017-06-21 16:17 GMT+03:00 Daniel Stenberg <daniel_at_haxx.se>:
>
>> On Wed, 21 Jun 2017, rostokus . via curl-users wrote:
>>
>> root_at_mylinkit:~# curl --version
>>> curl 7.40.0 (mipsel-openwrt-linux-gnu) libcurl/7.40.0 PolarSSL/1.3.14
>>> Protocols: file ftp ftps http https
>>> Features: IPv6 Largefile SSL
>>>
>>
>> No HTTP/2 support present. The output should otherwise list both nghttp2
>> library version and http2 among the Features.
>>
>> root@mylinkit:~# curl -v --http2 https://nghttp2.org
>>> curl: (1) Error
>>>
>>
>> I can't explain why you get this weird error though. It should just say
>> that HTTP/2 isn't supported. But then 7.40.0 is pretty old and I can't
>> remember exactly how immature the HTTP/2 support was back then.
>>
>> I suspect that nghttp2 is not installed
>>>
>>
>> Well, you need curl/libcurl to get *built* with support for HTTP/2 so it
>> takes a little more than just installing nghttp2.
>>
>> p.s. I am read https://curl.haxx.se/libcurl/c/libcurl-errors.html. But
>>> still it does not explain what exactly is wrong here.
>>>
>>
>> As you're using the curl tool and not libcurl directly, this is probably
>> a better URL to check: https://curl.haxx.se/docs/manpage.html#EXIT
>>
>> "Unsupported protocol. This build of curl has no support for this
>> protocol"
>>
>> --
>>
>> / daniel.haxx.se
>>
>
>

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-06-22