{"action":"opened","issue":{"url":"https://api.github.com/repos/google/bazel/issues/67","labels_url":"https://api.github.com/repos/google/bazel/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/google/bazel/issues/67/comments","events_url":"https://api.github.com/repos/google/bazel/issues/67/events","html_url":"https://github.com/google/bazel/issues/67","id":64640117,"number":67,"title":"bazel build somecpp_library fails if it depends on another library","user":{"login":"pmbethe09","id":11632338,"avatar_url":"https://avatars.githubusercontent.com/u/11632338?v=3","gravatar_id":"","url":"https://api.github.com/users/pmbethe09","html_url":"https://github.com/pmbethe09","followers_url":"https://api.github.com/users/pmbethe09/followers","following_url":"https://api.github.com/users/pmbethe09/following{/other_user}","gists_url":"https://api.github.com/users/pmbethe09/gists{/gist_id}","starred_url":"https://api.github.com/users/pmbethe09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmbethe09/subscriptions","organizations_url":"https://api.github.com/users/pmbethe09/orgs","repos_url":"https://api.github.com/users/pmbethe09/repos","events_url":"https://api.github.com/users/pmbethe09/events{/privacy}","received_events_url":"https://api.github.com/users/pmbethe09/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-26T21:38:21Z","updated_at":"2015-03-26T21:38:21Z","closed_at":null,"body":"make the following:\r\ncc_library(name=\"A\", ...)\r\ncc_library(name=\"B\", srcs=[\"b.cpp\"], deps=[\":A\"], ...)\r\ncc_binary(name=\"main\", ..., deps=[\":B\"])\r\n\r\nbazel build :main works just fine (it correctly puts libA.so and libB.so on the link line)\r\nbazel build :A - same\r\nbut bazel build :B will fail with:\r\n\r\nFrom Linking lib/libB.so:\r\nUndefined symbols for architecture x86_64:\r\n  \"....\"\r\nld: symbol(s) not found for architecture x86_64\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\nERROR: lib/BUILD:3:1: Linking of rule '//lib:lib' failed: gcc failed: error executing command /usr/bin/gcc -shared -o bazel-out/local_darwin-fastbuild/bin/lib/libB.so bazel-out/local_darwin-fastbuild/bin/lib/_objs/lib/lib/b.pic.o -lstdc++ -B/usr/bin -Wl,-S: com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.\r\n\r\nIt appears that liba.so is missing from the command\r\n"}}