Missing -lpthread for libssl / libcrypto (LibreSSL) when compiling U-Boot

Rafał Miłecki zajec5 at gmail.com
Wed Oct 13 01:30:03 PDT 2021

On 13.10.2021 10:23, Andre Heider wrote:
> On 13/10/2021 10:10, Rafał Miłecki wrote:
>> *** Manual pkg-config test ***
>> I'm not sure if I test it correctly but output looks OK:
>> $ PATH=/home/rmilecki/openwrt/openwrt-master-bcm4908/staging_dir/host/bin:$PATH ./staging_dir/host/bin/pkg-config --libs libssl libcrypto
>> -L/lib64 -lssl -lcrypto
> I think -L should point at ./staging_dir/host/lib or whereever the libraris from the libressl host package are, since we're building against that and not against your system open/libressl?

This may be a result of my manual pkg-config call with hacked PATH. I'm
not sure how to fully emulate OpenWrt's context for calling it. That was
meant only for a quick test of --static switch (which appears to work).

I guess if we can make:
1. pkg-config work in U-Boot building context
2. U-Boot use --static

That could fix building issue.

More information about the openwrt-devel mailing list