{"id":58,"date":"2005-10-27T13:17:10","date_gmt":"2005-10-27T17:17:10","guid":{"rendered":"http:\/\/benjamin.smedbergs.us\/blog\/?p=58"},"modified":"2005-10-27T13:19:34","modified_gmt":"2005-10-27T17:19:34","slug":"gcc-40-workaround","status":"publish","type":"post","link":"http:\/\/benjamin.smedbergs.us\/blog\/2005-10-27\/gcc-40-workaround\/","title":{"rendered":"GCC4.0 &#8211; relocation R_X86_64_PC32 against `memcpy@@GLIBC_2.2.5&#8242; can not be used"},"content":{"rendered":"<p>There is a bug in GCC 4.0 (and 4.0.1 and 4.1) which breaks the Mozilla\/Firefox\/Thunderbird build on x86_64 and various other processors: GCC is treating the builtin functions such as &#8220;memset&#8221; and &#8220;memcpy&#8221; as having hidden visibility in certain circumstances that are hard to figure out. <a href=\"http:\/\/gcc.gnu.org\/bugzilla\/show_bug.cgi?id=20297\">GCC bug 20297<\/a> covers the issue, though the patch in the bug doesn&#8217;t fix all the problems and I haven&#8217;t seen any action by the GCC maintainers to get the patch landed or fixed. I tried to provide a patch to detect this bug in <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=307168\">Mozilla bug 307168<\/a>, but apparently my configure test is not good enough to catch all instances of the bug.<\/p>\n<p>In the meantime, if you experience the error &#8220;relocation R_X86_64_PC32 against `memcpy@@GLIBC_2.2.5&#8242; can not be used&#8221; or something similar while building mozilla, use the following hackaround:<\/p>\n<p><tt>ac_cv_visibility_pragma=no path\/to\/mozilla\/configure --enable-options-here<\/tt><\/p>\n<p>or put this in your mozconfig:<\/p>\n<p><tt>ac_cv_visibility_pragma=no<\/tt> <em>(Don&#8217;t prefix this with ac_add_options!)<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a bug in GCC 4.0 (and 4.0.1 and 4.1) which breaks the Mozilla\/Firefox\/Thunderbird build on x86_64 and various other processors: GCC is treating the builtin functions such as &#8220;memset&#8221; and &#8220;memcpy&#8221; as having hidden visibility in certain circumstances that are hard to figure out. GCC bug 20297 covers the issue, though the patch [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-mozilla"],"_links":{"self":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":0,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"wp:attachment":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}