Compiling custom curl package

The curl package distributed with OpenWRT has a limited number of supported protocols:

curl -V
curl 7.66.0 (mipsel-openwrt-linux-gnu) libcurl/7.66.0 mbedTLS/2.16.9
Release-Date: 2019-09-11
Protocols: file ftp ftps http https
Features: IPv6 Largefile SSL

I need to add smtp/smtps protocol to this list.
Here is a list of my actions:

Download SDK for the OpenWRT release installed on my router.
Extract the downloaded openwrt-sdk-<...>.tar.xz file to home directory.
Change to directory with extracted SDK files.
Update and install feeds with ./scripts/feeds update -a
Prepare the curl package and its dependencies with ./scripts/feeds install curl
Run make menuconfig
Disable these default settings:
Select all target specific packages by default
Select all kernel module packages by default
Select all userspace packages by default
From the main menu expand Network->File Transfer and select the curl package by pressing “m”
From the main menu expand Libraries->libcurl and select smtp/smtps protocol as needed.
Save the configuration and exit.
Run make package/curl/download
Run make package/curl/prepare
Run make package/curl/{clean,compile} V=s
After the compilation is finished, move generated curl_7.66.0-3_mipsel_24kc.ipk file to my router.
Remove the curl distributed with OpenWRT and install the one compiled by me.
Check curl version - the list of protocols stays unchanged:

curl -V
curl 7.66.0 (mipsel-openwrt-linux-gnu) libcurl/7.66.0 mbedTLS/2.16.9
Release-Date: 2019-09-11
Protocols: file ftp ftps http https
Features: IPv6 Largefile SSL

What do I do wrong?

1 Like

libcurl, not curl. Install new libcurl package.


Not sure what you mean...
curl has 3 dependencies: libcurl4, libmbedtls12, and ca-bundle.

While installing curl built by me I have followed these steps:

  1. removed repo version of curl with dependencies
  2. installed 3 dependencies from my build
  3. installed curl from my build
    That did not work for adding protocols as I wote originally.

If you mean I should install libcurl using
./scripts/feeds install libcurl
instead of using
./scripts/feeds install curl
then the compilation result is that only the 3 dependencies mentioned above get compiled.

Move your custom libcurl*.ipk to router and install it. Not only curl*.ipk

1 Like

Sorry, but you suggest me to do the same what I have done already ...
Have you read my second post?

"installed 3 dependencies from my build" means that libcurl was one of them.

Still - libcurl is package with you should replace. Reinstall again.

If you compile the package with the same version number as the currently installed one, opkg is sometimes picky to allow you to reinstall the same version. You might need to use "--force-reinstall" option with opkg.

To avoid that, you might change bump the PKG_RELEASE variable in curl Makefile from 3 to 4, and then recompile, so that you would have curl_7.66.0-4_mipsel_24kc.ipk and libcurl_7.66.0-4_mipsel_24kc.ipk. That would look like an upgraded version to opkg, so it woudl gladöy acpt it. Then after the installation it would be easier to see with "opkg list-installed" if the new versions really got installed...

root@router2:~#  opkg list-installed | grep curl
curl - 7.66.0-3
libcurl4 - 7.66.0-3

option "--force-reinstall" did not help, however
incrementing the last curl version digit did the trick:
Thank you very much indeed!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.