{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/21452","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/21452/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/21452/comments","events_url":"https://api.github.com/repos/docker/docker/issues/21452/events","html_url":"https://github.com/docker/docker/issues/21452","id":143088383,"number":21452,"title":"Can't build runc on oracle linux 6 due to old gcc version","user":{"login":"kencochrane","id":261601,"avatar_url":"https://avatars.githubusercontent.com/u/261601?v=3","gravatar_id":"","url":"https://api.github.com/users/kencochrane","html_url":"https://github.com/kencochrane","followers_url":"https://api.github.com/users/kencochrane/followers","following_url":"https://api.github.com/users/kencochrane/following{/other_user}","gists_url":"https://api.github.com/users/kencochrane/gists{/gist_id}","starred_url":"https://api.github.com/users/kencochrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kencochrane/subscriptions","organizations_url":"https://api.github.com/users/kencochrane/orgs","repos_url":"https://api.github.com/users/kencochrane/repos","events_url":"https://api.github.com/users/kencochrane/events{/privacy}","received_events_url":"https://api.github.com/users/kencochrane/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-23T21:48:26Z","updated_at":"2016-03-23T21:50:26Z","closed_at":null,"body":"Building the rpm package for oracle linux-6 is failing because it can't compile runc (error below).\r\n\r\nIt looks like it is related to this bug: https://github.com/seccomp/libseccomp-golang/issues/2 which states that the gcc version is too old. Currently the gcc version that comes with oracle linux 6 is gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)\r\n\r\nI looked at updating the gcc version in oracle linux 6 and it looks like we have three options (if you know of another, please let me know).\r\n1. compile gcc ourselves (which is time consuming)\r\n2. We can use an external package that includes a newer version of gcc. \r\n- CentOS : http://superuser.com/a/542091/74527\r\n- Cern: http://unix.stackexchange.com/a/125621/6225 (this one will upgrade a ton of things, about 650MB of downloaded files, and 1.6GB on disk) this will make the build process really slow.\r\n3. Build runc outside of oracle linux 6, and copy the binary into the container. (not sure if this will work since we want to build a dynamic binary)\r\n\r\n```\r\ngo build -ldflags \"-X main.gitCommit=bbde9c426ff363d813b8722f0744115c13b408b6\" -tags \"seccomp\" -o runc .\r\n+ export GOPATH=/go\r\n+ GOPATH=/go\r\n+ cd /go/src/github.com/opencontainers/runc\r\n+ make clean\r\n+ make\r\n# github.com/seccomp/libseccomp-golang\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:298: invalid operation: in.toNative() == *_Cvar_C_ARCH_BAD (mismatched types C.uint32_t and C.uint)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:328: invalid case *_Cvar_C_ARCH_X86 in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:330: invalid case *_Cvar_C_ARCH_X86_64 in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:332: invalid case *_Cvar_C_ARCH_X32 in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:334: invalid case *_Cvar_C_ARCH_ARM in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:336: invalid case *_Cvar_C_ARCH_NATIVE in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:338: invalid case *_Cvar_C_ARCH_AARCH64 in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:340: invalid case *_Cvar_C_ARCH_MIPS in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:342: invalid case *_Cvar_C_ARCH_MIPS64 in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:344: invalid case *_Cvar_C_ARCH_MIPS64N32 in switch on a (mismatched types C.uint and C.uint32_t)\r\n/usr/src/docker-engine/tmpsrc/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:344: too many errors\r\nmake: *** [all] Error 2\r\nThe command '/bin/sh -c set -x && export GOPATH=\"/go\" && cd \"/go/src/github.com/opencontainers/runc\" && make clean && make && make install' returned a non-zero code: 2\r\n```\r\n\r\n@Djelibeybi @cpuguy83 @tiborvass "},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/200556819","html_url":"https://github.com/docker/docker/issues/21452#issuecomment-200556819","issue_url":"https://api.github.com/repos/docker/docker/issues/21452","id":200556819,"user":{"login":"Djelibeybi","id":103232,"avatar_url":"https://avatars.githubusercontent.com/u/103232?v=3","gravatar_id":"","url":"https://api.github.com/users/Djelibeybi","html_url":"https://github.com/Djelibeybi","followers_url":"https://api.github.com/users/Djelibeybi/followers","following_url":"https://api.github.com/users/Djelibeybi/following{/other_user}","gists_url":"https://api.github.com/users/Djelibeybi/gists{/gist_id}","starred_url":"https://api.github.com/users/Djelibeybi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Djelibeybi/subscriptions","organizations_url":"https://api.github.com/users/Djelibeybi/orgs","repos_url":"https://api.github.com/users/Djelibeybi/repos","events_url":"https://api.github.com/users/Djelibeybi/events{/privacy}","received_events_url":"https://api.github.com/users/Djelibeybi/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T21:50:26Z","updated_at":"2016-03-23T21:50:26Z","body":"You could build runc with gcc-4.9 from the Oracle Linux Software Collections: http://yum.oracle.com/repo/OracleLinux/OL6/SoftwareCollections12/x86_64/index.html\r\n\r\nAs long as it's not required at runtime, that should be OK. Would need to be properly tested, I guess."}}