Host-build openssl and other packages

I'm packaging rust for openwrt and I need liblzma available to build the host compiler. I patched the xz Makefile to have an host build but then I noticed I'd also need openssl. Is there a specific rule in what has to be provided by the system and what openwrt builds for the host?

(You may wish to move this thread to the "For Developers" section.)

1 Like

@tmomas @bobafetthotmail please move it to developers section.

@aparcar, @dibdot, @jow, @hnyman, @neheb, @feckert -- any advise for the above?

liblzma and libressl are already available as tools/

1 Like

How to add them as dependency then?

Not quiet sure what you actually need, so the answer is vague.

"tools" as executables are there in any case,

If you specifically need something as a compile dependency for the host build, you can use HOST_BUILD_DEPENDS. For example:

Regarding the usage of libressl, there is a nice example in "erlang", which uses libressl for the host compilation. Not familiar with the exact mechanics, but probably similar as you need.

I was using HOST_BUILD_DEPENDS but then I was not figuring out how to add liblzma and libopenssl, I guess putting ${STAGING_DIR_HOST} in the linker paths might do the trick.

libressl does not have the symbols needed.

I managed to force it to use the available libressl ending up to pile up hacks to make libssh2 and potentially other libraries later to accept this recent version of libressl.

the provided libressl seems to not find the ca-certs:

  failed to download from `https://crates.io/api/v1/crates/aho-corasick/0.7.20/download`

Caused by:
  [60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)

Is there anything obvious to try before I start using strace to figure out what's broken?

Syncing up yesterday tree unbroke lzma and made some of the hacks unneeded, I further simplified the Makefile and at least on the Gentoo and Ubuntu it seems working as intended.

If somebody can help me sort out how to run the CI locally would be great so I can avoid the wait on the main CI.

After some digging I managed to make cargo happy with with the provided libressl so I do not have the problem anymore.

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