{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/12236","labels_url":"https://api.github.com/repos/golang/go/issues/12236/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/12236/comments","events_url":"https://api.github.com/repos/golang/go/issues/12236/events","html_url":"https://github.com/golang/go/issues/12236","id":102196911,"number":12236,"title":"cmd/go: go install -buildmode=shared with no directory name generates bad shared library name","user":{"login":"avdva","id":12461031,"avatar_url":"https://avatars.githubusercontent.com/u/12461031?v=3","gravatar_id":"","url":"https://api.github.com/users/avdva","html_url":"https://github.com/avdva","followers_url":"https://api.github.com/users/avdva/followers","following_url":"https://api.github.com/users/avdva/following{/other_user}","gists_url":"https://api.github.com/users/avdva/gists{/gist_id}","starred_url":"https://api.github.com/users/avdva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avdva/subscriptions","organizations_url":"https://api.github.com/users/avdva/orgs","repos_url":"https://api.github.com/users/avdva/repos","events_url":"https://api.github.com/users/avdva/events{/privacy}","received_events_url":"https://api.github.com/users/avdva/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/26","html_url":"https://github.com/golang/go/milestones/Go1.5.1","labels_url":"https://api.github.com/repos/golang/go/milestones/26/labels","id":1263435,"number":26,"title":"Go1.5.1","description":"Go 1.5.1 release","creator":{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars.githubusercontent.com/u/3194333?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":1,"state":"open","created_at":"2015-08-19T20:38:28Z","updated_at":"2015-08-21T07:31:51Z","due_on":"2015-09-19T07:00:00Z","closed_at":null},"comments":4,"created_at":"2015-08-20T18:03:31Z","updated_at":"2015-08-21T15:19:00Z","closed_at":null,"body":"Go v 1.5. Fedora 22 x86_64\r\n1) Compile and install the package named \"worker\":\r\n`go install -buildmode=shared -linkshared`\r\n2) Try to compile another package, which imports \"worker\":\r\n`go build -linkshared`\r\n`go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1\r\ngcc: error: missing argument to ‘-l’`\r\nOutput with the '-x' option:\r\n`/home/user/dev/go/pkg/tool/linux_amd64/link -o $WORK/godev/proj/_obj/exe/a.out -L $WORK -L /home/user/dev/godev/pkg/linux_amd64_dynlink -installsuffix dynlink -extld=gcc -buildmode=exe -buildid=98b4ec39a65525d2ee4614652117b2ad4dfdeb26 -linkshared -w $WORK/godev/proj.a\r\n/home/user/dev/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1\r\ngcc: error: missing argument to ‘-l`\r\nThe same command with '-x --compiler=gccgo' option produces the following:\r\n`/usr/bin/gccgo -o $WORK/godev/testgo/_obj/exe/a.out $WORK/godev/testgo/_obj/_go_.o -Wl,-( -m64 -Wl,-) -L/home/user/dev/godev/pkg/gccgo_linux_amd64_fPIC/shlibs -Wl,\r\n-rpath=/home/user/dev/godev/pkg/gccgo_linux_amd64_fPIC/shlibs -l -Wl,-E -fPIC`\r\nThe output is:\r\n`/usr/bin/ld: cannot find -l-Wl,-E\r\ncollect2: error: ld returned 1 exit status`\r\nIt compiles well without -linkshared. Is there an error, or I just misuse these options?"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/133460725","html_url":"https://github.com/golang/go/issues/12236#issuecomment-133460725","issue_url":"https://api.github.com/repos/golang/go/issues/12236","id":133460725,"user":{"login":"avdva","id":12461031,"avatar_url":"https://avatars.githubusercontent.com/u/12461031?v=3","gravatar_id":"","url":"https://api.github.com/users/avdva","html_url":"https://github.com/avdva","followers_url":"https://api.github.com/users/avdva/followers","following_url":"https://api.github.com/users/avdva/following{/other_user}","gists_url":"https://api.github.com/users/avdva/gists{/gist_id}","starred_url":"https://api.github.com/users/avdva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avdva/subscriptions","organizations_url":"https://api.github.com/users/avdva/orgs","repos_url":"https://api.github.com/users/avdva/repos","events_url":"https://api.github.com/users/avdva/events{/privacy}","received_events_url":"https://api.github.com/users/avdva/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T15:19:00Z","updated_at":"2015-08-21T15:19:00Z","body":"Thank you for your assistance. I am really glad to be helpful for this project)"}}