Bug 242292 - graphics/tesseract: openmp usage confusion on FreeBSD 12.1
Summary: graphics/tesseract: openmp usage confusion on FreeBSD 12.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Piotr Kubaj
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-29 08:23 UTC by Jonathan Chen
Modified: 2019-12-06 15:01 UTC (History)
0 users

See Also:
pkubaj: maintainer-feedback+


Attachments
Condition OPENMP_LIB_DEPENDS (422 bytes, patch)
2019-11-29 08:23 UTC, Jonathan Chen
no flags Details | Diff
Conditional OPENMP_LIB_DEPENDS (643 bytes, patch)
2019-12-02 02:01 UTC, Jonathan Chen
no flags Details | Diff
Makefile patch (820 bytes, patch)
2019-12-05 04:25 UTC, Jonathan Chen
no flags Details | Diff
Conditional OPENMP_LIB_DEPENDS (868 bytes, patch)
2019-12-06 06:46 UTC, Jonathan Chen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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