I'm trying to build latest TextMate in master. Previously I was able to build TextMate but not anymore.
First running "./configure" results in this error:
ninja: error: build.ninja:8: loading '/Users/jacob/build/TextMate/build.ninja': No such file or directory include $builddir/build.ninja ^ near here
It's a minor error since it works anyway. Then when running "ninja" I get this error:
$ ninja [6/1174] Generate test ‘/Users/jacob/build/TextMate/Frameworks/text/test_text.cc’… FAILED: bin/gen_test Frameworks/text/tests/t_case.cc Frameworks/text/tests/t_ctype.cc Frameworks/text/tests/t_decode.cc Frameworks/text/tests/t_encode.cc Frameworks/text/tests/t_format.cc Frameworks/text/tests/t_indent.cc Frameworks/text/tests/t_ranker.cc Frameworks/text/tests/t_split.cc Frameworks/text/tests/t_tokenize.cc Frameworks/text/tests/t_trim.cc Frameworks/text/tests/t_utf8.cc Frameworks/text/tests/t_wrap.cc > /Users/jacob/build/TextMate/Frameworks/text/test_text.cc~ && mv /Users/jacob/build/TextMate/Frameworks/text/test_text.cc~ /Users/jacob/build/TextMate/Frameworks/text/test_text.cc bin/gen_test:14:in `block (2 levels) in <main>': invalid byte sequence in US-ASCII (ArgumentError) from bin/gen_test:13:in `foreach' from bin/gen_test:13:in `each_line' from bin/gen_test:13:in `block in <main>' from bin/gen_test:8:in `each' from bin/gen_test:8:in `<main>' [6/1174] Compile ‘Shared/PCH/prelude.mm’… ninja: build stopped: subcommand failed.
Adding a magic encoding comment to "bin/gen_test" does not help.
On 9 Mar 2015, at 16:58, Jacob Carlborg wrote:
I'm trying to build latest TextMate in master. Previously I was able to build TextMate but not anymore.
First running "./configure" results in this error:
ninja: error: build.ninja:8: loading '/Users/jacob/build/TextMate/build.ninja': No such file or directory include $builddir/build.ninja ^ near here
It's a minor error since it works anyway.
Is it reproducible?
You can delete build.ninja from your project folder and run ./configure to have it re-generated. It does seem like you changed build destination folder, so it might have been a one-time error related to this switch, though not sure why.
Then when running "ninja" I get this error:
$ ninja [6/1174] Generate test ‘/Users/jacob/build/TextMate/Frameworks/text/test_text.cc’… bin/gen_test:14:in `block (2 levels) in <main>': invalid byte sequence in US-ASCII
What does running ‘locale’ (in a terminal) return?
If your LC_CTYPE is not set to UTF-8 then try run:
LC_CTYPE="en_US.UTF-8" ninja
Adding a magic encoding comment to "bin/gen_test" does not help.
I think the encoding comemnts were only needed for ruby 1.9. I thought 2.0 defaulted to UTF-8, and it does so here, but based on a recent comment I received, it might actually depend on the user’s locale.
I’m reading the files via Pathname#each_line, there isn’t really any obvious way to override the default encoding, and going via the IO interface, I think adding UTF-8 to open() would break 1.8 compatibility.
On 2015-03-09 12:12, Allan Odgaard wrote:
Is it reproducible?
You can delete build.ninja from your project folder and run ./configure to have it re-generated. It does seem like you changed build destination folder, so it might have been a one-time error related to this switch, though not sure why.
Deleting build.ninja solved the problem.
What does running ‘locale’ (in a terminal) return?
If your LC_CTYPE is not set to UTF-8 then try run:
LC_CTYPE="en_US.UTF-8" ninja
It was not set, setting it helped. But now I get new errors, related to the tests. I get a lot of errors for a bunch of "test_" files like this:
[7/466] Compile ‘build/Frameworks/regexp/test_regexp.cc’… FAILED: xcrun clang++ -include build/Shared/PCH/prelude.cc -c -pipe -fPIC -gdwarf-2 -m64 -mmacosx-version-min=10.7 -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 -fvisibility=hidden -std=c++1y -stdlib=libc++ -I"/usr/local/include" -o build/Frameworks/regexp/test_regexp.o -MMD -MF build/Frameworks/regexp/test_regexp.o.d -Ibuild/include build/Frameworks/regexp/test_regexp.cc build/Frameworks/regexp/test_regexp.cc:1:1: error: expected unqualified-id "#include <regexp/find.h>\n" ^ 1 error generated. [7/466] Compile ‘Frameworks/scope/src/parse.cc’… ninja: build stopped: subcommand failed.
On 2015-03-09 13:15, Jacob Carlborg wrote:
It was not set, setting it helped. But now I get new errors, related to the tests. I get a lot of errors for a bunch of "test_" files like this:
I got it to build now. Might have been some leftover changes when I tried to fix the build.