Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

OpenSSL weird compile issue #17

Open
andrewkatson opened this issue Dec 14, 2020 · 0 comments
Open

OpenSSL weird compile issue #17

andrewkatson opened this issue Dec 14, 2020 · 0 comments

Comments

@andrewkatson
Copy link

andrewkatson commented Dec 14, 2020

I am getting the following error when I try to compile monero. I am using bazel and am using gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0. I am using Openssl 1.1.1i.

util/netevent.c:1062: error: undefined reference to 'SSL_get1_peer_certificate'
util/netevent.c:1088: error: undefined reference to 'SSL_get1_peer_certificate'
collect2: error: ld returned 1 exit status

This is the BUILD file I wrote to wrap openssl. Also previously this was building so I am not sure why things changed.

package(default_visibility = ["//visibility:public"])

cc_library(
 name = "libssl",
 srcs = glob(["**/libssl.a"]),
 hdrs = glob(["**/ssl/**/*.h"])
)

cc_library(
 name = "libcrypto",
 srcs = glob(["**/libcrypto.a"]),
 hdrs = glob(["**/crypto/**/*.h"])
)

OpenSSL configures with

Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 1.1.1i (0x1010108fL) for linux-x86_64

I am linking with -lssl and -lcrypto.

I am thinking the issue is with unbound because it builds and somehow gets SSL_get1_peer_certificate rather than SSL_get_peer_certificate

I greped and the actual file it builds uses the correct function but the binary file has the wrong one...

This is the BUILD file I use to wrap unbound


package(default_visibility = ["//visibility:public"])

cc_library(
 name = "unbound",
 srcs = glob(["**/*.a"]),
 hdrs = glob(["**/*.h"]),
)

Even more strange is the libunbound.so does not have this issue, only libunbound.a

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant