signal-cli icon indicating copy to clipboard operation
signal-cli copied to clipboard

linux arm build issue for `:libsignal-cli:test` run

Open chenrui333 opened this issue 6 months ago • 3 comments

seeing some :libsignal-cli:test failure for linux arm builds for the recent releases

  > Task :libsignal-cli:test
  Picked up _JAVA_OPTIONS: -Duser.home=/home/linuxbrew/.cache/Homebrew/java_cache
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_TwoExisting(T) > [1] T{#input=2, request=ACI_PNI_NUM, #output=1} FAILED
      java.lang.UnsatisfiedLinkError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_TwoExisting(T) > [3] T{#input=2, request=ACI_PNI_NUM, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:158
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_TwoExisting(T) > [5] T{#input=2, request=ACI_PNI_NUM, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:158
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_TwoExisting(T) > [8] T{#input=2, request=ACI__NUM, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:158
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_TwoExisting(T) > [12] T{#input=2, request=_PNI_NUM, #output=2} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:158
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_TwoExisting(T) > [14] T{#input=2, request=ACI_PNI_, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:158
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_TwoExisting(T) > [15] T{#input=2, request=ACI_PNI_, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:158
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_TwoExisting(T) > [16] T{#input=2, request=ACI_PNI_, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:158
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_ThreeExisting(T) > [1] T{#input=3, request=ACI_PNI_NUM, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:170
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_ThreeExisting(T) > [2] T{#input=3, request=ACI_PNI_NUM, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:170
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_ThreeExisting(T) > [3] T{#input=3, request=ACI_PNI_NUM, #output=1} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:170
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_ThreeExisting(T) > [4] T{#input=3, request=ACI_PNI_NUM, #output=2} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:170
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  MergeRecipientHelperTest > resolveRecipientTrustedLocked_ThreeExisting(T) > [5] T{#input=3, request=ACI_PNI_NUM, #output=2} FAILED
      java.lang.NoClassDefFoundError at MergeRecipientHelperTest.java:170
          Caused by: java.lang.ExceptionInInitializerError at MergeRecipientHelperTest.java:158
  
  60 tests completed, 13 failed
  
  > Task :libsignal-cli:test FAILED

relates to

  • https://github.com/Homebrew/homebrew-core/pull/226071
  • https://github.com/Homebrew/homebrew-core/pull/222933

chenrui333 avatar Jun 07 '25 18:06 chenrui333

This also affects x64: https://gitlab.alpinelinux.org/bratkartoffel/aports/-/jobs/1889526

bratkartoffel avatar Jun 09 '25 10:06 bratkartoffel

The first error indicates that this is a problem with the native libsignal-client library. So by default the tests only work on platform supported by the libsignal-client library (not arm and not alpine)

java.lang.UnsatisfiedLinkError at MergeRecipientHelperTest.java:158

You can try building the native library first, add it to the libsignal-client.jar file and then use the libsignal_client_path parameter:

gradle build -Plibsignal_client_path="/PATH/TO/libsignal-client.jar"

AsamK avatar Jun 09 '25 11:06 AsamK

The first error indicates that this is a problem with the native libsignal-client library. So by default the tests only work on platform supported by the libsignal-client library (not arm and not alpine)

I think it used to work until the two recent releases.

chenrui333 avatar Jun 09 '25 15:06 chenrui333

Yeah, there have been changes in libsignal-client, so now the native library is required for the tests

AsamK avatar Jun 24 '25 21:06 AsamK

Just for reference if anyone stumbles accross this issue. On alpine we fixed the build by explicitly setting the libsignal_client_path as suggested by AsamK.

https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/86123

Thanks again for your help.

The first error indicates that this is a problem with the native libsignal-client library. So by default the tests only work on platform supported by the libsignal-client library (not arm and not alpine)

java.lang.UnsatisfiedLinkError at MergeRecipientHelperTest.java:158

You can try building the native library first, add it to the libsignal-client.jar file and then use the libsignal_client_path parameter:

gradle build -Plibsignal_client_path="/PATH/TO/libsignal-client.jar"

bratkartoffel avatar Jun 26 '25 04:06 bratkartoffel