curl / Mailing Lists / curl-library / Single Mail

curl-library

libcurl (and curl util)+static wolfssl

From: Paweł Kopalko <pawel.kopalko_at_gmail.com>
Date: Wed, 18 Jan 2017 08:54:00 +0100

Hi
I'm trying to cross build libcurl (for MIPS) with SSL.
I've successfully compiled wolfssl, and now I'm trying to build libcurl,
but when I try to run curl utility on the target system it tells me that it
requires libwolfssl dynamic library.
Any hints how to force curl build system to link with libwolfssl.a?
This is how I configure and build libcurl (curl-7.52.1):

#!/bin/bash

export LIB_INSTALL_PATH=$BUILD_ROOT/usr/local
export PATH=$PATH:$CROSS_COMPILER_BIN
export CFLAGS="-I$CROSS_COMPILER_ROOT -I/home/build/usr/local/include"
export CPPFLAGS=$CFLAGS
export CROSS=rsdk-linux-
export AR=${CROSS}ar
export AS=${CROSS}as
export LD=${CROSS}ld
export RANLIB=${CROSS}ranlib
export CC=${CROSS}gcc
export NM=${CROSS}nm
#adding -static to LDFLAGS makes configure say no ssl support
export LDFLAGS="-L/home/build/usr/local/lib"
#the ones below don't help
#export LIBS="-lwolfssl"
#export PKG_CONFIG="pkg-config --static"

echo "Starting cross compilation with the following flags:"
echo CROSS_BIN = $CROSS_COMPILER_BIN
echo CPPFLAGS = $CPPFLAGS
echo AR = $AR
echo AS = $AS
echo LD = $LD
echo RANLIB = $RANLIB
echo CC = $CC
echo NM = $NM
echo INSTALL = $LIB_INSTALL_PATH

sleep 1

./configure --with-cyassl --target=mips-linux --host=mips-linux
--build=i386-pc-linux-gnu --prefix=$LIB_INSTALL_PATH
--exec-prefix=$LIB_INSTALL_PATH \
--enable-static \
--disable-shared \
--disable-ldaps \
--disable-rtsp \
--disable-tftp \
--disable-pop3 \
--disable-imap \
--disable-smb \
--disable-smtp \
--disable-gopher \
--disable-crypto-auth \
--disable-ntlm-wb \
--disable-tls-srp \
--without-zlib \
--disable-telnet \

make && make install

Regards,
Pawel

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-01-18