-
Notifications
You must be signed in to change notification settings - Fork 265
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
build fails on mingw64 with "undefined reference to `__stack_chk_fail'" #54
Comments
I don't think there is a way to enable it on mingw64, though it would be worth opening an issue for what hardening we can do for mingw. Something like this might be a start: For this particular issue, I think we need to change the check from a compile test to a link test. This thread discusses a similar problem and how to detect it at configuration time: |
@jbarlow83 , would you be able to take a look at this? |
@busterb Yes, I can. I get a different error when running ./autogen.sh to try to set up mingw on a Windows 7 box.
The failure is at line 76-78 in ./update.sh, where a perl script is invoked to generate some headers. perl is installed in the mingw-msys environment. @kinichiro what mingw "distribution" were you using? |
I actually have time to look at it now. I'm reproducing this on Ubuntu 14.04 with the mingw-w64 package installed. The configure line should look like this: CC=i686-w64-mingw32-gcc ./configure --host=i686-w64-mingw32 If you are building on Windows, I recommend installing mingw-w64 inside of cygwin and doing the same configuration, since you can more easily install perl and such. |
Or just do make dist from linux and copy the tarball to windows to avoid the pre-configure steps. |
I'm committing a fix that disables this directly for mingw, simplifies a lot of the other check logic, and gets us building again. Interesting to note, link-time checks don't seem to work for the latest Mingw because it actually has a libssp-0.dll that it tries to link with during the compile checks! We can figure out what to do with that later. |
please check 303b972 I will open a new ticket for enabling windows/mingw hardening flags. That there is a libssp dll is kind of interesting. |
@jbarlow83 @busterb |
It works fine. |
Hi,
It seems that current head build fails on mingw64, error messages are like this.
I think this comes from PL #53 that added
-fstack-protector-all
.With
./configure --disable-hardening
, I could build, though, is there any way to work with-fstack-protector-all
on mingw64 ?Thanks.
The text was updated successfully, but these errors were encountered: