{"id":1306,"date":"2015-02-12T19:31:54","date_gmt":"2015-02-12T19:31:54","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1306"},"modified":"2015-02-12T19:31:54","modified_gmt":"2015-02-12T19:31:54","slug":"rpm-fixing-ancient-source-rebuilds","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1306","title":{"rendered":"RPM &#8211; Fixing &#8216;Ancient&#8217; Source Rebuilds.."},"content":{"rendered":"<p>I had occasion to install an ancient GTK+ app, recently, and had to use <strong><span style=\"font-family: courier new,courier;\"># rpmbuild &#8211;rebuild xxxxx.src.rpm<\/span><\/strong> to (re)create some old RPMs from source..<\/p>\n<p>I got the following error:<\/p>\n<pre><strong>\/home\/rgadsdon\/rpmbuild\/BUILD\/php_gtk-1.0.2\/main\/php_gtk_object.c: In function 'php_gtk_args_from_hash':<\/strong>\r\n<strong>\/home\/rgadsdon\/rpmbuild\/BUILD\/php_gtk-1.0.2\/main\/php_gtk_object.c:410:4: error: format not a string literal and no format arguments [-Werror=format-security]<\/strong>\r\n<strong> php_error(E_WARNING, buf);<\/strong>\r\n<strong> ^<\/strong><\/pre>\n<p>So, I needed to remove the &#8211;<span style=\"font-family: courier new,courier;\">Werror=format-security<\/span> parameter from the compile&#8230;<\/p>\n<p>To do this, on a Fedora system, edit <strong>\/usr\/lib\/rpm\/redhat\/macros<\/strong> and change <span style=\"font-family: courier new,courier;\">%__global_cflags&#8230;&#8230;..<\/span> to remove <span style=\"font-family: courier new,courier;\">-Werror=format-security.<\/span><\/p>\n<p>Then, the compile completes successfully..<\/p>\n<p>You probably want to change <strong>\/usr\/lib\/rpm\/redhat\/macros<\/strong> back to its <span style=\"text-decoration: underline;\">original<\/span> state, afterwards..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 February 12, 2015.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had occasion to install an ancient GTK+ app, recently, and had to use # rpmbuild &#8211;rebuild xxxxx.src.rpm to (re)create some old RPMs from source.. I got the following error: \/home\/rgadsdon\/rpmbuild\/BUILD\/php_gtk-1.0.2\/main\/php_gtk_object.c: In function &#8216;php_gtk_args_from_hash&#8217;: \/home\/rgadsdon\/rpmbuild\/BUILD\/php_gtk-1.0.2\/main\/php_gtk_object.c:410:4: error: format not a string literal and no format arguments [-Werror=format-security] php_error(E_WARNING, buf); ^ So, I needed to remove the &#8211;Werror=format-security parameter <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1306\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,6,10,11,19],"tags":[1009,161,1010,328,1008,1175],"class_list":["post-1306","post","type-post","status-publish","format-standard","hentry","category-compilation","category-crash-and-burn","category-fedora","category-hacks","category-opinion","tag-werrorformat-security","tag-fix","tag-gtk","tag-rpm","tag-rpmbuild-fail","tag-success"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1306"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1306\/revisions"}],"predecessor-version":[{"id":1308,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1306\/revisions\/1308"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}