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: 2019-09-06 11:06 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 2019-08-04 23:49:17 UTC
Was not clear, you can deinstall cmark while you build llvm80.
Comment 9 Brooks Davis freebsd_committer 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 freebsd_triage 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 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 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 2019-09-06 11:06:30 UTC
Not fixed, but likely the conflict is the best we can do.