Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get building on MinGW-64 #23

Open
gvansickle opened this issue Nov 8, 2015 · 6 comments
Open

Get building on MinGW-64 #23

gvansickle opened this issue Nov 8, 2015 · 6 comments

Comments

@gvansickle
Copy link
Owner

Currently there are issues with at least the argp lib.

@gvansickle gvansickle added this to the Version 0.2.0 milestone Nov 8, 2015
@gvansickle gvansickle self-assigned this Nov 8, 2015
@DavidEGrayson
Copy link

DavidEGrayson commented Apr 17, 2016

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.)

@DavidEGrayson
Copy link

DavidEGrayson commented Apr 17, 2016

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.

@gvansickle
Copy link
Owner Author

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.

@DavidEGrayson
Copy link

DavidEGrayson commented Apr 19, 2016

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:

@DavidEGrayson
Copy link

DavidEGrayson commented Apr 19, 2016

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.

@gvansickle
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants