FreeBSD failed: /usr/local/openjdk8/jre/lib/amd64/server/libjvm.so: Undefined symbol "pthread_set_name_np"

Achilleas Mantzios achill at matrix.gatewaynet.com
Fri Nov 16 07:14:27 UTC 2018


On 16/11/18 1:07 π.μ., Jung-uk Kim wrote:
> On 18. 11. 15., Achilleas Mantzios wrote:
>> Dear members,
>>
>> I run FreeBSD 11.2-RELEASE-p3 with openjdk8-8.181.13 and I am trying to
>> install pljava (java PL support for PostgreSQL,triggers), I have
>> successfully built pljava, and installed it, but when I try to create
>> the extension I get :
>>
>> [local] [448] 5bed6f0c.1c0 2018-11-15 15:10:36.784 EET psql
>> postgres at dynacom line:15 WARNING: Java virtual machine not yet loaded
>>
>> [local] [448] 5bed6f0c.1c0 2018-11-15 15:10:36.784 EET psql
>> postgres at dynacom line:16 DETAIL: dlopen
>> (/usr/local/openjdk8/jre/lib/amd64/server/libjvm.so) failed:
>> /usr/local/openjdk8/jre/lib/amd64/server/libjvm.so: Undefined symbol
>> "pthread_set_name_np"
>>
>> [local] [448] 5bed6f0c.1c0 2018-11-15 15:10:36.784 EET psql
>> postgres at dynacom line:17 HINT: SET pljava.libjvm_location TO the correct
>> path to the jvm library (libjvm.so or jvm.dll, etc.)
>>
>> [local] [448] 5bed6f0c.1c0 2018-11-15 15:10:36.784 EET psql
>> postgres at dynacom line:18 CONTEXT: PL/pgSQL function
>> call_weeklycheck_before() line 6 at assignment
>>
>> [local] [448] 5bed6f0c.1c0 2018-11-15 15:10:36.784 EET psql
>> postgres at dynacom line:19 ERROR: cannot use PL/Java before successfully
>> completing its setup
>>
>> It used to work with openjdk7, by doing :
>>
>> postgres at smadev:~% ldd /usr/local/openjdk8/jre/lib/amd64/server/libjvm.so
>> /usr/local/openjdk8/jre/lib/amd64/server/libjvm.so:
>> libm.so.5 => /lib/libm.so.5 (0x801dd8000)
>> libc++.so.1 => /usr/lib/libc++.so.1 (0x802005000)
>> libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x8022d3000)
>> libc.so.7 => /lib/libc.so.7 (0x800823000)
>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x8024f2000)
>>
>> postgres at smadev:~%
>>
>> I see no linking to libthr, whereas if I ldd jdk7 I get :
>>
>> postgres at smadev:~% ldd
>> /pgsqlbig/SMADEV_BACKUP/usr/local/openjdk7/jre/lib/amd64/server/libjvm.so
>> /pgsqlbig/SMADEV_BACKUP/usr/local/openjdk7/jre/lib/amd64/server/libjvm.so:
>> libm.so.5 => /lib/libm.so.5 (0x801d42000)
>> libc++.so.1 => /usr/lib/libc++.so.1 (0x801f6f000)
>> libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80223d000)
>> libthr.so.3 => /lib/libthr.so.3 (0x80245c000)
>> libc.so.7 => /lib/libc.so.7 (0x800823000)
>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x802684000)
>> postgres at smadev:~%
>> And it indeed runs with jd7.
>> However, jdk7 is no more on this machine, and also pljava was compiled
>> with jdk8. Any ideas?
> Please try the attached patch.

Worked like a charm thanks, please commit this!

>
> Jung-uk Kim


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt



More information about the freebsd-java mailing list