Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket33624 044 01 #1803

Closed
wants to merge 5 commits into from
Closed

Conversation

Labels
None yet
Projects
None yet
4 participants
@dgoulet-tor
Copy link
Contributor

@dgoulet-tor dgoulet-tor commented Mar 17, 2020

No description provided.

dgoulet-tor added 5 commits Mar 17, 2020
Either we do it or we don't. It is still good practice to do it because
apparently certain old shell have trouble comparing empty strings. Also, if
the variable is expanded with something that contains a dash, it will be
passed to "test" instead of evaluated by it.

Furthermore, the lack of 'x' in the tested string made some features not to
work and one of them is building OpenSSL statically.

Part of #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
Only if libevent was installed the library would be in place but if not, it
stays in .libs/

Part of #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
When attempting to search for OpenSSL library, pass the -ldl -lpthread linker
flag so it can properly build and not fail all the time by being unable to
find pthread functions.

Part of #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
These were noticed when trying to build OpenSSL statically

Part of #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
The OPENSSL_VERSION is a define in the OpenSSL library that indicate a type of
version that can be passed to OpenSSL_version() in order to get the string
representation of the OpenSSL version.

OPENSSL_VERSION is defined in <openssl/crypto.h> which is includes by almost
all headers. Furthermore, SSLEAY_VERSION only exists for API compatibility and
defaults to OPENSSL_VERSION.

When statically building OpenSSL, we end up redefining OPENSSL_VERSION which
creates a compilation error because we include our compat OpenSSL header
_before_ any OpenSSL headers.

Closes #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
@coveralls
Copy link

@coveralls coveralls commented Mar 17, 2020

Pull Request Test Coverage Report for Build 8408

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 63.872%

Totals Coverage Status
Change from base Build 8407: 0.0%
Covered Lines: 50570
Relevant Lines: 79174

💛 - Coveralls

@@ -861,7 +861,8 @@ if test "x$enable_static_libevent" = "xyes"; then
if test "x$tor_cv_library_libevent_dir" = "x(system)"; then
AC_MSG_ERROR("You must specify an explicit --with-libevent-dir=x option when using --enable-static-libevent")
else
TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent.a $STATIC_LIBEVENT_FLAGS"
dnl If libevent was _not_ installed, the library is in .libs/.
TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent.a $TOR_LIBDIR_libevent/.libs/libevent.a $STATIC_LIBEVENT_FLAGS"
Copy link
Contributor

@nmathewson nmathewson Mar 18, 2020

Does this work? I think this would make us expect different libraries in the two different locations. What happens if both libraries are present? Maybe we should check which one we have.

@@ -958,7 +958,7 @@ AC_ARG_WITH(ssl-dir,
])

AC_MSG_NOTICE([Now, we'll look for OpenSSL >= 1.0.1])
TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI $TOR_LIB_WS32],
TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto -ldl -lpthread $TOR_LIB_GDI $TOR_LIB_WS32],
Copy link
Contributor

@nmathewson nmathewson Mar 18, 2020

I think these libraries are posix-only?

@torproject-pusher torproject-pusher deleted the branch torproject:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment