Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 787314 - net-misc/ptpd-2.3.1-r2 - /.../ossl_typ.h: error: conflicting types for EVP_MD_CTX; have struct evp_md_ctx_st
Summary: net-misc/ptpd-2.3.1-r2 - /.../ossl_typ.h: error: conflicting types for EVP_MD...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jan Breuer
URL:
Whiteboard:
Keywords: PATCH
: 844166 (view as bug list)
Depends on:
Blocks: openssl-3.0
  Show dependency tree
 
Reported: 2021-05-01 09:00 UTC by Toralf Förster
Modified: 2023-10-11 06:59 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.18 KB, text/plain)
2021-05-01 09:00 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,367.02 KB, text/plain)
2021-05-01 09:00 UTC, Toralf Förster
Details
environment (environment,115.89 KB, text/plain)
2021-05-01 09:00 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,30.95 KB, application/x-bzip)
2021-05-01 09:00 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,13.05 KB, application/x-bzip)
2021-05-01 09:00 UTC, Toralf Förster
Details
net-misc:ptpd-2.3.1-r2:20210501-055617.log (net-misc:ptpd-2.3.1-r2:20210501-055617.log,18.41 KB, text/plain)
2021-05-01 09:00 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,32.82 KB, application/x-bzip)
2021-05-01 09:00 UTC, Toralf Förster
Details
Patch to properly use recent openssl API (ptpd-2.3.1-r2-md5_ctx.patch,1.78 KB, patch)
2022-12-17 22:41 UTC, Jocelyn Mayer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-05-01 09:00:47 UTC
                 from /usr/include/net-snmp/net-snmp-includes.h:35,
                 from dep/net.c:73:
/usr/include/openssl/ossl_typ.h:92:30: error: conflicting types for ‘EVP_MD_CTX’; have ‘struct evp_md_ctx_st’
   92 | typedef struct evp_md_ctx_st EVP_MD_CTX;
      |                              ^~~~~~~~~~
In file included from dep/../ptpd.h:153,
                 from dep/net.c:57:

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma-20210420-165442

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-11.1.0 *
clang version 12.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/12/bin
/usr/lib/llvm/12
12.0.0
Python 3.8.9
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.51.0
  [2]   rust-1.51.0 *
The Glorious Glasgow Haskell Compilation System, version 8.10.4
  [1]   php7.4
  [2]   php8.0 *

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sat May  1 05:35:31 UTC 2021

emerge -qpvO net-misc/ptpd
[ebuild  N    ] net-misc/ptpd-2.3.1-r2  USE="pcap snmp statistics -debug -experimental -ntp -slave-only"
Comment 1 Toralf Förster gentoo-dev 2021-05-01 09:00:48 UTC
Created attachment 704898 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-05-01 09:00:50 UTC
Created attachment 704901 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-05-01 09:00:51 UTC
Created attachment 704904 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-05-01 09:00:53 UTC
Created attachment 704907 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-05-01 09:00:54 UTC
Created attachment 704910 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-05-01 09:00:55 UTC
Created attachment 704913 [details]
net-misc:ptpd-2.3.1-r2:20210501-055617.log
Comment 7 Toralf Förster gentoo-dev 2021-05-01 09:00:56 UTC
Created attachment 704916 [details]
temp.tar.bz2
Comment 8 Toralf Förster gentoo-dev 2022-05-14 08:15:47 UTC
*** Bug 844166 has been marked as a duplicate of this bug. ***
Comment 9 Jocelyn Mayer 2022-10-17 06:18:46 UTC
The following patch seems to fix this issue:

--- ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.c     2015-06-29 17:13:29.000000000 +0200
+++ ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.c     2021-10-25 19:02:24.014329912 +0200
@@ -262,7 +262,7 @@ MD5authencrypt(
 {
        u_char  digest[64];
        u_int   len;
-       EVP_MD_CTX ctx;
+       _EVP_MD_CTX ctx;
         pkt[length / 4] = htonl(keyid); 
        EVP_DigestInit(&ctx);
        EVP_DigestUpdate(&ctx, (u_char *)key, (u_int)strlen(key));
--- ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.h     2015-06-29 17:13:29.000000000 +0200
+++ ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.h     2021-10-25 19:02:42.974909067 +0200
@@ -80,7 +80,7 @@ isc_md5_final(isc_md5_t *ctx, unsigned c
 # define MD5Init(c)             isc_md5_init(c)
 # define MD5Update(c, p, s)     isc_md5_update(c, p, s)
 # define MD5Final(d, c)         isc_md5_final((c), (d)) /* swapped */
-  typedef MD5_CTX                       EVP_MD_CTX;
+  typedef MD5_CTX                       _EVP_MD_CTX;
 # define EVP_DigestInit(c)              MD5Init(c)
 # define EVP_DigestUpdate(c, p, s)      MD5Update(c, p, s)
 # define EVP_DigestFinal(c, d, pdl)     \
Comment 10 Jocelyn Mayer 2022-12-17 22:41:51 UTC
Created attachment 843279 [details, diff]
Patch to properly use recent openssl API

Here's an updated patch introducing changes for proper use of recent openssl API
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-18 01:39:15 UTC
(In reply to Jocelyn Mayer from comment #10)
> Created attachment 843279 [details, diff] [details, diff]
> Patch to properly use recent openssl API
> 
> Here's an updated patch introducing changes for proper use of recent openssl
> API

Thanks. Could you send it upstream at https://github.com/ptpd/ptpd/pulls?
Comment 12 Jocelyn Mayer 2022-12-18 08:24:02 UTC
Should have checked upstream before posting...
Already fixed in trunk, they did choose the first way, ie renaming the EVP_MD_CTX type, in order to be able to use libressl as well, as far as I've understood.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-16 14:20:45 UTC
I can't actually reproduce this error, but I suppose we could take a snapshot or something.
Comment 14 Toralf Förster gentoo-dev 2023-10-11 06:59:51 UTC
(In reply to Sam James from comment #13)
> I can't actually reproduce this error, but I suppose we could take a
> snapshot or something.

reproduced today at 17.1_desktop_gnome_systemd-20231009-071016