pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lang/openjdk8 compiled with gcc7



A few days ago I found that building lang/openjdk8 with gcc7 failed for
me, with 

    Making adlc
    /pkg_comp/obj/pkgsrc/lang/openjdk8/default/bootstrap/jre/lib/amd64/libstdc++.so.7: version GLIBCXX_3.4.9 required by ../generated/adfiles/adlc not defined

It looked like this adlc program was built with gcc7 (the file was new)
but run with the libstdc++ from the bootstrap kit (which was built with
a different gcc from 2015).

Today I looked into this a bit more, and I found in
lang/openjdk8/Makefile a fragment meant to avoid just this problem:

    post-extract:
    # These libs are bundled w/ the netbsd-7 bootstrap to facilitate building with
    # MKLLVM=yes / MKGCC=no. Nuke them from bootstrap if they are present in base.
    .if exists(/lib/libgcc_s.so.1)
	    ${RM} -f ${ALT_BOOTDIR}/jre/lib/${LIBDIR_ARCH}/libgcc_s.so*
    .endif
    .if exists(/usr/lib/libstdc++.so.7)
	    ${RM} -f ${ALT_BOOTDIR}/jre/lib/${LIBDIR_ARCH}/libstdc++.so*
    .endif

but it didn't activate in my pkg_comp1 chroot. The reason for this was
that the base version of the library is now at version 8. However gcc7
still provides a version 7, which now conflicted with the bootstrap kit
instead.

So the bootstrap kit library also needs to be removed if there is a gcc7
being used (maybe also other gcc versions?)

A possible fix might be something like

    .if exists(/usr/lib/libstdc++.so.7) || exists(${_GCC_PREFIX}/lib/libstdc++.so.7)

but maybe, if _GCC_PREFIX is set, the base system library should not be
checked.

Thoughts?

-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.       --Douglas Adams, "THGTTG"

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index