Bug 252483

Summary: archivers/libzip: build fail
Product: Ports & Packages Reporter: Ivan Rozhuk <rozhuk.im>
Component: Individual Port(s)Assignee: Dima Panov <fluffy>
Status: Closed FIXED    
Severity: Affects Some People CC: korsani, rakuco, rozhuk.im, sgs
Priority: --- Flags: rakuco: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Proposed patch none

Description Ivan Rozhuk 2021-01-07 01:04:50 UTC
libressl used as default openssl.

FAILED: lib/CMakeFiles/zip.dir/zip_crypto_openssl.c.o 
/usr/local/libexec/ccache/cc -Dzip_EXPORTS -I/tmp/ports/usr/ports/archivers/libzip/work/libzip-1.7.3/lib -I. -isystem /usr/local/include -O2 -pipe -O3 -pipe -funroll-loops -DSTRIP_FBSDID -D_FORTIFY_SOURCE=2 -mretpoline  -fstack-protector-strong -fno-strict-aliasing  -fdebug-prefix-map=/tmp/ports/usr/ports/archivers/libzip/work/libzip-1.7.3=. -O2 -pipe -O3 -pipe -funroll-loops -DSTRIP_FBSDID -D_FORTIFY_SOURCE=2 -mretpoline  -fstack-protector-strong -fno-strict-aliasing  -fdebug-prefix-map=/tmp/ports/usr/ports/archivers/libzip/work/libzip-1.7.3=. -fPIC -fvisibility=hidden -MD -MT lib/CMakeFiles/zip.dir/zip_crypto_openssl.c.o -MF lib/CMakeFiles/zip.dir/zip_crypto_openssl.c.o.d -o lib/CMakeFiles/zip.dir/zip_crypto_openssl.c.o -c /tmp/ports/usr/ports/archivers/libzip/work/libzip-1.7.3/lib/zip_crypto_openssl.c
../libzip-1.7.3/lib/zip_crypto_openssl.c:76:25: error: use of undeclared identifier 'INT_MAX'
    if (secret_length > INT_MAX) {
                        ^
1 error generated.
Comment 1 korsani 2021-01-07 09:42:39 UTC
Same here.
It also fail if ssl=libressl is NOT set.

uname -a gives : FreeBSD xxx 12.2-RELEASE-p1 FreeBSD 12.2-RELEASE-p1 GENERIC  amd64
Comment 2 Raphael Kubo da Costa freebsd_committer 2021-01-07 10:13:19 UTC
Over to fluffy@ who landed the libzip update.
Comment 3 Raphael Kubo da Costa freebsd_committer 2021-01-07 10:15:53 UTC
I don't have a FreeBSD setup where I can test this right now, but https://github.com/nih-at/libzip/commit/fd89e242d16128dedef08f47d99ae56aa19b0591 should solve this as far as I can see.
Comment 4 Raphael Kubo da Costa freebsd_committer 2021-01-07 10:19:57 UTC
Created attachment 221348 [details]
Proposed patch

If someone can verify this patch against archivers/libzip works, I can land it later.
Comment 5 korsani 2021-01-07 10:33:02 UTC
Working !
Comment 6 commit-hook freebsd_committer 2021-01-07 12:35:40 UTC
A commit references this bug:

Author: fluffy
Date: Thu Jan  7 12:35:08 UTC 2021
New revision: 560706
URL: https://svnweb.freebsd.org/changeset/ports/560706

Log:
  archivers/libzip: unbreak build with non-base *ssl

  PR:		252483
  Submitted by:	rakuco
  Reported by:	rozhuk.im@gmail.com
  Approved by:	rakuco

Changes:
  head/archivers/libzip/files/patch-git_fd89e242
Comment 7 Dima Panov freebsd_committer 2021-01-07 12:40:13 UTC
Sorry folks, this was not catched in clean builds for recent -current/amd64 and 12.2/amd64  with ssl=base :(

http://build.dimapanov.com/poudriere/data/130amd64-dimaports/2021-01-06_03h10m01s/logs/libzip-1.7.3.log