threads / discuss / 33212

Git build fails on `make`, undefined references in libcrypto.a.

Subject: Git build fails on `make`, undefined references in libcrypto.a.

## tl;dr

3 messages between Mar 18, 2013 and Mar 18, 2013.

replies: 2people: 2as markdown or json

zero modulo· Mar 18, 2013, 04:03 UTC · lore

$ LDFLAGS="-L/sandbox/builds/lib" CPPFLAGS="-I/sandbox/builds/include" ./configure --prefix=$PREFIX

$ make […] /sandbox/builds/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup': dso_dlfcn.c:(.text+0x1b): undefined reference to `dlopen' dso_dlfcn.c:(.text+0x31): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x3b): undefined reference to `dlclose' /sandbox/builds/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func': dso_dlfcn.c:(.text+0x3c1): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x4a0): undefined reference to `dlerror' /sandbox/builds/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var': dso_dlfcn.c:(.text+0x521): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x600): undefined reference to `dlerror' /sandbox/builds/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load': dso_dlfcn.c:(.text+0x678): undefined reference to `dlopen' dso_dlfcn.c:(.text+0x6e8): undefined reference to `dlclose' dso_dlfcn.c:(.text+0x72d): undefined reference to `dlerror' /sandbox/builds/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr': dso_dlfcn.c:(.text+0x7e1): undefined reference to `dladdr' dso_dlfcn.c:(.text+0x849): undefined reference to `dlerror' /sandbox/builds/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload': dso_dlfcn.c:(.text+0x8aa): undefined reference to `dlclose' collect2: error: ld returned 1 exit status make: *** [git-imap-send] Error 1

Konstantin Khomoutov· Mar 18, 2013, 07:29 UTC · re: zero modulo · lore

Re: Git build fails on `make`, undefined references in libcrypto.a.

On Sun, Mar 17, 2013 at 10:03:37PM -0600, zero modulo wrote:
Show 7 quoted lines
> $ LDFLAGS="-L/sandbox/builds/lib" CPPFLAGS="-I/sandbox/builds/include"
> ./configure --prefix=$PREFIX
> 
> $ make
> […]
> /sandbox/builds/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
> dso_dlfcn.c:(.text+0x1b): undefined reference to `dlopen'
[...]
> make: *** [git-imap-send] Error 1

FYI, I've already tried to answer this exact question [1] with no comments from the OP.

1. http://serverfault.com/a/488604/118848
zero modulo· Mar 18, 2013, 16:04 UTC · re: Konstantin Khomoutov · lore

Re: Git build fails on `make`, undefined references in libcrypto.a.

On Mon, Mar 18, 2013 at 1:29 AM, Konstantin Khomoutov <kostix+git@007spb.ru> wrote:

> FYI, I've already tried to answer this exact question [1] with no
> comments from the OP.
>
> 1. http://serverfault.com/a/488604/118848
It is I who posted that question. :P

I haven't made any comments yet because this issue is still a work in progress. I re-compiled OpenSSL taking into consideration that libdl.a probably wasn't linked properly to libcrypto.a, and have also tried re-compiling Git afterward, but with the same errors. I have also created a .conf file for `ld.so`, and ran `sudo ldconfig` which solved some other issues I was having. Running `ldd msgfmt` revealed that run-time libraries were not being found, and after running `sudo ldconfig`, `ldd msgfmt` then showed the libgettext .so was linked. So, I solved some of my issues, and if there was an issue with statically linked libraries not being found, as in this case, then, I believe re-compiling OpenSSL with the proper LDFLAGS and CPPFLAGS would have solved the issue, but they have not.

I'm currently attempting to install GCC 4.7.2, which is having some other issues with texinfo 5.1. I can't find the link, but I someone said it could be the compiler version... since everything else that seems like might be the issue isn't fixing it, I'm going to try re-compiling OpenSSL with GCC 4.7.2 and see how that goes.

← back to recent threads