Bug 239636 - devel/llvm80 can't find commonmark
Summary: devel/llvm80 can't find commonmark
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: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-04 03:29 UTC by rkoberman
Modified: 2024-10-01 23:18 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rkoberman 2019-08-04 03:29:47 UTC
I am unable to build llvm80-0.0.1_2. It fails to find commonmark,
Extension error:
Could not import recommonmark.parser (needed for source parser) (exception: No module named 'commonmark')
[4063/4085] /usr/bin/c++  -DGTEST_HAS_RTTI=0 -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_LANG_CXX11=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iutils/unittest -I/usr/ports/devel/llvm80/work/llvm-8.0.1.src/utils/unittest -Iinclude -I/usr/ports/devel/llvm80/work/llvm-8.0.1.src/include -I/usr/ports/devel/llvm80/work/llvm-8.0.1.src/utils/unittest/googletest/include -I/usr/ports/devel/llvm80/work/llvm-8.0.1.src/utils/unittest/googletest -I/usr/ports/devel/llvm80/work/llvm-8.0.1.src/utils/unittest/googlemock/include -I/usr/ports/devel/llvm80/work/llvm-8.0.1.src/utils/unittest/googlemock -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include   -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -Wno-covered-switch-default  -fno-exceptions -MD -MT utils/unittest/CMakeFiles/gtest.dir/googletest/src/gtest-all.cc.o -MF utils/unittest/CMakeFiles/gtest.dir/googletest/src/gtest-all.cc.o.d -o utils/unittest/CMakeFiles/gtest.dir/googletest/src/gtest-all.cc.o -c /usr/ports/devel/llvm80/work/llvm-8.0.1.src/utils/unittest/googletest/src/gtest-all.cc
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Comment 1 Walter Schwarzenfeld 2019-08-04 03:48:32 UTC
Also mentioned on irc freebsd channel. Seems to work on 11.X but not on 12.0. 
(Workaround set DOCS=off).
Comment 2 rkoberman 2019-08-04 05:33:51 UTC
(In reply to w.schwarzenfeld from comment #1)
Thanks, Walter. It building now, but I won't know whether it worked until tomorrow.
Comment 3 Walter Schwarzenfeld 2019-08-04 11:26:51 UTC
Found this:

https://github.com/readthedocs/recommonmark/commit/150311c8446ac0098711be971059f2211bf53d71

=>
In #118, there was a change made to rename all commonmark imports from `commonmark` to `CommonMark` due to a breaking change to the package name in that dependency in version 0.8.1

    install_requires=[
        'commonmark>=0.7.3',
        'commonmark>=0.8.1',
        'docutils>=0.11',
        'sphinx>=1.3.1',

The py-recommonmark port has
install_requires=[
        'commonmark>=0.7.3',
        'docutils>=0.11',
        'sphinx>=1.3.1',
Comment 4 Walter Schwarzenfeld 2019-08-04 12:02:03 UTC
Sorry, this is wrong. This is upcoming. 
"import commonmark" works normal with python3.6.
Comment 5 Walter Schwarzenfeld 2019-08-04 21:34:49 UTC
The user on freebsd irc channel found it:

->
"removing cmark and installing py36-CommonMark resulted in a successful build"
Comment 6 rkoberman 2019-08-04 22:31:57 UTC
Can py36-recommonmark than be removed or is it still required? And how does this impact building llvm70 and 60? Will cmark still need to be installed to build them?
Comment 7 Walter Schwarzenfeld 2019-08-04 23:47:18 UTC
for llvm80 is required
docs/conf.py: source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}

You can deinstall it while you build llvm80 and reinstall it, after it is finished, if you need it.

Maybe, the maintainer finds another way.
Comment 8 Walter Schwarzenfeld 2019-08-04 23:49:17 UTC
Was not clear, you can deinstall cmark while you build llvm80.
Comment 9 Brooks Davis freebsd_committer freebsd_triage 2019-08-05 20:11:17 UTC
It's not clear there's anything for me to do as the llvm port maintainer except possibly adding:

DOCS_CONFLICTS_BUILD=  commonmark-cmark-*

Unfortunately, the CONFLICTS infrastructure doesn't permit informative messages so it's not clear there's a lot of value in that.

FYI, only llvm80 and up are impacted as the use of recommonmark began in the 8.0 series.
Comment 10 Walter Schwarzenfeld 2019-08-06 04:12:02 UTC
Yes, a CONFLICT  statement is better than nothing. Needs some time to build llvm and in this case it fails at the latest point ([4063/4085] ).
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-08-07 19:54:01 UTC
A commit references this bug:

Author: brooks
Date: Wed Aug  7 19:53:27 UTC 2019
New revision: 508349
URL: https://svnweb.freebsd.org/changeset/ports/508349

Log:
  Assorted minor improvements:

  - Add a build conflict for commonmark-cmark-* when DOCS are enabled.
    This prevents a failure later on in the build. [0]

  - Add a new option BE_AMDGPU which can be used to enable the AMDGPU
    backed used by mesa when BE_NATIVE or BE_FREEBSD is set.  Enable this
    option by default to limit later surprises. [1]

  - Use LLVM_ENABLE_Z3_SOLVER instead of the now removed
    CLANG_ANALYZER_ENABLE_Z3_SOLVER to disable Z3 discovery and linkage.

  PR:		239636 [0], 230789 [1]

Changes:
  head/devel/llvm90/Makefile
Comment 12 commit-hook freebsd_committer freebsd_triage 2019-09-06 11:04:58 UTC
A commit references this bug:

Author: brooks
Date: Fri Sep  6 11:04:45 UTC 2019
New revision: 511300
URL: https://svnweb.freebsd.org/changeset/ports/511300

Log:
  Assorted build improvements:

   - Add a build conflict for commonmark-cmark-* when DOCS are enabled.
     This prevents a failure later on in the build. [0]

   - Add a new option BE_AMDGPU which can be used to enable the AMDGPU
     backed used by mesa when BE_NATIVE or BE_FREEBSD is set.  Enable this
     option by default to limit later surprises. [1]

   - New option PYCLANG to add python binding for clang. [2]

  PR:		239636 [0], 230789 [1], 239990 [2]
  Submitted by:	chardon.frederic@gmail.com [2]
  Sponsored by:	DARPA, AFRL

Changes:
  head/devel/llvm80/Makefile
  head/devel/llvm80/pkg-plist
Comment 13 Brooks Davis freebsd_committer freebsd_triage 2019-09-06 11:06:30 UTC
Not fixed, but likely the conflict is the best we can do.
Comment 14 commit-hook freebsd_committer freebsd_triage 2023-01-06 00:11:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=47c2b0aec1c3e92243d2d3677d4a0268475d6e0c

commit 47c2b0aec1c3e92243d2d3677d4a0268475d6e0c
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-01-06 00:06:02 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-01-06 00:11:37 +0000

    devel/llvm*: Fix CONFLICT on cmark

    If the user has the textproc/cmark package installed, the py*-CommonMark
    package will fail to install.  This in turn leads to build failures down
    the line when sphinx tries to load commonmark.  The result is confusing
    and potentially wastes a lot of build time so just conflict upfront.
    The previous code attempted to do this, but I'd listed the conflict
    incorrectly in 2019. :(

    PR:             239636
    Reported by:    Stephen Roznowski <sjrbulk@verizon.net>

 devel/llvm10/Makefile | 2 +-
 devel/llvm11/Makefile | 2 +-
 devel/llvm12/Makefile | 2 +-
 devel/llvm13/Makefile | 2 +-
 devel/llvm14/Makefile | 2 +-
 devel/llvm15/Makefile | 2 +-
 devel/llvm80/Makefile | 2 +-
 devel/llvm90/Makefile | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2024-10-01 23:17:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=78c7700b5c2bd7501137472e754fb640b486ee1a

commit 78c7700b5c2bd7501137472e754fb640b486ee1a
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-10-01 23:11:09 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-10-01 23:16:46 +0000

    devel/llvm19: 19.1.1 release

    Remove obsolete build conflict with cmark.

    PR:             239636, 274848

 devel/llvm19/Makefile | 3 +--
 devel/llvm19/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)
Comment 16 commit-hook freebsd_committer freebsd_triage 2024-10-01 23:18:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7cea690fddbd4f6bb3ad3360e625754bde7ac4e6

commit 7cea690fddbd4f6bb3ad3360e625754bde7ac4e6
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-10-01 23:15:29 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-10-01 23:16:46 +0000

    devel.llvm[12345678]: remove cmark conflict [NFC]

    The build conflict with cmark is no longer needed.

    PR:             239636, 274848

 devel/llvm11/Makefile | 1 -
 devel/llvm12/Makefile | 1 -
 devel/llvm13/Makefile | 1 -
 devel/llvm14/Makefile | 1 -
 devel/llvm15/Makefile | 1 -
 devel/llvm16/Makefile | 1 -
 devel/llvm17/Makefile | 1 -
 devel/llvm18/Makefile | 1 -
 8 files changed, 8 deletions(-)