{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/29412","repository_url":"https://api.github.com/repos/Homebrew/homebrew-core","labels_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/29412/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/29412/comments","events_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/29412/events","html_url":"https://github.com/Homebrew/homebrew-core/issues/29412","id":335391897,"node_id":"MDU6SXNzdWUzMzUzOTE4OTc=","number":29412,"title":"mingw-w64 update to 5.0.4 broke constructors","user":{"login":"Midar","id":752237,"node_id":"MDQ6VXNlcjc1MjIzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/752237?v=4","gravatar_id":"","url":"https://api.github.com/users/Midar","html_url":"https://github.com/Midar","followers_url":"https://api.github.com/users/Midar/followers","following_url":"https://api.github.com/users/Midar/following{/other_user}","gists_url":"https://api.github.com/users/Midar/gists{/gist_id}","starred_url":"https://api.github.com/users/Midar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Midar/subscriptions","organizations_url":"https://api.github.com/users/Midar/orgs","repos_url":"https://api.github.com/users/Midar/repos","events_url":"https://api.github.com/users/Midar/events{/privacy}","received_events_url":"https://api.github.com/users/Midar/received_events","type":"User","site_admin":false},"labels":[{"id":351933572,"node_id":"MDU6TGFiZWwzNTE5MzM1NzI=","url":"https://api.github.com/repos/Homebrew/homebrew-core/labels/upstream%20issue","name":"upstream issue","color":"ff7722","default":false}],"state":"closed","locked":true,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-06-25T12:47:27Z","updated_at":"2018-06-26T13:44:44Z","closed_at":"2018-06-26T12:08:05Z","author_association":"CONTRIBUTOR","body":"- [x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh\r\n- [x] have a problem with `brew install` (or `upgrade`, `reinstall`) a single, official formula (not cask)? If it's a general `brew` problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a `brew cask` problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.\r\n- [x] ran `brew update` and can still reproduce the problem?\r\n- [x] ran `brew doctor`, fixed all issues and can still reproduce the problem?\r\n- [ ] ran `brew gist-logs <formula>` (where `<formula>` is the name of the formula that failed) and included the output link?\r\n- [ ] if `brew gist-logs` didn't work: ran `brew config` and `brew doctor` and included their output with your issue?\r\n\r\nTo help us debug your issue please explain:\r\n- What you were trying to do (and why)\r\n\r\nUsing mingw-w64 to cross-compile Win32 and Win64 binaries from macOS. Do I really need to justify why?\r\n\r\n- What happened (include command output)\r\n\r\nThe recent update to mingw-w64 broke constructors. Example:\r\n\r\n```\r\n$ cat test.c\r\n#include <stdio.h>\r\n\r\nstatic void __attribute__((constructor))\r\ninit(void)\r\n{\r\n\tputs(\"Test!\");\r\n}\r\n\r\nint\r\nmain()\r\n{\r\n\treturn 0;\r\n}\r\n$ x86_64-w64-mingw32-gcc test.c\r\n$ wine a.exe\r\n$ i686-w64-mingw32-gcc test.c\r\n$ wine a.exe           \r\n$\r\n```\r\n\r\nGCC actually does emit a correct entry in section .ctors, but it is not called.\r\n\r\nThis worked before the 5.0.4 update.\r\n\r\n- What you expected to happen\r\n\r\nConstructors get executed.\r\n\r\nmingw-w64 producing correct code.\r\n\r\n- Step-by-step reproduction instructions (by running `brew install` commands)\r\n\r\nbrew -v install mingw-w64, then the above steps."},"comment":{"url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/comments/400313947","html_url":"https://github.com/Homebrew/homebrew-core/issues/29412#issuecomment-400313947","issue_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/29412","id":400313947,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDMxMzk0Nw==","user":{"login":"fxcoudert","id":1980544,"node_id":"MDQ6VXNlcjE5ODA1NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1980544?v=4","gravatar_id":"","url":"https://api.github.com/users/fxcoudert","html_url":"https://github.com/fxcoudert","followers_url":"https://api.github.com/users/fxcoudert/followers","following_url":"https://api.github.com/users/fxcoudert/following{/other_user}","gists_url":"https://api.github.com/users/fxcoudert/gists{/gist_id}","starred_url":"https://api.github.com/users/fxcoudert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxcoudert/subscriptions","organizations_url":"https://api.github.com/users/fxcoudert/orgs","repos_url":"https://api.github.com/users/fxcoudert/repos","events_url":"https://api.github.com/users/fxcoudert/events{/privacy}","received_events_url":"https://api.github.com/users/fxcoudert/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T13:44:44Z","updated_at":"2018-06-26T13:44:44Z","author_association":"MEMBER","body":"So it appears to be a linker issue, because object files created are identical:\r\n\r\n```\r\nbli /tmp $ md5 a.s working/a.s \r\nMD5 (a.s) = 69bd197c535b09b057d47aef4bd83223\r\nMD5 (working/a.s) = 69bd197c535b09b057d47aef4bd83223\r\nbli /tmp $ md5 a.o working/a.o\r\nMD5 (a.o) = 76ab50e0ae9128c2a09d260e1fed2894\r\nMD5 (working/a.o) = 76ab50e0ae9128c2a09d260e1fed2894\r\nbli /tmp $ md5 a.exe working/a.exe \r\nMD5 (a.exe) = c80704ca622de1b5ab8174c1595b6f63\r\nMD5 (working/a.exe) = d8c5d8bbd98325b4cd5faf3eeb387669\r\n```"}}
{"actor":{"display_login":"fxcoudert"}}