Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621430 - dev-db/freetds-1.00.41 : tls.c:946:55: error: ‘TLS_ST_OK’ undeclared (first use in this function)
Summary: dev-db/freetds-1.00.41 : tls.c:946:55: error: ‘TLS_ST_OK’ undeclared (first u...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Orlitzky
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libressl-support
  Show dependency tree
 
Reported: 2017-06-10 20:20 UTC by Toralf Förster
Modified: 2019-02-21 19:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,8.51 KB, text/plain)
2017-06-10 20:20 UTC, Toralf Förster
Details
dev-db:freetds-1.00.41:20170610-201117.log (dev-db:freetds-1.00.41:20170610-201117.log,56.95 KB, text/plain)
2017-06-10 20:20 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,33.90 KB, text/plain)
2017-06-10 20:20 UTC, Toralf Förster
Details
environment (environment,66.60 KB, text/plain)
2017-06-10 20:20 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,23.28 KB, application/x-bzip)
2017-06-10 20:21 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,19.48 KB, application/x-bzip)
2017-06-10 20:21 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,24.62 KB, application/x-bzip)
2017-06-10 20:21 UTC, Toralf Förster
Details
emerge-info.txt (emerge-info.txt,16.44 KB, text/plain)
2017-08-13 17:32 UTC, Toralf Förster
Details
dev-db:freetds-1.00.53:20170813-093157.log (dev-db:freetds-1.00.53:20170813-093157.log,180.33 KB, text/plain)
2017-08-13 17:32 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,279.15 KB, text/plain)
2017-08-13 17:32 UTC, Toralf Förster
Details
environment (environment,58.32 KB, text/plain)
2017-08-13 17:32 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,14.10 KB, application/x-bzip)
2017-08-13 17:32 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,19.84 KB, application/x-bzip)
2017-08-13 17:32 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,28.69 KB, application/x-bzip)
2017-08-13 17:32 UTC, Toralf Förster
Details
emerge-info.txt (emerge-info.txt,16.31 KB, text/plain)
2019-02-18 18:13 UTC, Toralf Förster
Details
dev-db:freetds-1.00.341-r1:20190218-141213.log (dev-db:freetds-1.00.341-r1:20190218-141213.log,49.81 KB, text/plain)
2019-02-18 18:13 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,130.28 KB, text/plain)
2019-02-18 18:13 UTC, Toralf Förster
Details
environment (environment,20.59 KB, text/plain)
2019-02-18 18:13 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.99 KB, application/x-bzip)
2019-02-18 18:13 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,19.07 KB, application/x-bzip)
2019-02-18 18:13 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,12.65 KB, application/x-bzip)
2019-02-18 18:13 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-06-10 20:20:47 UTC
  BIO_set_data(b, tds);
  ^~~~~~~~~~~~
tls.c:946:55: error: ‘TLS_ST_OK’ undeclared (first use in this function)
  ret = SSL_connect(con) != 1 || SSL_get_state(con) != TLS_ST_OK;
                                                       ^~~~~~~~~
tls.c:946:55: note: each undeclared identifier is reported only once for each function it appears in

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: plasma-systemd-libressl_20170609-232249

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)
Comment 1 Toralf Förster gentoo-dev 2017-06-10 20:20:50 UTC
Created attachment 475946 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-06-10 20:20:53 UTC
Created attachment 475948 [details]
dev-db:freetds-1.00.41:20170610-201117.log
Comment 3 Toralf Förster gentoo-dev 2017-06-10 20:20:56 UTC
Created attachment 475950 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-06-10 20:20:59 UTC
Created attachment 475952 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-06-10 20:21:02 UTC
Created attachment 475954 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-06-10 20:21:05 UTC
Created attachment 475956 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2017-06-10 20:21:08 UTC
Created attachment 475958 [details]
temp.tbz2
Comment 8 Michael Orlitzky gentoo-dev 2017-08-12 23:27:41 UTC
Hey Toralf =)

How easy is it for you to test a custom patch on the tinderbox? I reported this upstream and the maintainer suggested a patch,

  https://github.com/FreeTDS/freetds/issues/143

but it needs your special LibreSSL touch.
Comment 9 Toralf Förster gentoo-dev 2017-08-13 09:30:08 UTC
(In reply to Michael Orlitzky from comment #8)
Hi, would be easier with wget or something, but this works too :

$ cd tb/data/patches/
$ mkdir -p dev-db/freetds
$ cd dev-db/freetds

$ cat << EOF > 143.patch
> diff --git a/src/tds/tls.c b/src/tds/tls.c
> index 38e8228c..4d2c5159 100644
> --- a/src/tds/tls.c
> +++ b/src/tds/tls.c
> @@ -95,6 +95,9 @@ BIO_get_data(const BIO *b)
>         return b->ptr;
>  }
>  #define TLS_client_method TLSv1_client_method
> +#endif
> +
> +#ifndef TLS_ST_OK
>  #define TLS_ST_OK SSL_ST_OK
>  #endif
> EOF

$ echo dev-db/freetds | retest.sh 


:-)

