Re: undefined reference to `CRYPTO_set_id_callback'
Flo Rance <[email protected]> Thu, 28 Nov 2019 12:09:20 +0100
| Newsgroups | gmane.network.stunnel.user |
|---|---|
| Message-ID | <CAHogYcUsAXKUTr8P4vvUE6W5_Ywz=ddYp+tvhWhXhAjQf-0_xw@mail.gmail.com> |
--===============5913932358713295142==
Content-Type: multipart/alternative; boundary="000000000000504770059866278a"
--000000000000504770059866278a
Content-Type: text/plain; charset="UTF-8"
If I understand correctly, CRYPTO_set_id_callback has been deprecated since
version 1.0
So you don't use the right version of openssl or deprecated code is
compiled in (OPENSSL_NO_DEPRECATED is not set).
#if OPENSSL_VERSION_NUMBER<0x10000000L || !defined(OPENSSL_NO_DEPRECATED)
CRYPTO_set_id_callback(stunnel_thread_id);
#endif
On Thu, 28 Nov 2019 at 05:13, Somchai Smythe <[email protected]>
wrote:
> Version 5.56 of stunnel, but I got the same error on 5.55. I didn't
> report it for 5.55 since 5.56 came out and I had hoped that would fix
> it.
>
> The configure line was this:
> CC=gcc \
> CFLAGS='-O3 -m64 -march=x86-64 -mtune=generic -pipe -std=gnu17' \
> ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
> --mandir=/usr/man --disable-libwrap --with-pic
>
> Then I did a make -j4. Should I avoid parallel builds?
>
>
> On 11/27/19, Flo Rance <[email protected]> wrote:
> > Which version of stunnel ?
> >
> > On Wed, 27 Nov 2019 at 11:56, Somchai Smythe <
> [email protected]>
> > wrote:
> >
> >> How do I fix this?
> >>
> >> gcc -DHAVE_CONFIG_H -I. -I/usr/kerberos/include -I/usr/include
> >> -DLIBDIR='"/usr/lib/stunnel"' -DCONFDIR='"/etc/stunnel"' -O3 -m64
> >> -march=x86-64 -mtune=generic -pipe -std=gnu17 -pthread -Wall -Wextra
> >> -Wpedantic -Wformat=2 -Wconversion -Wno-long-long
> >> -Wno-deprecated-declarations -fPIE -fstack-protector
> >> -D_FORTIFY_SOURCE=2 -MT stunnel-sthreads.o -MD -MP -MF
> >> .deps/stunnel-sthreads.Tpo -c -o stunnel-sthreads.o `test -f
> >> 'sthreads.c' || echo './'`sthreads.c
> >> sthreads.c: In function 'thread_id_init':
> >> sthreads.c:116:5: warning: implicit declaration of function
> >> 'CRYPTO_set_id_callback'; did you mean 'CRYPTO_set_locking_callback'?
> >> [-Wimplicit-function-declaration]
> >> 116 | CRYPTO_set_id_callback(stunnel_thread_id);
> >> | ^~~~~~~~~~~~~~~~~~~~~~
> >> | CRYPTO_set_locking_callback
> >>
> >> ...
> >>
> >> libtool: link: ( cd ".libs" && rm -f "libstunnel.la" && ln -s
> >> "../libstunnel.la" "libstunnel.la" )
> >>
> >>
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> >> stunnel-sthreads.o: in function `sthreads_init':
> >> sthreads.c:(.text+0xb0): undefined reference to `CRYPTO_set_id_callback'
> >>
> >>
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> >> stunnel-sthreads.o: in function `thread_id_init':
> >> sthreads.c:(.text+0x3a): undefined reference to `CRYPTO_set_id_callback'
> >> collect2: error: ld returned 1 exit status
> >> make[2]: *** [Makefile:550: stunnel] Error 1
> >>
> >> I'm using openssl-1.1.1d if it matters.
> >> _______________________________________________
> >> stunnel-users mailing list
> >> [email protected]
> >> https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
> >>
> >
>
--000000000000504770059866278a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>If I understand correctly, CRYPTO_set_id_callback has=
been deprecated since version 1.0</div><div><br></div><div>So you don'=
t use the right version of openssl or deprecated code is compiled in (OPENS=
SL_NO_DEPRECATED is not set).<br></div><div><br></div><div>#if OPENSSL_VERS=
ION_NUMBER<0x10000000L || !defined(OPENSSL_NO_DEPRECATED)<br>=C2=A0 =C2=
=A0 CRYPTO_set_id_callback(stunnel_thread_id);<br>#endif</div></div><br><di=
v class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, 28 No=
v 2019 at 05:13, Somchai Smythe <<a href=3D"mailto:buraphalinuxserver@gm=
ail.com">[email protected]</a>> wrote:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d rgb(204,204,204);padding-left:1ex">Version 5.56 of stunnel, but I got the=
same error on 5.55.=C2=A0 I didn't<br>
report it for 5.55 since 5.56 came out and I had hoped that would fix<br>
it.<br>
<br>
The configure line was this:<br>
CC=3Dgcc \<br>
CFLAGS=3D'-O3 -m64 -march=3Dx86-64 -mtune=3Dgeneric -pipe -std=3Dgnu17&=
#39; \<br>
./configure --prefix=3D/usr --sysconfdir=3D/etc --localstatedir=3D/var<br>
--mandir=3D/usr/man --disable-libwrap --with-pic<br>
<br>
Then I did a make -j4.=C2=A0 Should I avoid parallel builds?<br>
<br>
<br>
On 11/27/19, Flo Rance <<a href=3D"mailto:[email protected]" target=3D=
"_blank">[email protected]</a>> wrote:<br>
> Which version of stunnel ?<br>
><br>
> On Wed, 27 Nov 2019 at 11:56, Somchai Smythe <<a href=3D"mailto:bur=
[email protected]" target=3D"_blank">[email protected]</=
a>><br>
> wrote:<br>
><br>
>> How do I fix this?<br>
>><br>
>> gcc -DHAVE_CONFIG_H -I.=C2=A0 -I/usr/kerberos/include -I/usr/inclu=
de<br>
>> -DLIBDIR=3D'"/usr/lib/stunnel"' -DCONFDIR=3D'=
;"/etc/stunnel"'=C2=A0 =C2=A0-O3 -m64<br>
>> -march=3Dx86-64 -mtune=3Dgeneric -pipe -std=3Dgnu17 -pthread -Wall=
-Wextra<br>
>> -Wpedantic -Wformat=3D2 -Wconversion -Wno-long-long<br>
>> -Wno-deprecated-declarations -fPIE -fstack-protector<br>
>> -D_FORTIFY_SOURCE=3D2 -MT stunnel-sthreads.o -MD -MP -MF<br>
>> .deps/stunnel-sthreads.Tpo -c -o stunnel-sthreads.o `test -f<br>
>> 'sthreads.c' || echo './'`sthreads.c<br>
>> sthreads.c: In function 'thread_id_init':<br>
>> sthreads.c:116:5: warning: implicit declaration of function<br>
>> 'CRYPTO_set_id_callback'; did you mean 'CRYPTO_set_loc=
king_callback'?<br>
>> [-Wimplicit-function-declaration]<br>
>>=C2=A0 =C2=A0116 |=C2=A0 =C2=A0 =C2=A0CRYPTO_set_id_callback(stunne=
l_thread_id);<br>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0^~~~~~~~~~~~~~~~~~~=
~~~<br>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0CRYPTO_set_locking_=
callback<br>
>><br>
>> ...<br>
>><br>
>> libtool: link: ( cd ".libs" && rm -f "<a hr=
ef=3D"http://libstunnel.la" rel=3D"noreferrer" target=3D"_blank">libstunnel=
.la</a>" && ln -s<br>
>> "../<a href=3D"http://libstunnel.la" rel=3D"noreferrer" targe=
t=3D"_blank">libstunnel.la</a>" "<a href=3D"http://libstunnel.la"=
rel=3D"noreferrer" target=3D"_blank">libstunnel.la</a>" )<br>
>><br>
>> /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux=
-gnu/bin/ld:<br>
>> stunnel-sthreads.o: in function `sthreads_init':<br>
>> sthreads.c:(.text+0xb0): undefined reference to `CRYPTO_set_id_cal=
lback'<br>
>><br>
>> /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux=
-gnu/bin/ld:<br>
>> stunnel-sthreads.o: in function `thread_id_init':<br>
>> sthreads.c:(.text+0x3a): undefined reference to `CRYPTO_set_id_cal=
lback'<br>
>> collect2: error: ld returned 1 exit status<br>
>> make[2]: *** [Makefile:550: stunnel] Error 1<br>
>><br>
>> I'm using openssl-1.1.1d if it matters.<br>
>> _______________________________________________<br>
>> stunnel-users mailing list<br>
>> <a href=3D"mailto:[email protected]" target=3D"_blank">stu=
[email protected]</a><br>
>> <a href=3D"https://www.stunnel.org/cgi-bin/mailman/listinfo/stunne=
l-users" rel=3D"noreferrer" target=3D"_blank">https://www.stunnel.org/cgi-b=
in/mailman/listinfo/stunnel-users</a><br>
>><br>
><br>
</blockquote></div>
--000000000000504770059866278a--
--===============5913932358713295142==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
stunnel-users mailing list
[email protected]
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
--===============5913932358713295142==--