Skip to contentSkip to conversation

package/librtlsdr: fix build failure

PATCH New Samuel Martin 2 participants 3 messages Nov 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/librtlsdr: fix build failure

Disable run test for pthread detection.

Fixes:
http://autobuild.buildroot.org/results/26c/26cb8c2e5f867d49451f61304bf0a1a6f7b825d9/

---
 package/librtlsdr/librtlsdr.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/librtlsdr/librtlsdr.mk +4 -0
index 2c5cf1f..9f27aad 100644
@@ -19,4 +19,8 @@ ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y)
 LIBRTLSDR_CONF_OPTS += -DDETACH_KERNEL_DRIVER=1
 endif
 
+# Prevent from configure failure because of TRY_RUN call (of course totally not
+# applicable in the cross-compilation context).
+LIBRTLSDR_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF
+
 $(eval $(cmake-package))
Signature · 1 line
2.1.3
#1 lore raw

PATCH 1/1 package/librtlsdr: fix build failure

Hi Samuel,

Quoted 15 lines · Samuel Martin

Disable run test for pthread detection.

Fixes:
http://autobuild.buildroot.org/results/26c/26cb8c2e5f867d49451f61304bf0a1a6f7b825d9/

---
 package/librtlsdr/librtlsdr.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/librtlsdr/librtlsdr.mk +0 -0
index 2c5cf1f..9f27aad 100644

package/librtlsdr/librtlsdr.mk ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y) · line 24

Quoted 6 lines
package/librtlsdr/librtlsdr.mk +3 -0
@@ -19,4 +19,8 @@ ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y)
 LIBRTLSDR_CONF_OPTS += -DDETACH_KERNEL_DRIVER=1
 endif
 
+# Prevent from configure failure because of TRY_RUN call (of course totally not
+# applicable in the cross-compilation context).
+LIBRTLSDR_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF

Does this disable use of pthreads? If so I'm not sure this is the right fix. The build failure seems to only happen when BR2_PREFER_STATIC_LIB is enabled. See http://autobuild.buildroot.net/?reason=librtlsdr-v0.5.3.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 package/librtlsdr: fix build failure

Hi Baruch,

Quoted 21 lines · Baruch Siach

Hi Samuel,

Quoted 18 lines · Samuel Martin

Disable run test for pthread detection.

Fixes:
http://autobuild.buildroot.org/results/26c/26cb8c2e5f867d49451f61304bf0a1a6f7b825d9/

---
 package/librtlsdr/librtlsdr.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/librtlsdr/librtlsdr.mk +0 -0
index 2c5cf1f..9f27aad 100644
@@ -19,4 +19,8 @@ ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y)
 LIBRTLSDR_CONF_OPTS += -DDETACH_KERNEL_DRIVER=1
 endif
 
Quoted 5 lines

package/librtlsdr/librtlsdr.mk ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y) · line 24

Quoted 3 lines
package/librtlsdr/librtlsdr.mk +3 -0
+# Prevent from configure failure because of TRY_RUN call (of course totally not
+# applicable in the cross-compilation context).
+LIBRTLSDR_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF

Does this disable use of pthreads?

Not at all, it just disables the TRY_RUN call (check the generated TryRunResults.cmake).

It does not disable the header checks, nor the compile test (see the build log [1] including this patch) in which rtlsdr link commands still include "-pthreads".

Quoted 3 lines

If so I'm not sure this is the right fix.
The build failure seems to only happen when BR2_PREFER_STATIC_LIB is enabled. See http://autobuild.buildroot.net/?reason=librtlsdr-v0.5.3.

Right. But I'm not sure to get the relation between linking with libpthread.a and disabling run tests.

Quoted 7 lines

baruch

--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

[1] http://code.bulix.org/ajzd8z-87459

Regards,

Signature · 1 line
Samuel