Will report the outcome.
Comment 10 Toralf Förster gentoo-dev 2017-08-13 17:32:32 UTC
appeared recently at the tinderbox image 20170813-113510_dev-db_freetds-1.00.53
Comment 11 Toralf Förster gentoo-dev 2017-08-13 17:32:35 UTC
Created attachment 488788 [details]
emerge-info.txt
Comment 12 Toralf Förster gentoo-dev 2017-08-13 17:32:38 UTC
Created attachment 488790 [details]
dev-db:freetds-1.00.53:20170813-093157.log
Comment 13 Toralf Förster gentoo-dev 2017-08-13 17:32:41 UTC
Created attachment 488792 [details]
emerge-history.txt
Comment 14 Toralf Förster gentoo-dev 2017-08-13 17:32:44 UTC
Created attachment 488794 [details]
environment
Comment 15 Toralf Förster gentoo-dev 2017-08-13 17:32:46 UTC
Created attachment 488796 [details]
etc.portage.tbz2
Comment 16 Toralf Förster gentoo-dev 2017-08-13 17:32:49 UTC
Created attachment 488798 [details]
logs.tbz2
Comment 17 Toralf Förster gentoo-dev 2017-08-13 17:32:52 UTC
Created attachment 488800 [details]
temp.tbz2
Comment 18 Michael Orlitzky gentoo-dev 2017-08-22 13:36:53 UTC
Ok, back with another attempt. There's a commit on the master branch that might fix this. To make your life easier, I just added a freetds-9999 ebuild -- can you please give that a try?
Comment 19 Toralf Förster gentoo-dev 2017-08-22 20:34:07 UTC
(In reply to Michael Orlitzky from comment #18)
-9999 builds fine
Comment 20 Michael Orlitzky gentoo-dev 2017-08-22 21:53:05 UTC
Thank you! I'll leave this open until a non-live version contains the fix.
Comment 21 Toralf Förster gentoo-dev 2018-01-01 17:24:04 UTC
This runs fine here since August last year:

tinderbox@mr-fox ~ $ cat tb/data/patches/dev-db/freetds-1.00.54-r1/143.patch 
diff --git a/src/tds/tls.c b/src/tds/tls.c
index 38e8228c..4d2c5159 100644
--- a/src/tds/tls.c
+++ b/src/tds/tls.c
@@ -95,6 +95,9 @@ BIO_get_data(const BIO *b)
        return b->ptr;
 }
 #define TLS_client_method TLSv1_client_method
+#endif
+
+#ifndef TLS_ST_OK
 #define TLS_ST_OK SSL_ST_OK
 #endif
Comment 22 Toralf Förster gentoo-dev 2018-01-01 17:24:22 UTC
s/runs/compiles/
Comment 23 Larry the Git Cow gentoo-dev 2018-01-22 01:28:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7e1ce9c9d38f88e3b283247fffa638c239ccb76

commit e7e1ce9c9d38f88e3b283247fffa638c239ccb76
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2018-01-22 01:26:16 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2018-01-22 01:28:08 +0000

    dev-db/freetds: new version 1.00.341 from the "current" series.
    
    This apparently-huge version jump, from 1.00.54 to 1.00.341, comes as
    we switch from the upstream "stable" release series to the "current"
    one. The stable series is just, well, too stable for us: there have
    been a number of bug fixes (Gentoo bug 621430, for example) that never
    made it into a stable release.
    
    The "current" series should follow the upstream git repository more
    closely; they're snapshots of one manner or another. It looks to me
    like (and I have my fingers crossed that) the version numbers for the
    stable and current series to not overlap.
    
    Closes: https://bugs.gentoo.org/621430
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-db/freetds/Manifest                |  1 +
 dev-db/freetds/freetds-1.00.341.ebuild | 62 ++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
Comment 24 Toralf Förster gentoo-dev 2019-02-18 18:13:17 UTC
got at the unstable amd64 chroot image 17.0-desktop-gnome-systemd_libressl_20190215-201808 this : tls.c:1019:50: error: TLS_ST_OK undeclared (first use in this function)
Comment 25 Toralf Förster gentoo-dev 2019-02-18 18:13:20 UTC
Created attachment 565778 [details]
emerge-info.txt
Comment 26 Toralf Förster gentoo-dev 2019-02-18 18:13:23 UTC
Created attachment 565780 [details]
dev-db:freetds-1.00.341-r1:20190218-141213.log
Comment 27 Toralf Förster gentoo-dev 2019-02-18 18:13:26 UTC
Created attachment 565782 [details]
emerge-history.txt
Comment 28 Toralf Förster gentoo-dev 2019-02-18 18:13:29 UTC
Created attachment 565784 [details]
environment
Comment 29 Toralf Förster gentoo-dev 2019-02-18 18:13:31 UTC
Created attachment 565786 [details]
etc.portage.tbz2
Comment 30 Toralf Förster gentoo-dev 2019-02-18 18:13:34 UTC
Created attachment 565788 [details]
logs.tbz2
Comment 31 Toralf Förster gentoo-dev 2019-02-18 18:13:37 UTC
Created attachment 565790 [details]
temp.tbz2
Comment 32 Larry the Git Cow gentoo-dev 2019-02-19 03:19:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4728286729c7eab06a1bea8d7d306531d843772e

commit 4728286729c7eab06a1bea8d7d306531d843772e
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2019-02-19 03:11:13 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2019-02-19 03:11:13 +0000

    dev-db/freetds: new version 1.00.558.
    
    LibreSSL 2.7 now implements some of the OpenSSL-1.1.0 API, which
    invalidates one of the heuristics in FreeTDS used for LibreSSL
    compatibility. This new upstream version has an *additional*
    workaround for the problem, and (with any luck) allows us to
    build against dev-libs/libressl-2.7 and newer.
    
    Bug: https://bugs.gentoo.org/621430
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-db/freetds/Manifest                |  1 +
 dev-db/freetds/freetds-1.00.558.ebuild | 73 ++++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)
Comment 33 Michael Orlitzky gentoo-dev 2019-02-19 03:20:54 UTC
Please test that new version, it has a fix for this exact issue.