Bug 242292

Summary: graphics/tesseract: openmp usage confusion on FreeBSD 12.1
Product: Ports & Packages Reporter: Jonathan Chen <jonc>
Component: Individual Port(s)Assignee: Piotr Kubaj <pkubaj>
Status: Closed FIXED    
Severity: Affects Only Me Flags: pkubaj: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Condition OPENMP_LIB_DEPENDS
none
Conditional OPENMP_LIB_DEPENDS
none
Makefile patch
none
Conditional OPENMP_LIB_DEPENDS none

Description Jonathan Chen 2019-11-29 08:23:23 UTC
Created attachment 209522 [details]
Condition OPENMP_LIB_DEPENDS

FreeBSD 12.1 includes libomp in the base system.

This confuses package validation OPENMP_LIB_DEPENDS=libomp.so:devel/openmp declares a dependency on devel/openmp that isn't fulfilled on 12.1+ during a build.

I've included a patch that declares OPENMP_LIB_DEPENDS conditionally.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2019-11-30 17:51:36 UTC
This doesn't work without including bsd.port.pre.mk:
make: "/usr/ports/graphics/tesseract/Makefile" line 47: Malformed conditional (${OSVERSION} < 1201000)
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/graphics/tesseract
Comment 2 Jonathan Chen 2019-12-02 02:01:08 UTC
Created attachment 209583 [details]
Conditional OPENMP_LIB_DEPENDS

Updated the patch. It builds on my 12.1 system, but I have no pre-12.1 system to test the patch against.
Comment 3 Jonathan Chen 2019-12-05 04:25:31 UTC
Created attachment 209712 [details]
Makefile patch

Fixed up stage errors and complaints.
Comment 4 Piotr Kubaj freebsd_committer freebsd_triage 2019-12-05 21:42:13 UTC
(In reply to Jonathan Chen from comment #3)
FreeBSD 11.3 also has libomp in base.
Comment 6 Jonathan Chen 2019-12-06 06:46:56 UTC
Created attachment 209748 [details]
Conditional OPENMP_LIB_DEPENDS

Updated to handle libomp in 11.3 as well.
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-12-06 15:01:06 UTC
A commit references this bug:

Author: pkubaj
Date: Fri Dec  6 15:00:54 UTC 2019
New revision: 519148
URL: https://svnweb.freebsd.org/changeset/ports/519148

Log:
  graphics/tesseract: fix libomp dependency

  Use devel/openmp only on 12.0.

  PR:		242292
  Submitted by:	jonc@chen.org.nz

Changes:
  head/graphics/tesseract/Makefile