[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #19904 [Core Tor/Tor]: evutil_secure_rng_add_bytes() not present in openbsd libevent 2
#19904: evutil_secure_rng_add_bytes() not present in openbsd libevent 2
----------------------------------------+----------------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status:
| needs_information
Priority: Medium | Milestone: Tor:
| 0.2.9.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: openbsd, TorCoreTeam201608 | Actual Points: 0
Parent ID: | Points: 0
Reviewer: | Sponsor:
----------------------------------------+----------------------------------
Comment (by rubiate):
Nope, it can't find evutil_secure_rng_add_bytes or
evutil_secure_rng_set_urandom_device_file because it's still looking with
-levent
configure:8355: checking for evutil_secure_rng_set_urandom_device_file
configure:8355: gcc -std=gnu99 -o conftest -g -O2 -I/usr/local/include
-I${top_srcdir}/src/common -L/usr/local/lib conftest.c -levent
-lpthread >&5
/tmp//cc7rk6IF.o: In function `main':
/tor/conftest.c:99: undefined reference to
`evutil_secure_rng_set_urandom_device_file'
[...]
configure:8355: checking for evutil_secure_rng_add_bytes
configure:8355: gcc -std=gnu99 -o conftest -g -O2 -I/usr/local/include
-I${top_srcdir}/src/common -L/usr/local/lib conftest.c -levent
-lpthread >&5
/tmp//cc2XrDZc.o: In function `main':
/tor/conftest.c:99: undefined reference to
`evutil_secure_rng_add_bytes'
With things moved around, it can find
evutil_secure_rng_set_urandom_device_file
configure:8507: checking for evutil_secure_rng_set_urandom_device_file
configure:8507: gcc -std=gnu99 -o conftest -g -O2 -I/usr/local/include
-I${top_srcdir}/src/common -L/usr/local/lib conftest.c -levent_extra
-levent_core -lpthread >&5
configure:8507: $? = 0
configure:8507: result: yes
[...]
configure:8507: checking for evutil_secure_rng_add_bytes
configure:8507: gcc -std=gnu99 -o conftest -g -O2 -I/usr/local/include
-I${top_srcdir}/src/common -L/usr/local/lib conftest.c -levent_extra
-levent_core -lpthread >&5
/tmp//ccmjPCe2.o: In function `main':
/tor/conftest.c:103: undefined reference to
`evutil_secure_rng_add_bytes'
Updated to apply against current master:
{{{
diff --git a/configure.ac b/configure.ac
index f6edb3a..23371d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -490,21 +490,17 @@ void *event_init(void);],
event_init();
], [--with-libevent-dir], [/opt/libevent])
-dnl Now check for particular libevent functions.
+dnl Determine the incantation needed to link libevent.
save_LIBS="$LIBS"
save_LDFLAGS="$LDFLAGS"
save_CPPFLAGS="$CPPFLAGS"
-LIBS="-levent $STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $LIBS"
+
+LIBS="$STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $save_LIBS"
LDFLAGS="$TOR_LDFLAGS_libevent $LDFLAGS"
CPPFLAGS="$TOR_CPPFLAGS_libevent $CPPFLAGS"
-AC_CHECK_FUNCS([evutil_secure_rng_set_urandom_device_file \
- evutil_secure_rng_add_bytes \
-])
AC_CHECK_HEADERS(event2/event.h event2/dns.h event2/bufferevent_ssl.h)
-LIBS="$STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $save_LIBS"
-
if test "$enable_static_libevent" = "yes"; then
if test "$tor_cv_library_libevent_dir" = "(system)"; then
AC_MSG_ERROR("You must specify an explicit --with-libevent-dir=x
option when using --enable-static-libevent")
@@ -527,6 +523,11 @@ else
fi
fi
+dnl Now check for particular libevent functions.
+AC_CHECK_FUNCS([evutil_secure_rng_set_urandom_device_file \
+ evutil_secure_rng_add_bytes \
+])
+
LIBS="$save_LIBS"
LDFLAGS="$save_LDFLAGS"
CPPFLAGS="$save_CPPFLAGS"
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19904#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs