[sisyphus] Suidclamav
Шенцев Алексей Владимирович
=?iso-8859-1?q?ashen_=CE=C1_nsrz=2Eru?=
Чт Сен 21 09:58:44 MSD 2006
В сообщении от 20 сентября 2006 16:35 Damir Shayhutdinov написал(a):
> Нужно все -l<что-то-там> перенести после файлов .c
> То есть типа вот так:
> gcc -Wall -I/usr/include -s -o squidclam squidclam.c config.c clamdscan.c
> -lcrypto -lcurl -ldl -lidn -lssl -lz
> Источник непоняток - знаменитый --as-needed
Не много поправил configure, теперь она генерирует такой makefile:
$ cat Makefile
ifndef $(DESTDIR)
DESTDIR="/usr/bin"
endif
CFLAGS=-I/usr/include -lcrypto -lcurl -ldl -lidn -lssl -lz
all: squidclam.c config.c clamdscan.c
gcc -Wall -I/usr/include -lcrypto -lcurl -ldl -lidn -lssl -lz -s -o
squidclam squidclam.c config.c clamdscan.c
gdb: squidclam.c config.c clamdscan.c
gcc -Wall -I/usr/include -lcrypto -lcurl -ldl -lidn -lssl -lz -g -o
squidclam squidclam.c config.c clamdscan.c
debug: squidclam.c config.c clamdscan.c
gcc -Wall -DDEBUG -I/usr/include -lcrypto -lcurl -ldl -lidn -lssl -lz -g -O2 -o
squidclam squidclam.c config.c clamdscan.c
clean:
rm -f squidclam src/Makefile
install: squidclam
cp squidclam $(DESTDIR)/.
tar: clean
tar --owner=nobody --group=nobody -cvzC ../.. -f ../../release/squidclam-0.22.tar.gz
squidclam-0.22
md5sum ../../release/squidclam-0.22.tar.gz |
tee ../../release/squidclam-0.22.md5
Но ошибка таже на этаме make:
squidclam.c:(.text+0x410): undefined reference to `curl_global_init'
squidclam.c:(.text+0x418): undefined reference to `curl_easy_init'
squidclam.c:(.text+0x557): undefined reference to `curl_easy_setopt'
findsym выдало мне следующее:
$ findsym curl_global_cleanup
/usr/lib/libcurl.so: 000256b8 T curl_global_cleanup
/usr/lib/libcurl.so.3: 000256b8 T curl_global_cleanup
Что ещё надо сделать и как это правильно должно выглдядить? Я в c/c++ пас ...
$-)
--
С уважением Шенцев Алексей Владимирович.
E-mail: ashen на nsrz.ru
ICQ: 271053845
Подробная информация о списке рассылки Sisyphus