Bug#843136: drumgizmo FTBFS on mips and mipsel: error: undefined reference to `__atomic_load_8'

2016-11-07 Thread Radovan Birdic
Hi,

On 04/11/16 10:58, James Cowgill wrote:
> > +  #include 
> Typo? You want 

Yes, this is my fault. The name of the library is not properly specified.

> >#include 
> > +  std::atomic x;
> > +  std::atomic y;
> I don't think you should rely on these types being in the global namespace.

I modified test and removed uintptr_t type, because this type may not be 
defined in some library implementations.
More about that:
http://www.cplusplus.com/reference/cstdint/

Could you please take a look at new patch I attached? It includes a new test 
for checking is libatomic needed to link.

Regards,
Radovan--- drumgizmo-0.9.11.orig/configure.ac
+++ drumgizmo-0.9.11/configure.ac
@@ -473,9 +473,10 @@ dnl ==
 AC_MSG_CHECKING([for the need for linkage with libatomic])
 AC_LANG_PUSH([C++])
 AC_LINK_IFELSE([AC_LANG_SOURCE[
+  #include 
   #include 
   int main() {
-struct Test { int val; };
+struct Test { uintmax_t val; };
 std::atomic s;
 return s.is_lock_free()?1:0;
   }


Bug#843136: drumgizmo FTBFS on mips and mipsel: error: undefined reference to `__atomic_load_8'

2016-11-04 Thread James Cowgill
Hi,

On 04/11/16 08:51, Radovan Birdic wrote:
> Package drumgizmo_0.9.11-1 FTBFS on mips and mipsel with following error:
> 
>> plugingui-plugingui.o: In function `std::atomic::is_lock_free() 
>> const':
>> /usr/include/c++/6/atomic:212: undefined reference to `__atomic_is_lock_free'
[...]
> The problem is in configure.ac file. Code used for checking is libatomic 
> needed to link 
> always returns the same result. For mips and mipsel test passes but the build 
> fails because of missing libatomic.
> I have changed that test to provide linking with libatomic as needed.

The patch:
> --- drumgizmo-0.9.11.orig/configure.ac
> +++ drumgizmo-0.9.11/configure.ac
> @@ -473,11 +473,12 @@ dnl ==
>  AC_MSG_CHECKING([for the need for linkage with libatomic])
>  AC_LANG_PUSH([C++])
>  AC_LINK_IFELSE([AC_LANG_SOURCE[
> +  #include 

Typo? You want 

>#include 
> +  std::atomic x;
> +  std::atomic y;  

I don't think you should rely on these types being in the global namespace.

>int main() {
> -struct Test { int val; };
> -std::atomic s;
> -return s.is_lock_free()?1:0;
> + return x + y;
>}
>  ]],
>  [AC_MSG_RESULT([no])],

Thanks,
James



signature.asc
Description: OpenPGP digital signature


Bug#843136: drumgizmo FTBFS on mips and mipsel: error: undefined reference to `__atomic_load_8'

2016-11-04 Thread Radovan Birdic
Package: drumgizmo
Version: 0.9.11-1
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch


Package drumgizmo_0.9.11-1 FTBFS on mips and mipsel with following error:

> plugingui-plugingui.o: In function `std::atomic::is_lock_free() 
> const':
> /usr/include/c++/6/atomic:212: undefined reference to `__atomic_is_lock_free'
> plugingui-plugingui.o: In function 
> `std::atomic::load(std::memory_order) const':
> /usr/include/c++/6/atomic:235: undefined reference to `__atomic_load_8'
> /usr/include/c++/6/atomic:235: undefined reference to `__atomic_load_8'
> /usr/include/c++/6/atomic:235: undefined reference to `__atomic_load_8'
> /usr/include/c++/6/atomic:235: undefined reference to `__atomic_load_8'
> plugingui-plugingui.o: In function `std::atomic::exchange(double, 
> std::memory_order)':
> /usr/include/c++/6/atomic:251: undefined reference to `__atomic_exchange_8'
> /usr/include/c++/6/atomic:251: undefined reference to `__atomic_exchange_8'
> plugingui-plugingui.o: In function 
> `std::atomic::load(std::memory_order) const':
> /usr/include/c++/6/atomic:235: undefined reference to `__atomic_load_8'
> /usr/include/c++/6/atomic:235: undefined reference to `__atomic_load_8'
> plugingui-plugingui.o: In function `SettingsNotifier::evaluate()':
> ./plugingui/../src/settings.h:152: undefined reference to `__atomic_load_8'
> plugingui-plugingui.o: In function 
> `std::atomic::load(std::memory_order) const':
> /usr/include/c++/6/atomic:235: undefined reference to `__atomic_load_8'
> /usr/include/c++/6/atomic:235: undefined reference to `__atomic_load_8'
> plugingui-plugingui.o:./plugingui/../src/settings.h:154: more undefined 
> references to `__atomic_load_8' follow
> collect2: error: ld returned 1 exit status
> Makefile:583: recipe for target 'plugingui' failed
> make[3]: *** [plugingui] Error 1

Full build log:
https://buildd.debian.org/status/fetch.php?pkg=drumgizmo=mips=0.9.11-1=1478043812

The problem is in configure.ac file. Code used for checking is libatomic needed 
to link 
always returns the same result. For mips and mipsel test passes but the build 
fails because of missing libatomic.
I have changed that test to provide linking with libatomic as needed.

Patch which corrects this test and resolves this issue is attached.
With this patch package builds successfully on mips*, i386 and amd64 
architectures.

Regards,
Radovan--- drumgizmo-0.9.11.orig/configure.ac
+++ drumgizmo-0.9.11/configure.ac
@@ -473,11 +473,12 @@ dnl ==
 AC_MSG_CHECKING([for the need for linkage with libatomic])
 AC_LANG_PUSH([C++])
 AC_LINK_IFELSE([AC_LANG_SOURCE[
+  #include 
   #include 
+  std::atomic x;
+  std::atomic y;	
   int main() {
-struct Test { int val; };
-std::atomic s;
-return s.is_lock_free()?1:0;
+	return x + y;
   }
 ]],
 [AC_MSG_RESULT([no])],