RPM – Fixing ‘Ancient’ Source Rebuilds..
I had occasion to install an ancient GTK+ app, recently, and had to use # rpmbuild –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 'php_gtk_args_from_hash': /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 –Werror=format-security parameter from the compile…
To do this, on a Fedora system, edit /usr/lib/rpm/redhat/macros and change %__global_cflags…….. to remove -Werror=format-security.
Then, the compile completes successfully..
You probably want to change /usr/lib/rpm/redhat/macros back to its original state, afterwards..
Robert Gadsdon. February 12, 2015.
Comments
RPM – Fixing ‘Ancient’ Source Rebuilds.. — No Comments