I'm building a package (rasmol, if you must know) from an srpm. It's an FC20 pkg, nothing older, but the software itself hasn't changed. So... I try the build, and it fails, telling me: gcc: %__global_ldflags: No such file or directory make: *** [rasmol] Error 1
Now, this isn't a brand-new package, so I'm puzzled by the error. Is there supposed to be something I need to add to the rpmbuild command line, or...?
Clues for the poor.
mark
On 03/22/2016 01:20 PM, m.roth@5-cent.us wrote:
gcc: %__global_ldflags: No such file or directory
Sounds like a broken spec. __global_ldflags isn't always defined, so it should be conditionally referenced. IIRC, use %{?__global_ldflags} instead of %{__global_ldflags}
On 22/03/16 20:20, m.roth@5-cent.us wrote:
I'm building a package (rasmol, if you must know) from an srpm. It's an FC20 pkg, nothing older, but the software itself hasn't changed. So... I try the build, and it fails, telling me: gcc: %__global_ldflags: No such file or directory make: *** [rasmol] Error 1
Now, this isn't a brand-new package, so I'm puzzled by the error. Is there supposed to be something I need to add to the rpmbuild command line, or...?
Clues for the poor.
You didn't mention which version of CentOS you are trying to build on.
The %__global_ldflags macro was introduced in RHEL7. It's provided by redhat-rpm-config. If you're attempting to build on an older version then you'll need to fix that.
On Tue, 2016-03-22 at 16:20 -0400, m.roth@5-cent.us wrote:
I'm building a package (rasmol, if you must know) from an srpm. It's an FC20 pkg, nothing older, but the software itself hasn't changed. So... I try the build, and it fails, telling me: gcc: %__global_ldflags: No such file or directory make: *** [rasmol] Error 1
Now, this isn't a brand-new package, so I'm puzzled by the error. Is there supposed to be something I need to add to the rpmbuild command line, or...?
Clues for the poor.
mark
Hi,
Which version of CentOS are you building in/for?
Are you building using mock?
Regards
Phil
On Tue, 2016-03-22 at 22:11 +0000, Phil Wyett wrote:
On Tue, 2016-03-22 at 16:20 -0400, m.roth@5-cent.us wrote:
I'm building a package (rasmol, if you must know) from an srpm. It's an FC20 pkg, nothing older, but the software itself hasn't changed. So... I try the build, and it fails, telling me: gcc: %__global_ldflags: No such file or directory make: *** [rasmol] Error 1
Now, this isn't a brand-new package, so I'm puzzled by the error. Is there supposed to be something I need to add to the rpmbuild command line, or...?
Clues for the poor.
mark
Hi,
Which version of CentOS are you building in/for?
Are you building using mock?
Regards
Phil
Hi,
Building on CentOS 7, the SRPM builds clean as is.
On CentOS 6, you do get the error described. Ned is correct with it requiring a flag change. Once lines 107 and 116 of the spec are changed to have the last portion of the lines as:
EXTRA_LIBRARIES="%{?__global_ldflags}"
the package builds fine.
Regards
Phil