Bug#956178: libjna-jni libjnidispatch.system.so has build directory in soname

2020-04-08 Thread tony mancill
On Tue, Apr 07, 2020 at 08:02:24PM -0700, Bart Massey wrote:
> Package: libjna-jni
> Version: 4.5.2-1+b1
> Severity: normal
> Tags: patch
> 
> Dear Maintainer,
> 
> Placed the following in /etc/ld.so.conf.d/java-jni.conf
> 
> /usr/lib/x86_64-linux-gnu/jni
> /usr/lib/jni
> 
> and ran ldconfig, which reported
> 
> ldconfig: Can't link 
> /usr/lib/x86_64-linux-gnu/jni//build/libjna-java-ayrlgf/libjna-java-4.5.2/build/native-linux-x86-64/libjnidispatch.system.so
>  to libjnidispatch.system.so
> 
> This didn't seem right, so after some tracking down
> discovered that the Makefile was borked.
> 
> Attached is a tested patch that resolves the problem by
> removing the build path from the library soname.

Hi Bart,

Thanks for the analysis and the patch!  I will apply the patch and get
this uploaded.

Cheers,
tony



Bug#956178: libjna-jni libjnidispatch.system.so has build directory in soname

2020-04-07 Thread Bart Massey
Package: libjna-jni
Version: 4.5.2-1+b1
Severity: normal
Tags: patch

Dear Maintainer,

Placed the following in /etc/ld.so.conf.d/java-jni.conf

/usr/lib/x86_64-linux-gnu/jni
/usr/lib/jni

and ran ldconfig, which reported

ldconfig: Can't link 
/usr/lib/x86_64-linux-gnu/jni//build/libjna-java-ayrlgf/libjna-java-4.5.2/build/native-linux-x86-64/libjnidispatch.system.so
 to libjnidispatch.system.so

This didn't seem right, so after some tracking down
discovered that the Makefile was borked.

Attached is a tested patch that resolves the problem by
removing the build path from the library soname.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (400, 'oldoldstable'), (400, 'experimental'), 
(400, 'testing'), (400, 'stable'), (400, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-4-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libjna-jni depends on:
ii  libc62.30-4
ii  libffi7  3.3-4

libjna-jni recommends no packages.

libjna-jni suggests no packages.

-- no debconf information

--- native/Makefile.dist2020-04-07 19:57:15.443971156 -0700
+++ native/Makefile 2020-04-07 19:57:44.708059780 -0700
@@ -268,10 +268,10 @@
 PCFLAGS+=-fPIC
 CDEFINES+=-DHAVE_PROTECTION
 ifeq ($(DYNAMIC_LIBFFI),true)
-LDFLAGS+=-Wl,-soname,$@
+LDFLAGS+=-Wl,-soname,$(F@)
 else
 # Ensure we bind to local libffi symbols
-LDFLAGS+=-Wl,-soname,$@,-Bsymbolic
+LDFLAGS+=-Wl,-soname,$(F@),-Bsymbolic
 endif
 endif