Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #196954 > unrolled thread
| Started by | Charlie Gibbs <cgibbs@surfnaked.ca> |
|---|---|
| First post | 2018-06-26 17:20 +0200 |
| Last post | 2018-06-26 17:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.debian.user
Can't link to OpenSSL on my laptop Charlie Gibbs <cgibbs@surfnaked.ca> - 2018-06-26 17:20 +0200
Re: Can't link to OpenSSL on my laptop The Wanderer <wanderer@fastmail.fm> - 2018-06-26 17:40 +0200
Re: Can't link to OpenSSL on my laptop Guillaume Clercin <gclercin@intellique.com> - 2018-06-26 17:40 +0200
| From | Charlie Gibbs <cgibbs@surfnaked.ca> |
|---|---|
| Date | 2018-06-26 17:20 +0200 |
| Subject | Can't link to OpenSSL on my laptop |
| Message-ID | <w4XV7-20G-5@gated-at.bofh.it> |
I've written a software suite using openssl-1.1.0f and libssh2-1.8.0. On my main development box, everything compiles fine, but on my laptop it can't find the OpenSSL library. Here's my console output: cc -c revdate.c cc -O -DLINUX -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -o linux/GenStart GenStart.c revdate.o linuxo/genesis.a -lcurses -lssh2 -lssl -lcrypto linuxo/genesis.a(gensock.o): In function `socksslstart': gensock.c:(.text+0x1c9): undefined reference to `OPENSSL_init_ssl' gensock.c:(.text+0x1d8): undefined reference to `OPENSSL_init_ssl' gensock.c:(.text+0x1e6): undefined reference to `TLS_server_method' gensock.c:(.text+0x3f1): undefined reference to `TLS_client_method' /usr/bin/ld: linuxo/genesis.a(gensock.o): unrecognized relocation (0x2a) in section `.text' /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status make: *** [linux/GenStart] Error 1 makefile.lnx:376: recipe for target 'linux/GenStart' failed I'm running Stretch on the desktop box; "cat /etc/debian_version" returns "9.2". The failing laptop is still running a patched version of Jessie; "cat /etc/debian_version" returns "jessie/sid". Both are 64-bit systems. Do I need to upgrade my laptop? -- cgibbs@surfnaked.ca (Charlie Gibbs)
[toc] | [next] | [standalone]
| From | The Wanderer <wanderer@fastmail.fm> |
|---|---|
| Date | 2018-06-26 17:40 +0200 |
| Message-ID | <w4Yet-275-1@gated-at.bofh.it> |
| In reply to | #196954 |
[Multipart message — attachments visible in raw view] — view raw
On 2018-06-26 at 11:16, Charlie Gibbs wrote:
> I've written a software suite using openssl-1.1.0f and libssh2-1.8.0.
> On my main development box, everything compiles fine, but on my laptop
> it can't find the OpenSSL library. Here's my console output:
>
> cc -c revdate.c
> cc -O -DLINUX -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0
> -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0
> -lglib-2.0 -o linux/GenStart GenStart.c revdate.o linuxo/genesis.a
> -lcurses -lssh2 -lssl -lcrypto
> linuxo/genesis.a(gensock.o): In function `socksslstart':
> gensock.c:(.text+0x1c9): undefined reference to `OPENSSL_init_ssl'
> gensock.c:(.text+0x1d8): undefined reference to `OPENSSL_init_ssl'
> gensock.c:(.text+0x1e6): undefined reference to `TLS_server_method'
> gensock.c:(.text+0x3f1): undefined reference to `TLS_client_method'
> /usr/bin/ld: linuxo/genesis.a(gensock.o): unrecognized relocation (0x2a)
> in section `.text'
> /usr/bin/ld: final link failed: Bad value
> collect2: error: ld returned 1 exit status
> make: *** [linux/GenStart] Error 1
> makefile.lnx:376: recipe for target 'linux/GenStart' failed
>
> I'm running Stretch on the desktop box; "cat /etc/debian_version"
> returns "9.2". The failing laptop is still running a patched version of
> Jessie; "cat /etc/debian_version" returns "jessie/sid". Both are 64-bit
> systems.
What version of ld are you running on each? ('apt-cache policy binutils'
or 'ld --version' should tell you.)
According to my reading of the (current?) first answer on
https://stackoverflow.com/questions/46058050/unable-to-compile-unrecognized-relocation
this failure occurs when:
* A version of ld which supports a new relocation type has been released.
* A library has been compiled using that new version.
* You attempt to link against that library using an older version of ld,
which does not yet support that new relocation type.
> Do I need to upgrade my laptop?
As a whole, probably not.
You probably do need to upgrade the binutils package, however - and the
dependencies involved in doing that may result in upgrading enough other
low-level things that you might want to upgrade the rest of the system
along with it.
--
The Wanderer
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw
[toc] | [prev] | [next] | [standalone]
| From | Guillaume Clercin <gclercin@intellique.com> |
|---|---|
| Date | 2018-06-26 17:40 +0200 |
| Message-ID | <w4Yet-275-7@gated-at.bofh.it> |
| In reply to | #196954 |
[Multipart message — attachments visible in raw view] — view raw
Le mardi 26 juin 2018, 17:16:59 CEST Charlie Gibbs a écrit : > I've written a software suite using openssl-1.1.0f and libssh2-1.8.0. > On my main development box, everything compiles fine, but on my laptop > it can't find the OpenSSL library. Here's my console output: > > cc -c revdate.c > cc -O -DLINUX -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 > -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 > -lglib-2.0 -o linux/GenStart GenStart.c revdate.o linuxo/genesis.a > -lcurses -lssh2 -lssl -lcrypto > linuxo/genesis.a(gensock.o): In function `socksslstart': > gensock.c:(.text+0x1c9): undefined reference to `OPENSSL_init_ssl' > gensock.c:(.text+0x1d8): undefined reference to `OPENSSL_init_ssl' > gensock.c:(.text+0x1e6): undefined reference to `TLS_server_method' > gensock.c:(.text+0x3f1): undefined reference to `TLS_client_method' > /usr/bin/ld: linuxo/genesis.a(gensock.o): unrecognized relocation (0x2a) > in section `.text' > /usr/bin/ld: final link failed: Bad value > collect2: error: ld returned 1 exit status > make: *** [linux/GenStart] Error 1 > makefile.lnx:376: recipe for target 'linux/GenStart' failed > > I'm running Stretch on the desktop box; "cat /etc/debian_version" > returns "9.2". The failing laptop is still running a patched version of > Jessie; "cat /etc/debian_version" returns "jessie/sid". Both are 64-bit > systems. > > Do I need to upgrade my laptop? According to the man page, these functions has been introduced in version 1.1 of OpenSSL (only available in stretch and no jessie-backports). So I think it's time to upgrade. -- Guillaume Clercin Intellique www.intellique.com Tél: 01 78 94 84 06
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web