{"action":"created","issue":{"url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1674","repository_url":"https://api.github.com/repos/xianyi/OpenBLAS","labels_url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1674/labels{/name}","comments_url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1674/comments","events_url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1674/events","html_url":"https://github.com/xianyi/OpenBLAS/issues/1674","id":339428366,"node_id":"MDU6SXNzdWUzMzk0MjgzNjY=","number":1674,"title":"cross-compilation from GNU/Linux/x86_64 to MinGW/i686 broken","user":{"login":"svillemot","id":586809,"node_id":"MDQ6VXNlcjU4NjgwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/586809?v=4","gravatar_id":"","url":"https://api.github.com/users/svillemot","html_url":"https://github.com/svillemot","followers_url":"https://api.github.com/users/svillemot/followers","following_url":"https://api.github.com/users/svillemot/following{/other_user}","gists_url":"https://api.github.com/users/svillemot/gists{/gist_id}","starred_url":"https://api.github.com/users/svillemot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svillemot/subscriptions","organizations_url":"https://api.github.com/users/svillemot/orgs","repos_url":"https://api.github.com/users/svillemot/repos","events_url":"https://api.github.com/users/svillemot/events{/privacy}","received_events_url":"https://api.github.com/users/svillemot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-09T12:27:35Z","updated_at":"2018-08-02T11:14:18Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hi,\r\n\r\nWhen the host is GNU/Linux x86_64 and the target is MinGW/i686, then the build system does not detect that this is a cross compilation.\r\n\r\nThis is because line 230 of `c_check` reads:\r\n``\r\n $cross = 0 if (($hostarch eq \"x86_64\") && ($architecture eq \"x86\"));\r\n``\r\nThis test should set `$cross` to 0 only if the previous test on operating system (`$os ne $hostos`) did not already detect cross-compilation.\r\n\r\nBest,"},"comment":{"url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/comments/409891930","html_url":"https://github.com/xianyi/OpenBLAS/issues/1674#issuecomment-409891930","issue_url":"https://api.github.com/repos/xianyi/OpenBLAS/issues/1674","id":409891930,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTg5MTkzMA==","user":{"login":"svillemot","id":586809,"node_id":"MDQ6VXNlcjU4NjgwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/586809?v=4","gravatar_id":"","url":"https://api.github.com/users/svillemot","html_url":"https://github.com/svillemot","followers_url":"https://api.github.com/users/svillemot/followers","following_url":"https://api.github.com/users/svillemot/following{/other_user}","gists_url":"https://api.github.com/users/svillemot/gists{/gist_id}","starred_url":"https://api.github.com/users/svillemot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svillemot/subscriptions","organizations_url":"https://api.github.com/users/svillemot/orgs","repos_url":"https://api.github.com/users/svillemot/repos","events_url":"https://api.github.com/users/svillemot/events{/privacy}","received_events_url":"https://api.github.com/users/svillemot/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T11:14:18Z","updated_at":"2018-08-02T11:14:18Z","author_association":"CONTRIBUTOR","body":"Actually I should have been more specific. Building the library succeeds, but then the build process wants to run the tests:\r\n```\r\nOPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat1\r\nrun-detectors: unable to find an interpreter for ./sblat1\r\nmake[1]: *** [Makefile:8: level1] Error 2\r\n```\r\nwhich of course fails because I can't run Windows binaries on my GNU/Linux box.\r\n\r\nI can also verify that the generated `Makefile.conf` does not contain `CROSS=1`.\r\n\r\nAs explained in my first message, the reason is simply that `c_check` assumes that compiling from x86_64 to x86 is *never* a cross compilation. While in a sense this is true when the host and the target are the same OS, this is not true when cross-compiling from GNU/Linux to MinGW."}}
{"actor":{"display_login":"svillemot"}}