Giter Site home page Giter Site logo

Get building on MinGW-64 about ucg HOT 6 OPEN

gvansickle avatar gvansickle commented on May 25, 2024
Get building on MinGW-64

from ucg.

Comments (6)

DavidEGrayson avatar DavidEGrayson commented on May 25, 2024

I started working on this tonight. You can follow my progress here:

https://github.com/DavidEGrayson/mingw-packages-deg/tree/master/mingw-w64-ucg

(The way I try out interesting C/C++ software is that I make an MSYS2 package for it.)

from ucg.

DavidEGrayson avatar DavidEGrayson commented on May 25, 2024

I got ucg to compile, link, and run on MSYS2 as a MinGW-w64 program but it seems to be buggy: it only finds matches in the top-level directory.

from ucg.

gvansickle avatar gvansickle commented on May 25, 2024

Hi @DavidEGrayson ,
Thanks for your interest! Yeah, I've been picking away at this issue as well. You may want to look at what I've got so far at feature/ISSUE23-BuildOnMINGW64. The main thing I've run into is that I need to pull in a ton of gnulib just for argp and fts. And like you even once that's sorted it doesn't want to pass "make check". Frustrating. And then there are the licenses: I haven't yet got up the spirit to go through all the gnulib files that get pulled in to make sure they're compatible. I don't wish to dissuade you with my Debbie Downer talk here, I definitely want to get a statically-linked MinGW-w64 build happening, but it's definitely more work than I had first anticipated.

from ucg.

DavidEGrayson avatar DavidEGrayson commented on May 25, 2024

Thanks for the reply! I might dig into this later, and I suspect I will find that there are issues with Gnulib's fts implementation on mingw-w64 that are causing these problems. I had similar problems a year ago when I tried to get recursive grep working:

from ucg.

DavidEGrayson avatar DavidEGrayson commented on May 25, 2024

Yeah, the problem I was talking about where ucg doesn't search in any directories except the top-level one was caused by st_ino always being zero. In my MSYS2 package, I now apply a patch to Gnulib's fts-cycle.c so it ignores nodes with st_ino equal to zero when checking for cycles.

By the way, maybe UniversalCodeGrep should behave like grep does and show a warning when such cycles are detected. You can see if a cycle happened by checking if the fts_info field is equal to FTS_DC.

I can now run make check and only four tests are failing:

  2: Error code with bad search path                 FAILED (sanity.at:26)
  3: Error code with bad regex                       FAILED (sanity.at:37)
 14: --[no]column tests                              FAILED (file_presentation.at:56)
 16: Color-vs-terminal tests                         FAILED (file_presentation.at:133)

I looked at your branch ( https://github.com/gvansickle/ucg/tree/feature/ISSUE23-BuildOnMINGW64 ) and I don't see any changes that might make those tests pass.

from ucg.

gvansickle avatar gvansickle commented on May 25, 2024

The st_ino thing is going to break ArgParse::is_same_file() too.

from ucg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.