Im looking for an stunnel 5.x RPM for Centos 6.5 so I can get TLS1.2 support. Ive looked everywhere, but cannot find one. Ive tried downloading and compiling, as per another question on here (title: Stunnel 5.4 on Centos ), and followed all the instructions, but am running into compile errors.

The command is: rpmbuild -ta stunnel-5.46.tar.gz

Here is an example.

client.c:147: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
client.c:180: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
client.c:203: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'

/root/rpmbuild/BUILD/stunnel-5.46/src/client.c:487: undefined reference to `OpenSSL_version_num'
/root/rpmbuild/BUILD/stunnel-5.46/src/client.c:487: undefined reference to `OpenSSL_version_num'
/root/rpmbuild/BUILD/stunnel-5.46/src/client.c:488: undefined reference to `OpenSSL_version_num'

/root/rpmbuild/BUILD/stunnel-5.46/src/stunnel.c:897: undefined reference to `OpenSSL_version'
/root/rpmbuild/BUILD/stunnel-5.46/src/stunnel.c:899: undefined reference to `OpenSSL_version'
/root/rpmbuild/BUILD/stunnel-5.46/src/stunnel.c:900: undefined reference to `OpenSSL_version_num'
collect2: ld returned 1 exit status
make[2]: *** [stunnel] Error 1
make[2]: Leaving directory `/root/rpmbuild/BUILD/stunnel-5.46/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/rpmbuild/BUILD/stunnel-5.46/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.mbHOf4 (%build)

If anyone can help, Id be grateful.

regards Richard

2 Answers 2


CentOS 6.9 - x86_64 .... stunnel-5.46

Setup the "rpmbuild environment" $HOME/rpms/ https://www.linuxquestions.org/questions/linux-software-2/need-rpm-package-for-php-version-5-2-7-and-up-on-redhat-5-1-a-766486/#13

$ rpm -i http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/source/tree/Packages/s/stunnel-5.46-1.fc29.src.rpm

$ cd rpms/SPECS/                      // Edit stunnel.spec to :

: 37 : # BuildRequires: systemd       // comment out "BuildRequires: systemd"
: 69 : make                           // edit to "no-pie" ( to 'make' only )

$ rpmbuild -bb stunnel.spec
Wrote: /home/knudfl/rpms/RPMS/x86_64/stunnel-5.46-1.el6.x86_64.rpm
Wrote: /home/knudfl/rpms/RPMS/x86_64/stunnel-debuginfo-5.46-1.el6.x86_64.rpm

stunnel_make.log.txt https://www.dropbox.com/s/idn5i7mrn16feor/stunnel_make.log.txt?dl=0

Package stunnel-5.46-1.el6.x86_64.rpm https://drive.google.com/file/d/1Sd7TdW9GWJppN_jqsmVE9U68gBCxn3sr/view?usp=sharing

# yum install Downloads/stunnel-5.46-1.el6.x86_64.rpm

My install test ...

# yum install /home/knudfl/rpms/RPMS/x86_64/stunnel-5.46-1.el6.x86_64.rpm
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : stunnel-5.46-1.el6.x86_64
/var/tmp/rpm-tmp.82cIfj: line 2: fg: no job control
warning: %post(stunnel-5.46-1.el6.x86_64) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package stunnel-5.46-1.el6.x86_64
  Cleanup    : stunnel-4.56-4.el6.x86_64
  Verifying  : stunnel-5.46-1.el6.x86_64
  Verifying  : stunnel-4.56-4.el6.x86_64

The "Non-fatal POSTIN scriptlet failure" is about %systemd_post stunnel.service → No systemd in CentOS 6. ... Note: Information like "line 2: fg: no job control" and warnings are not errors. Just information.

Installing the default stunnel-4.29 (again) : https://www.dropbox.com/s/tvhyt44br567jkr/stunnel_install.txt?dl=0

  • »» undefined reference to OpenSSL_version_num «« : Looks like you are using a corrupt or incomplete OpenSSL ? ... Is your openssl-devel updated to the latest update ? Or are you using a home made OpenSSL ? Jun 15, 2018 at 13:03
  • Hi, thanks for your response.. Ive followed all the instructions, and get as far as compiling. However, Im getting similar erros as before.. Ive copied the output into a log file.. dropbox.com/s/ym77m7by6p5cziv/stunnel_build.log?dl=0 Jun 15, 2018 at 13:03
  • ok. thx. How do I check that? I did an openSSL update.. Ill do a clean reinstall. Which version should I be using? Ive installed openssl-1.0.1e-57.0.1.el6.x86_64 Jun 15, 2018 at 13:04
  • »» Which version should I be using «« : There is only one version : # yum install openssl-devel will do the update. Jun 15, 2018 at 13:08
  • Thanks for your help. Ive removed and reinstalled openssl and openssl-devel using yum remove ... then reinstalled, but Im still getting the same set of errors: Packages are: openssl-1.0.1e-57.0.1.el6.x86_64 and openssl-devel-1.0.1e-57.0.1.el6.x86_64 Jun 15, 2018 at 13:14

TLS v1.2 is already supported in stunnel 4.56 available with rhel/centos 6.x.

However, 6.5 is quite an old release, so you should move to 6.9 (or soon 6.10) to have latest openssl package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .