Hello Kishore, Such problems are frequent with the libevent library. For some reason the linker doesn’t want to look at your path. One dirty way to fix this problem is to create a symbolic link in /usr/lib64/ named libevent-2.0.so.5 pointing to the correct library in your path.
Regards, Djordje ________________________________________ From: kishore kumar [[email protected]] Sent: Tuesday, November 04, 2014 7:49 PM To: Djordje Jevdjic Cc: [email protected] Subject: Building datacache load tester on SPARC running Solaris Hi, First of all, thank you very much for making easy to use data cache benchmark program. So far it is fantastic. While I am able to build it without any problems on x86 running LInux, I am facing compiler errors in building it on SPARC running Solaris. I am getting the problems even though I correctly provide the libevent library and include paths. Please see below. I really appreciate your help. Thank you. # make gcc -O3 -Wall -L/root/kishore/libevent/lib/ -I/root/kishore/libevent/include -pthread -lm -D_GNU_SOURCE *.c -o loader Undefined first referenced symbol in file event_priority_set /var/tmp//ccS6amWu.o event_base_new /var/tmp//ccS6amWu.o event_base_loop /var/tmp//ccS6amWu.o gethostbyname /var/tmp//ccR6amWu.o socket /var/tmp//ccJ6amWu.o setsockopt /var/tmp//ccJ6amWu.o connect /var/tmp//ccJ6amWu.o event_add /var/tmp//ccS6amWu.o event_new /var/tmp//ccS6amWu.o inet_pton /var/tmp//ccJ6amWu.o inet_ntoa /var/tmp//ccR6amWu.o event_base_priority_init /var/tmp//ccS6amWu.o ld: fatal: symbol referencing errors collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `all' # cat Makefile all: *.c *.h gcc -O3 -Wall -L/root/kishore/libevent/lib/ -I/root/kishore/libevent/include -pthread -lm -D_GNU_SOURCE *.c -o loader clean: rm loader # ls -l /root/kishore/libevent/lib/ total 9428 lrwxrwxrwx 1 root root 26 Nov 3 08:38 libevent_core-2.0.so.5 -> libevent_core-2.0.so.5.1.9 -rwxr-xr-x 1 root root 541840 Nov 3 08:38 libevent_core-2.0.so.5.1.9 -rw-r--r-- 1 root root 763988 Nov 3 08:38 libevent_core.a -rwxr-xr-x 1 root root 1020 Nov 3 08:38 libevent_core.la<http://libevent_core.la> lrwxrwxrwx 1 root root 26 Nov 3 08:38 libevent_core.so -> libevent_core-2.0.so.5.1.9 lrwxrwxrwx 1 root root 27 Nov 3 08:38 libevent_extra-2.0.so.5 -> libevent_extra-2.0.so.5.1.9 -rwxr-xr-x 1 root root 327828 Nov 3 08:38 libevent_extra-2.0.so.5.1.9 -rw-r--r-- 1 root root 447920 Nov 3 08:38 libevent_extra.a -rwxr-xr-x 1 root root 1027 Nov 3 08:38 libevent_extra.la<http://libevent_extra.la> lrwxrwxrwx 1 root root 27 Nov 3 08:38 libevent_extra.so -> libevent_extra-2.0.so.5.1.9 lrwxrwxrwx 1 root root 29 Nov 3 08:38 libevent_openssl-2.0.so.5 -> libevent_openssl-2.0.so.5.1.9 -rwxr-xr-x 1 root root 83824 Nov 3 08:38 libevent_openssl-2.0.so.5.1.9 -rw-r--r-- 1 root root 92352 Nov 3 08:38 libevent_openssl.a -rwxr-xr-x 1 root root 1056 Nov 3 08:38 libevent_openssl.la<http://libevent_openssl.la> lrwxrwxrwx 1 root root 29 Nov 3 08:38 libevent_openssl.so -> libevent_openssl-2.0.so.5.1.9 lrwxrwxrwx 1 root root 30 Nov 3 08:38 libevent_pthreads-2.0.so.5 -> libevent_pthreads-2.0.so.5.1.9 -rwxr-xr-x 1 root root 16236 Nov 3 08:38 libevent_pthreads-2.0.so.5.1.9 -rw-r--r-- 1 root root 12124 Nov 3 08:38 libevent_pthreads.a -rwxr-xr-x 1 root root 1048 Nov 3 08:38 libevent_pthreads.la<http://libevent_pthreads.la> lrwxrwxrwx 1 root root 30 Nov 3 08:38 libevent_pthreads.so -> libevent_pthreads-2.0.so.5.1.9 lrwxrwxrwx 1 root root 21 Nov 3 08:38 libevent-2.0.so.5 -> libevent-2.0.so.5.1.9 -rwxr-xr-x 1 root root 853444 Nov 3 08:38 libevent-2.0.so.5.1.9 -rw-r--r-- 1 root root 1211768 Nov 3 08:38 libevent.a -rwxr-xr-x 1 root root 985 Nov 3 08:38 libevent.la<http://libevent.la> lrwxrwxrwx 1 root root 21 Nov 3 08:38 libevent.so -> libevent-2.0.so.5.1.9 drwxr-xr-x 2 root root 5 Nov 3 08:38 pkgconfig # ls -l /root/kishore/libevent/include/ total 30 -rw-r--r-- 1 root root 1974 Nov 3 08:38 evdns.h -rw-r--r-- 1 root root 2760 Nov 3 08:38 event.h drwxr-xr-x 2 root root 27 Nov 3 08:38 event2 -rw-r--r-- 1 root root 1990 Nov 3 08:38 evhttp.h -rw-r--r-- 1 root root 1970 Nov 3 08:38 evrpc.h -rw-r--r-- 1 root root 1737 Nov 3 08:38 evutil.h Best, Kishore Pusukuri http://www.cs.ucr.edu/~kishore
