{"action":"created","issue":{"url":"https://api.github.com/repos/mosra/magnum/issues/304","repository_url":"https://api.github.com/repos/mosra/magnum","labels_url":"https://api.github.com/repos/mosra/magnum/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/mosra/magnum/issues/304/comments","events_url":"https://api.github.com/repos/mosra/magnum/issues/304/events","html_url":"https://github.com/mosra/magnum/issues/304","id":396177138,"node_id":"MDU6SXNzdWUzOTYxNzcxMzg=","number":304,"title":"OpenGL issues when cross building to x86 on x86_64 Ubuntu host","user":{"login":"helmesjo","id":2501070,"node_id":"MDQ6VXNlcjI1MDEwNzA=","avatar_url":"https://avatars0.githubusercontent.com/u/2501070?v=4","gravatar_id":"","url":"https://api.github.com/users/helmesjo","html_url":"https://github.com/helmesjo","followers_url":"https://api.github.com/users/helmesjo/followers","following_url":"https://api.github.com/users/helmesjo/following{/other_user}","gists_url":"https://api.github.com/users/helmesjo/gists{/gist_id}","starred_url":"https://api.github.com/users/helmesjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helmesjo/subscriptions","organizations_url":"https://api.github.com/users/helmesjo/orgs","repos_url":"https://api.github.com/users/helmesjo/repos","events_url":"https://api.github.com/users/helmesjo/events{/privacy}","received_events_url":"https://api.github.com/users/helmesjo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2019-01-05T16:06:10Z","updated_at":"2019-01-05T23:31:29Z","closed_at":"2019-01-05T23:31:29Z","author_association":"NONE","body":"I'm writing a [conan recipe for Magnum](https://github.com/helmesjo/conan-magnum) (already got one for [Corrade](https://github.com/helmesjo/conan-corrade) successfully building). I've wrestled a few days now with these issues (each try takes _a lot_ of time) so I'd thought I'd look for some help/ideas here!\r\n\r\n## Issue\r\n\r\nI'm building conan packages for GCC, Clang (etc.) inside [docker containers](https://github.com/conan-io/conan-docker-tools). \r\nIn the conan recipe, prior to building magnum, it installs `libgl1-mesa-dev` (or `libgl1-mesa-dev:i386` respectively) on the host. But when later building, it either:\r\n\r\n1. Fails to find OpenGL libs when targeting x86 ([for all builds on Ubuntu](https://travis-ci.org/helmesjo/conan-magnum/builds/475542775)) if only installing `libgl1-mesa-dev:i386`:\r\n    ```\r\n    CMake Error at /usr/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 \r\n    (message):\r\n        Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY)\r\n    ```\r\n    Above can be fixed* (for all but Ubuntu [Trusty](https://travis-ci.org/helmesjo/conan-magnum/jobs/475707451#L2721)) by installing [both `libgl1-mesa-dev` & `libgl1-mesa-dev:i386`](https://github.com/helmesjo/conan-magnum/blob/958622b1a44ef3b6f257a56ab5afdd0e045c5650/conanfile.py#L140-L143) (in that order, else 1. happens again), but then it:\r\n2. [fails to link](https://travis-ci.org/helmesjo/conan-magnum/jobs/475707455#L2797) OpenGL (`error adding symbols: File in wrong format`) on Ubuntu Bionic & Cosmic when targeting x86 (it appears link the 64bit lib).\r\n\r\n*There are [a](https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/949606) [lot](https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1317113) of [issues](http://ysflight.in.coocan.jp/programming/crossCompile/e.html) with multiple mesa-dev packages on the same host.\r\n\r\n## Details:\r\n* CMake 3.12\r\n* Ubuntu x64: Trusty (GCC 4.9), Xenial (GCC 5), Artful (GCC 6 & 7, Clang 3.9. 4, 5), Bionic (GCC 8, Clang 6), Cosmic (Clang 7) (using the [conan docker images](https://github.com/conan-io/conan-docker-tools))\r\n\r\nSo, any ideas? Anyone seen similar issues? Am I missing something obvious?"},"comment":{"url":"https://api.github.com/repos/mosra/magnum/issues/comments/451701292","html_url":"https://github.com/mosra/magnum/issues/304#issuecomment-451701292","issue_url":"https://api.github.com/repos/mosra/magnum/issues/304","id":451701292,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTcwMTI5Mg==","user":{"login":"helmesjo","id":2501070,"node_id":"MDQ6VXNlcjI1MDEwNzA=","avatar_url":"https://avatars0.githubusercontent.com/u/2501070?v=4","gravatar_id":"","url":"https://api.github.com/users/helmesjo","html_url":"https://github.com/helmesjo","followers_url":"https://api.github.com/users/helmesjo/followers","following_url":"https://api.github.com/users/helmesjo/following{/other_user}","gists_url":"https://api.github.com/users/helmesjo/gists{/gist_id}","starred_url":"https://api.github.com/users/helmesjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helmesjo/subscriptions","organizations_url":"https://api.github.com/users/helmesjo/orgs","repos_url":"https://api.github.com/users/helmesjo/repos","events_url":"https://api.github.com/users/helmesjo/events{/privacy}","received_events_url":"https://api.github.com/users/helmesjo/received_events","type":"User","site_admin":false},"created_at":"2019-01-05T23:31:29Z","updated_at":"2019-01-05T23:31:29Z","author_association":"NONE","body":"Alright, so native builds did the trick. Closing this! "}}
{"actor":{"display_login":"helmesjo"}}