Closed yantang-msft closed 6 years ago
/cc @kivikakk as this appears to relate to the tokenizer.
While I'm reminded: charlock_holmes
is still biting my leg. 😁 Still computer swapping to run tests. :(
I'd like to reproduce and fix — the fix itself is quite easy (supply strndup
implementation on platforms it's not included) — but I'm unable to get charlock_holmes
installed on my Windows VM. I'll try looking into this later when I have more time.
@kivikakk I followed this https://github.com/brianmario/charlock_holmes/issues/84#issuecomment-140239662 and to install charlock_holmes
on Windows. Hope this is helpful.
@yantang-msft Thanks a lot! I did try that, and ended up with bizarre failures building icu itself. I'll try again shortly.
I've spent a bit trying to get this building on Windows, but to no avail. I won't have more time to try to work this out, but if anyone watching has a working Windows build, could you try dropping in an strndup
implementation and seeing if it fixes the build? I strongly suspect it will.
@kivikakk I confirm that adding the strndup implementation made it work locally. And it looks like more sophisticated conditions are needed for a real fix (e.g., https://github.com/rougier/freetype-gl/blob/master/platform.h#L16).
@yantang-msft Thank you so much for your attempt! Could you try the branch at #4154 to make sure it still works correctly? CI is passing which means it's ✅on Linux, and my local macOS build is good too.
@kivikakk I confirm this fix works. Thanks for the quick response!
I'm using ruby 2.4, and I already have
charlock_holmes
andrugged
installed. Here is the error message:Installing github-linguist 6.1.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: D:/workdir/vendor/gems/github-linguist-6.1.0/ext/linguist C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20180515-46084-zv96bg.rb extconf.rb creating Makefile
current directory: D:/workdir/vendor/gems/github-linguist-6.1.0/ext/linguist make "DESTDIR=" clean
current directory: D:/workdir/vendor/gems/github-linguist-6.1.0/ext/linguist make "DESTDIR=" generating linguist-x64-mingw32.def compiling lex.linguist_yy.c tokenizer.l: In function 'linguist_yylex': tokenizer.l:96:14: warning: implicit declaration of function 'strndup' [-Wimplicit-function-declaration]