| Summary: | devel/p4: build error when using DEFAULT_VERSIONS+=ssl=libressl-devel in make.conf | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Tassilo Philipp <tphilipp> | ||||||
| Component: | Individual Port(s) | Assignee: | Alan Somers <asomers> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Some People | Flags: | bugzilla:
maintainer-feedback?
(asomers) |
||||||
| Priority: | --- | ||||||||
| Version: | Latest | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
Tassilo Philipp
2019-03-15 10:42:46 UTC
Created attachment 202894 [details]
Fix build with alternate OpenSSL implementations
Thanks for reporting this bug. Can you please try building with this patch? It works for me in Poudriere.
This works and fixes the issue I reported, however it seems to create another problem. With this patch the port fails to build if archivers/libzip is installed.
With -I${OPENSSLINC}, the following error is produced when compiling crc32.c (shipped with the distfile perforce/p4/2016-1.zip):
----------- log --------------->
clang -c -o p4-bin/objects/zlib/crc32.o -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -pipe -O2 -Wno-parentheses -Wno-switch -fwrapv -DOS_FREEBSD -DOS_FREEBSD120 -DOS_FREEBSDX86_64 -DOS_FREEBSD120X86_64 -DUSE_SSL -Izlib -Imsgs -Isupport -Isys zlib/crc32.c
sys/zipfile.cc:52:25: error: use of undeclared identifier 'APPEND_STATUS_CREATE'
zf = zipOpen64( fName, APPEND_STATUS_CREATE );
^
sys/zipfile.cc:58:2: error: use of undeclared identifier 'zipClose'
zipClose( zf, 0 );
^
sys/zipfile.cc:74:2: error: unknown type name 'zip_fileinfo'
zip_fileinfo zi;
^
sys/zipfile.cc:94:15: error: use of undeclared identifier 'zipCloseFileInZip'
int result = zipCloseFileInZip( zf );
^
sys/zipfile.cc:106:15: error: use of undeclared identifier 'zipWriteInFileInZip'
int result = zipWriteInFileInZip( zf, buf, len );
^
5 errors generated.
<----------- log ---------------
The reason is that it includes libzip's installed /usr/local/include/zip.h whereas the build wants to include its own /usr/ports/devel/p4/work/2016-1/zlib/zip.h.
Looking at the clang command invocation above that now has the new -I/usr/local/include in it, I think it should be after the -Izlib one (which I guess refers to p4's own shipped zlib folder). I am not sure how you would place it accordingly, maybe as pragmatically as:
CFLAGS+= -Izlib -I${OPENSSLINC}
Does feel a bit hacky though...
Tiny (not really important) correction: it fails when sys/zipfile.cc is compiled, not crc32. I copy & pasted the wrong line. The analysis stays the same, though. Thanks for the quick reply and fix btw, you rock! Created attachment 202914 [details]
Fix build with alternate OpenSSL implementations
Try this patch instead. I think this should fix the libzip problem.
Sorry for the delay, I didn't see the notification. Anyways, thanks for the patch, seems to work fine! A commit references this bug: Author: asomers Date: Fri Mar 22 14:43:11 UTC 2019 New revision: 496572 URL: https://svnweb.freebsd.org/changeset/ports/496572 Log: devel/p4: fix the build with alternate OpenSSL implementations When setting DEFAULT_VERSIONS+=ssl=anything, p4 needs to use OPENSSLINC. PR: 236548 Reported by: Tassilo Philipp <tphilipp@potion-studios.com> MFH: 2019Q1 Changes: head/devel/p4/Makefile |