You are not logged in.

#1 2015-09-15 09:53:30

campo85
Member
Registered: 2012-09-05
Posts: 32

Static compilation with Openssl

Hi all guys,

I've a problem to compile statically a program that links openssl library :


gcc  -g -m32 -static -static-libgcc -static-libstdc++ -o hmac-sha1-bios-x86 ../main.c -lcrypto -lm 
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
Makefile:10: recipe for target 'hmac-sha1-bios-x86' failed
make: *** [hmac-sha1-bios-x86] Error 1

Has anyone any idea ?

Offline

#2 2015-09-15 11:50:36

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Static compilation with Openssl

Didn't test myself, but try rebuilding openssl with "options=(staticlibs)" in the PKGBUILD, and then try building your program again.

Last edited by byte (2015-09-15 11:51:51)


1000

Offline

Board footer

Powered by FluxBB