copypasta fail results in broken build when librt not available

Bug #951198 reported by Dossy Shiobara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Fix Released
Low
Brian Aker

Bug Description

In gearman-0.28, configure.ac has some bad copypasta that ends up
breaking the build on platforms that do not have librt, such as
MacOS X.

configure.ac --

173 # Check for -lrt
174 AC_CHECK_LIB([rt], [clock_gettime],
175 [
176 RT_LIB="-lrt"
177 AC_SUBST(RT_LIB)
178 AC_DEFINE([HAVE_LIBRT], [ 1 ], [Have clock_gettime])
179 ],
180 [
181 AC_DEFINE([HAVE_LIBRT], [ 0 ], [Have clock_gettime])
182 ])
183
184 # Check for -lm
185 AC_CHECK_LIB([m], [floor],
186 [
187 M_LIB="-lrt"
188 AC_SUBST(M_LIB)
189 AC_DEFINE([HAVE_LIBRT], [ 1 ], [Have clock_gettime])
190 ],
191 [
192 AC_DEFINE([HAVE_LIBRT], [ 0 ], [Have clock_gettime])
193 ])

As the comment on line 184 indicates, it's supposed to be checking for
libm, not librt.

Attached is a patch that fixes the problem.

Revision history for this message
Dossy Shiobara (dossy) wrote :
Revision history for this message
Brian Aker (brianaker) wrote :

Thanks this was fixed in trunk.

Changed in gearmand:
assignee: nobody → Brian Aker (brianaker)
importance: Undecided → Low
status: New → Fix Committed
milestone: none → 0.29
Brian Aker (brianaker)
Changed in gearmand:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.