Opened 7 years ago
Closed 7 years ago
#55765 closed defect (duplicate)
textmate2 @2.0-rc.4_1: build fails under sierra (10.12.6) with error: command execution failed
Reported by: | vinteles | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.2 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | textmate2 |
Description
Trying to build textmate2 in Sierra (10.12). Build fails with
$ sudo port upgrade outdated ---> Computing dependencies for textmate2 ---> Building textmate2 Error: Failed to build textmate2: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_textmate2/textmate2/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Attachments (1)
Change History (8)
Changed 7 years ago by vinteles
comment:1 Changed 7 years ago by vinteles
Cc: | vinteles added |
---|
comment:2 Changed 7 years ago by mf2k (Frank Schima)
Cc: | vinteles removed |
---|---|
Keywords: | textmate2 sierra removed |
Owner: | set to neverpanic |
Port: | textmate2 added |
Status: | new → assigned |
In the future, please fill in the Port field and Cc the port maintainers (port info --maintainers textmate2
), if any.
As reporter, you do not need to Cc yourself.
comment:3 Changed 7 years ago by neverpanic (Clemens Lang)
Your log contains multiple build attempts. The first problem I could find is:
:info:build /usr/bin/clang++ -include /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_textmate2/textmate2/work/textmate-2.0-rc.4/build/Shared/PCH/prelude.cc -c -pipe -fPIC -gdwarf-2 -m64 -mmacosx-version-min=10.8 -funsigned-char -D'NULL_STR="\uFFFF"' -DREST_API='"https://api.textmate.org"' -Wall -Wwrite-strings -Wformat -Winit-self -Wmissing-include-dirs -Wno-parentheses -Wno-sign-compare -Wno-switch -IShared/include -fcolor-diagnostics -DNDEBUG -Os -I"/opt/local/include" -fvisibility=hidden -std=c++1z -stdlib=libc++ -I"/opt/local/include" -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_textmate2/textmate2/work/textmate-2.0-rc.4/build/Frameworks/editor/src/editor.o -MMD -MF /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_textmate2/textmate2/work/textmate-2.0-rc.4/build/Frameworks/editor/src/editor.o.d -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_textmate2/textmate2/work/textmate-2.0-rc.4/build/include Frameworks/editor/src/editor.cc :info:build Frameworks/editor/src/editor.cc:549:63: error: no viable conversion from 'vector<pair<char *, char *>>' to 'const vector<pair<const char *, const char *>>' :info:build std::vector< std::pair<char const*, char const*> > const& v = text::to_lines(str.data(), str.data() + str.size()); :info:build ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:530:5: note: candidate constructor not viable: no known conversion from 'std::vector<std::pair<char *, char *> >' to 'initializer_list<value_type>' (aka 'initializer_list<std::__1::pair<const char *, const char *> >') for 1st argument :info:build vector(initializer_list<value_type> __il); :info:build ^ :info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:542:5: note: candidate constructor not viable: no known conversion from 'std::vector<std::pair<char *, char *> >' to 'const std::__1::vector<std::__1::pair<const char *, const char *>, std::__1::allocator<std::__1::pair<const char *, const char *> > > &' for 1st argument :info:build vector(const vector& __x); :info:build ^ :info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:548:5: note: candidate constructor not viable: no known conversion from 'std::vector<std::pair<char *, char *> >' to 'std::__1::vector<std::__1::pair<const char *, const char *>, std::__1::allocator<std::__1::pair<const char *, const char *> > > &&' for 1st argument :info:build vector(vector&& __x) :info:build ^ :info:build 1 error generated.
You then re-attempted the build a number of times. These later attempts failed in gen_html, because that uses the GitHub API unauthenticated and is thus severely rate-limited. Multiple consecutive builds of textmate2 often fail due to problems with unauthenticated use of the GitHub API; authenticating usually allows the build to continue in these cases, but requires editing the source tree.
Your problem seems to be fixed upstream with https://github.com/textmate/textmate/commit/49cc123544edb219a9fd131c68837e32bfaa271d.
comment:4 follow-up: 6 Changed 7 years ago by neverpanic (Clemens Lang)
I can get the build working with these patches:
-
editors/textmate2/Portfile
diff --git a/editors/textmate2/Portfile b/editors/textmate2/Portfile index 7559f5bd00..c51070c010 100644
a b post-fetch { 32 32 } 33 33 34 34 patchfiles patch-configure-versionnumber.diff \ 35 patch-Applications_commit_target.diff 35 patch-Applications_commit_target.diff \ 36 49cc123544edb219a9fd131c68837e32bfaa271d.patch \ 37 patch-Applications_TextMate_about_Contributions.md.diff 36 38 37 39 post-patch { 38 40 reinplace "s/@VERSION@/${version}/" ${worksrcpath}/configure -
new file editors/textmate2/files/49cc123544edb219a9fd131c68837e32bfaa271d.patch
diff --git a/editors/textmate2/files/49cc123544edb219a9fd131c68837e32bfaa271d.patch b/editors/textmate2/files/49cc123544edb219a9fd131c68837e32bfaa271d.patch new file mode 100644 index 0000000000..1b83239ccf
- + 1 From 49cc123544edb219a9fd131c68837e32bfaa271d Mon Sep 17 00:00:00 2001 2 From: Ronald Wampler <rdwampler@gmail.com> 3 Date: Fri, 23 Jun 2017 10:44:28 -0400 4 Subject: [PATCH] Change `std::vector< std::pair<char const*, char const*> >` 5 to `auto` (C++17) 6 7 C++17 added a non-const overload for std::string::data(). 8 9 Upstream-Status: Backport [https://github.com/textmate/textmate/commit/49cc123544edb219a9fd131c68837e32bfaa271d] 10 --- 11 Frameworks/editor/src/editor.cc | 2 +- 12 1 file changed, 1 insertion(+), 1 deletion(-) 13 14 diff --git ./Frameworks/editor/src/editor.cc ./Frameworks/editor/src/editor.cc 15 index 308633444..58488bf0c 100644 16 --- ./Frameworks/editor/src/editor.cc 17 +++ ./Frameworks/editor/src/editor.cc 18 @@ -546,7 +546,7 @@ namespace ng 19 20 int minIndent = INT_MAX; 21 22 - std::vector< std::pair<char const*, char const*> > const& v = text::to_lines(str.data(), str.data() + str.size()); 23 + auto const& v = text::to_lines(str.data(), str.data() + str.size()); 24 for(auto const& it : v) 25 { 26 if(!text::is_blank(it.first, it.second)) -
new file editors/textmate2/files/patch-Applications_TextMate_about_Contributions.md.diff
diff --git a/editors/textmate2/files/patch-Applications_TextMate_about_Contributions.md.diff b/editors/textmate2/files/patch-Applications_TextMate_about_Contributions.md.diff new file mode 100644 index 0000000000..32b72ab119
- + 1 Fix generation of contribution page 2 3 Modern multimarkdown tends to convert the <% and %> tags into HTML when they 4 occur before or after an empty line. This would then break parsing with erb. 5 Remove all empty lines in the vincinity of these tags to prevent this problem. 6 7 Additionally, move the cache file for the githubcredits into the build 8 directory, because the home is either not writable, or not preserved within 9 MacPorts builds, and attempting to re-generate these texts too often usually 10 causes one to hit the GitHub API limit. By putting the file into the build 11 directory, aborted builds can at least be re-started without hitting any API 12 limits. 13 14 Upstream-Status: Inappropriate [configuration] 15 --- Applications/TextMate/about/Contributions.md.orig 2018-01-31 21:46:35.000000000 +0100 16 +++ Applications/TextMate/about/Contributions.md 2018-01-31 22:21:35.000000000 +0100 17 @@ -8,13 +8,11 @@ 18 19 <div> 20 <%# this wrapping div prevents Markdown from trying to parse the ERB blocks %> 21 - 22 <% 23 last_group_heading = '' 24 require File.join(File.dirname(__FILE__), 'bin/gen_credits') 25 -generate_credits(File.expand_path('~/Library/Caches/com.macromates.TextMate/githubcredits'), warn) do |hash, author, subject, body, userpic, date, github_user| 26 +generate_credits(File.expand_path('githubcredits'), warn) do |hash, author, subject, body, userpic, date, github_user| 27 group_heading = date.strftime('%b %e, %Y') 28 - 29 if last_group_heading != group_heading 30 if last_group_heading != '' 31 _erbout << "</ol>\n" 32 @@ -49,7 +47,6 @@ 33 </li> 34 <% 35 end 36 - 37 if last_group_heading != '' 38 _erbout << "</ol>\n" 39 end
However, the binary built on 10.13 crashes immediately on startup with various memory corruption errors. Can you confirm this happens for you as well?
I really don't have the time at the moment to look into these memory issues. Help welcome.
comment:5 follow-up: 7 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign added |
---|
I have been looking into this in other tickets, of which this is a duplicate.
comment:6 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to neverpanic:
However, the binary built on 10.13 crashes immediately on startup with various memory corruption errors. Can you confirm this happens for you as well?
This crash was reported in an upstream issue and someone solved it by using -std=c++14
instead of -std=c++17
; I had not gotten to test that because I had not gotten the build to succeed because of the Contributions.md issue, so thanks for finding a solution to that; I'll report it to the developers since there was a discussion about it on their mailing list in November but it never reached a solution.
comment:7 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Replying to ryandesign:
I have been looking into this in other tickets, of which this is a duplicate.
Duplicate of #55049.
Replying to ryandesign:
Replying to neverpanic:
However, the binary built on 10.13 crashes immediately on startup with various memory corruption errors. Can you confirm this happens for you as well?
This crash was reported in an upstream issue and someone solved it by using
-std=c++14
instead of-std=c++17
;
https://github.com/textmate/textmate/pull/1390
I had not gotten to test that because I had not gotten the build to succeed because of the Contributions.md issue, so thanks for finding a solution to that; I'll report it to the developers since there was a discussion about it on their mailing list in November but it never reached a solution.
http://lists.macromates.com/textmate/2017-November/040460.html
Building log