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
Fixes to build v2.3.0 on Windows with MinGW-w64 #611
Comments
@brechtsanders Thanks for your feedback. We have PR #522, which is used to resolve Your fix about posix_memalign() looks good to me. PR is welcome. :) Hope we can improve building in windows for next version. |
There has been no activity on that PR since October so I worry that means nothing is being done to fix this. getline is also not present on certain old UNIXlike operating systems, such as Mac OS X 10.6 and earlier. The changelog entries for 2.3.0 do not mention dropping support for older systems, so if you still want to remain compatible with them, please provide a compatibility implementation of getline. |
Hi, @ryandesign @brechtsanders PR #522 was created by me. I will spend some time to deal with my open PR these days. But I think they need more reviews and suggestions. Please help me if you are willing to make contributions. :) |
I posted code in this issue to work around the missing |
posix_memalign() and getline() are also missing on Solaris 10. The above patch for annotate.c seems to be OK for Solaris 10. For posix_memalign(), the following patch might be fix the problem:
|
I see this ticket is closed, but none of the suggested changes appear to be implemented. |
sorry, closed wrong issue when merging another Windows related PR. we don't want more Windows ifdef checks sprinkled throughout the code. they make things a lot harder to maintain and to follow. we need to develop a module for Windows compatibility to workaround its deficient platform. that would provide an implementation of |
Also it is not about windows but MingW specifically. Some help could be grabbed from here: https://stackoverflow.com/questions/10862121/undefined-reference-to-posix-memalign-using-mingw32 which refers to upgrade MingW and/or rely on pagealign_alloc . |
I will handle that one by adding Mingw to gh actions. Also I may simply disable some of the non portable examples. libGD itself does not need such portable layer, we have the gd IO layer to delegate this. Allocation API usage however will be fixed :) |
I just built libgd 2.3.0 on Windows using MinGW-w64 (using MSYS2 shell).
To do this 2 fixes were needed to address these issues:
posix_memalign()
getline()
Using these fixes I was able to build the library:
Probably there is a better solution for the missing
getline()
issue.The text was updated successfully, but these errors were encountered: