{"action":"created","issue":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/7259","labels_url":"https://api.github.com/repos/cms-sw/cmssw/issues/7259/labels{/name}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/7259/comments","events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/7259/events","html_url":"https://github.com/cms-sw/cmssw/pull/7259","id":54710626,"number":7259,"title":"RecoTracker/TkDetLayers: resolve link issue with Clang","user":{"login":"davidlt","id":197091,"avatar_url":"https://avatars.githubusercontent.com/u/197091?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlt","html_url":"https://github.com/davidlt","followers_url":"https://api.github.com/users/davidlt/followers","following_url":"https://api.github.com/users/davidlt/following{/other_user}","gists_url":"https://api.github.com/users/davidlt/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlt/subscriptions","organizations_url":"https://api.github.com/users/davidlt/orgs","repos_url":"https://api.github.com/users/davidlt/repos","events_url":"https://api.github.com/users/davidlt/events{/privacy}","received_events_url":"https://api.github.com/users/davidlt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/comparison-pending","name":"comparison-pending","color":"fef2c0"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/pending-signatures","name":"pending-signatures","color":"eb6420"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/reconstruction-pending","name":"reconstruction-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/tests-approved","name":"tests-approved","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/50","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/50/labels","id":875803,"number":50,"title":"Next CMSSW_7_4_X","description":"","creator":{"login":"nclopezo","id":1944922,"avatar_url":"https://avatars.githubusercontent.com/u/1944922?v=3","gravatar_id":"","url":"https://api.github.com/users/nclopezo","html_url":"https://github.com/nclopezo","followers_url":"https://api.github.com/users/nclopezo/followers","following_url":"https://api.github.com/users/nclopezo/following{/other_user}","gists_url":"https://api.github.com/users/nclopezo/gists{/gist_id}","starred_url":"https://api.github.com/users/nclopezo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nclopezo/subscriptions","organizations_url":"https://api.github.com/users/nclopezo/orgs","repos_url":"https://api.github.com/users/nclopezo/repos","events_url":"https://api.github.com/users/nclopezo/events{/privacy}","received_events_url":"https://api.github.com/users/nclopezo/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":323,"state":"open","created_at":"2014-11-21T15:23:58Z","updated_at":"2015-01-18T21:21:41Z","due_on":"2015-01-20T08:00:00Z","closed_at":null},"comments":4,"created_at":"2015-01-18T21:21:21Z","updated_at":"2015-01-18T23:10:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/7259","html_url":"https://github.com/cms-sw/cmssw/pull/7259","diff_url":"https://github.com/cms-sw/cmssw/pull/7259.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/7259.patch"},"body":"The following fix is required due to a behavior difference between Clang\r\nand GCC. Clan does not correctly emulate GCC visibility pragma.\r\n\r\nSee PR22254: http://llvm.org/bugs/show_bug.cgi?id=22254\r\n\r\nThe link error involved the following two symbols:\r\n- `Plane::tangentPlane(Point3DBase<float, LocalTag> const&) const`\r\n- `Plane::tangentPlane(Point3DBase<float, GlobalTag> const&) const`\r\n\r\nOn link command we have `libTrackingToolsDetLayers.so` and\r\n`libTrackingToolsGeomPropagators.so`, which have undefined references\r\nfor above two symbols. These are usually resolved on dynamic loading.\r\n\r\nOn Clang `TECLayer.o` marked these particular symbols as HIDDEN.\r\n\r\n**Clang:**\r\n```\r\n  182: 0000000000000000     0 NOTYPE  GLOBAL HIDDEN   UND\r\n_ZNK5Plane12tangentPlaneERK11Point3DBaseIf8LocalTagE\r\n  183: 0000000000000000     0 NOTYPE  GLOBAL HIDDEN   UND\r\n_ZNK5Plane12tangentPlaneERK11Point3DBaseIf9GlobalTagE\r\n```\r\n**GCC:**\r\n```\r\n  261: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND\r\n_ZNK5Plane12tangentPlaneERK11Point3DBaseIf9GlobalTagE\r\n  262: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND\r\n_ZNK5Plane12tangentPlaneERK11Point3DBaseIf8LocalTagE\r\n```\r\n`TkDetUtil.h` inside visibility pragma section has forward declaration\r\nof class `Plane`. Thus Clang marked it as HIDDEN. Then linker was\r\ncomplaining that two libraries mentioned above reference a HIDDEN\r\nsymbols, which is not allowed as these sybmols are not public API.\r\n\r\nIn GCC `Plane` is with DEFAULT visbility, because the first declaration\r\nwins, thus the DEFAULT visibility. You cannot modify it later on.\r\n\r\nLesson here: do not add forward declaration for publicly available\r\nclasses in pragma visibility hidden section.\r\n\r\nSigned-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>"},"comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments/70431282","html_url":"https://github.com/cms-sw/cmssw/pull/7259#issuecomment-70431282","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/7259","id":70431282,"user":{"login":"cmsbuild","id":4170616,"avatar_url":"https://avatars.githubusercontent.com/u/4170616?v=3","gravatar_id":"","url":"https://api.github.com/users/cmsbuild","html_url":"https://github.com/cmsbuild","followers_url":"https://api.github.com/users/cmsbuild/followers","following_url":"https://api.github.com/users/cmsbuild/following{/other_user}","gists_url":"https://api.github.com/users/cmsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/cmsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmsbuild/subscriptions","organizations_url":"https://api.github.com/users/cmsbuild/orgs","repos_url":"https://api.github.com/users/cmsbuild/repos","events_url":"https://api.github.com/users/cmsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/cmsbuild/received_events","type":"User","site_admin":false},"created_at":"2015-01-18T23:10:50Z","updated_at":"2015-01-18T23:10:50Z","body":"Comparison is ready\nhttps://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7259/1974/summary.html"}}