java/openjdk7 update fails to build

Greg Lewis glewis at eyesbeyond.com
Tue Mar 17 02:47:03 UTC 2020


Hi Jon,

On 2020-03-09 18:12, Jonathan Chen wrote:
> Hi,
>
> The latest update to java/openjdk7 on 8-Mar to 7u251 is currently failing with:
>
> echo Linking launcher...
> Linking launcher...
> cc -m64 -Xlinker -O1  -Xlinker -z -Xlinker noexecstack -m64 -Xlinker
> -export-dynamic  -L`pwd`  -o gamma launcher/java_md.o
> launcher/jli_util.o launcher/wildcard.o launcher/java.o -ljvm  -lm
> -pthread
> ld: error: undefined symbol: JNI_CreateJavaVM
>>>> referenced by java_md.c:752 (/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/hotspot/src/os/posix/launcher/java_md.c:752)
>>>>               launcher/java_md.o:(LoadJavaVM)
> ld: error: undefined symbol: JNI_GetDefaultJavaVMInitArgs
>>>> referenced by java_md.c:753 (/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/hotspot/src/os/posix/launcher/java_md.c:753)
>>>>               launcher/java_md.o:(LoadJavaVM)
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> gmake[7]: *** [/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/hotspot/make/bsd/makefiles/launcher.make:102:
> gamma] Error 1
> gmake[7]: Leaving directory
> '/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product'
> gmake[6]: *** [/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/hotspot/make/bsd/makefiles/top.make:129:
> the_vm] Error 2
> gmake[6]: Leaving directory
> '/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product'
> gmake[5]: *** [/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/hotspot/make/bsd/Makefile:292:
> product] Error 2
> gmake[5]: Leaving directory
> '/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/build/bsd-amd64/hotspot/outputdir'
> gmake[4]: *** [Makefile:203: generic_build2] Error 2
> gmake[4]: Leaving directory
> '/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/hotspot/make'
> gmake[3]: *** [Makefile:158: product] Error 2
> gmake[3]: Leaving directory
> '/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1/hotspot/make'
> gmake[2]: *** [make/hotspot-rules.gmk:128: hotspot-build] Error 2
> gmake[2]: Leaving directory
> '/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1'
> gmake[1]: *** [Makefile:251: build_product_image] Error 2
> gmake[1]: Leaving directory
> '/construction/xports/java/openjdk7/work/jdk7u-jdk7u251-b02.1'
> *** Error code 1
>
> Cheers.


I assume you're trying this on 13.x since the problem doesn't occur on
either 11.x or 12.x that I know of.  Please let me know if that isn't
true, but certainly package builder has had no problems and neither have
I.  Also, these same build errors have been happening on 13.x for months
-- well before the update of openjdk7.


My best guess is that it is something to do with the way the 13.x linker
is handling mapfiles when producing shared libraries.  Both of these
symbols are explicitly exported by the mapfile that openjdk7 uses (by
default, most symbols are kept private), and it seems like the linker
isn't respecting that on 13.x.


-- Greg



More information about the freebsd-ports mailing list