tech-pkg archive

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

Re: c++ undeclared symbols in lang/openjdk11



Rhialto <rhialto%falu.nl@localhost> writes:

> I have now built (NetBSD 8.1/amd64, gcc7-7.4.0nb3) with the following
> patch, and it completed successfully. I would expect gcc (nb3 20180905)
> 5.5.0 from 8.1's base to work as well, but I have not tried it yet.
> If somebody can confirm that before I can, I would propose to add this
> patch.

That sounds fine to me.   Please include a comment explaining the
rationale with a link the bug you just filed with upstream.

Also, and this is probably much harder, in pkgsrc we like to not use
copies of other packages that are included like this, and basically
patch the openjdk build to use pkgsrc harfbuzz.  There are a lot of
dragons lurking there, and I don't mean to demand in the slightest that
you make this work.  I am merely pointing out that aspirational goal.


> $NetBSD$
>
> --- src/java.desktop/share/native/libfontmanager/harfbuzz/hb-blob.cc.orig	2019-10-16 18:31:09.000000000 +0000
> +++ src/java.desktop/share/native/libfontmanager/harfbuzz/hb-blob.cc
> @@ -30,12 +30,6 @@
>   * http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
>   * https://www.oracle.com/technetwork/articles/servers-storage-dev/standardheaderfiles-453865.html
>   */
> -#ifndef _POSIX_C_SOURCE
> -#pragma GCC diagnostic push
> -#pragma GCC diagnostic ignored "-Wunused-macros"
> -#define _POSIX_C_SOURCE 200809L
> -#pragma GCC diagnostic pop
> -#endif
>  
>  #include "hb.hh"
>  #include "hb-blob.hh"
>
> Harfbuzz included in openjdk11 seems to be 2.3.1; pkgsrc has 2.6.4 and
> doesn't need a similar patch even with gcc7. It has a different
> condition instead:
>
> #if !defined(_POSIX_C_SOURCE) && !defined(_MSC_VER) && !defined(__NetBSD__)
>
> I'm not sure this is better; this could only work properly if other OSes
> by default include some visibility-limiting define and _POSIX_C_SOURCE
> here would add features instead of removing them (or on other systems
> they get the effect of the defines wrong...)
>
> -Olaf.


Home | Main Index | Thread Index | Old Index