You are not logged in.

#1 2011-12-10 20:35:29

dave_pederson
Member
Registered: 2011-03-26
Posts: 4

[SOLVED] openssl issue - HMAC / EVP_sha1

After a pacman update today, I have some source code that requires openssl that will no longer build.

Here is the output from a make:

gcc -Wall `pkg-config --cflags --libs openssl` test.c -o test
/tmp/ccAyu2mP.o: In function `my_hmac_sha1':
test.c:(.text+0x57): undefined reference to `EVP_sha1'
test.c:(.text+0x81): undefined reference to `HMAC'
collect2: ld returned 1 exit status
make: *** [all] Error 1

I have isolated the HMAC / SHA1 portion of my program to github:

https://github.com/davepederson/hmac_sha1_bug

I did some google-ing and found that when people get these errors they are mostly trying to build/use openssl from source.
I'm using the following, however (from arch core):

core/openssl 1.0.0.e-1 [installed]
    The Open Source toolkit for Secure Sockets Layer and Transport Layer Security

I'm running Arch x86_64 on a VirtualBox VM.  Any guidance would be appreciated.  Thanks,

-Dave

Last edited by dave_pederson (2011-12-11 03:02:25)

Offline

#2 2011-12-11 03:00:24

dave_pederson
Member
Registered: 2011-03-26
Posts: 4

Re: [SOLVED] openssl issue - HMAC / EVP_sha1

SOLVED

Just have to change the CFLAGS definition in the Makefile to be:

CFLAGS=-Wall -lssl -lcrypto -I/usr/include/openssl/ -L/usr/lib/

Offline

Board footer

Powered by FluxBB