Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 883421

Summary: dev-libs/opencryptoki-3.6.1-r1 fails to compile (CLANG-STRICTER-SYSTEM): soft_specific.c:2200:8: error: incompatible function pointer types assigning to int ()(CK_BYTE ) (aka int ()(unsigned char )) from int ()(SHA_CTX ) (aka int ()(struct SHAstate_st ))
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: CONFIRMED ---    
Severity: normal CC: jy6x2b32pie9
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/opencryptoki/opencryptoki/issues/769
https://github.com/opencryptoki/opencryptoki/issues/770
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2022-11-28 12:47:28 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-libs/opencryptoki-3.6.1-r1 fails to compile (CLANG-STRICTER-SYSTEM).
Discovered on: amd64 (internal ref: clang-stricter_tinderbox)

NOTE:
(CLANG-STRICTER-SYSTEM) in the summary means that the bug was found on a machine that runs clang with stricter mode

This machine uses clang with CFLAGS/CXXFLAGS=-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types

See also:
https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
https://wiki.gentoo.org/wiki/Modern_C_porting
Comment 1 Agostino Sarubbo gentoo-dev 2022-11-28 12:47:31 UTC
Created attachment 837961 [details]
build.log

build log and emerge --info
Comment 2 jy6x2b32pie9 2024-04-28 19:18:07 UTC
Package changed home from sourceforge to github and had a few releases in last six years:
https://github.com/opencryptoki/opencryptoki

I think we need to switch to modern code. Or drop it if we can't
Comment 3 jy6x2b32pie9 2024-04-28 20:03:10 UTC
But we can't, yet.
Upstream bugs for GCC-14 and opencryptoki-3.23.0:
https://github.com/opencryptoki/opencryptoki/issues/769
https://github.com/opencryptoki/opencryptoki/issues/770
Comment 4 jy6x2b32pie9 2024-04-29 14:28:59 UTC
opencryptoki-3.23.0 builds with clang-glibc and modern warnings, but ebuild needs corrections for successful installation.

getent passwd pkcsslotd >/dev/null || /usr/bin/useradd -r -g pkcs11 -d /run/opencryptoki -s /sbin/nologin -c "Opencryptoki pkcsslotd user" pkcsslotd
 * ACCESS DENIED:  open_wr:            /etc/passwd.7602

Those corrections are beyond my competence at this moment.