tech-pkg archive

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

Re: c++ undefined symbols in lang/openjdk11



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

> On Fri 03 Jan 2020 at 14:34:57 +0100, Rhialto wrote:
>> I just wanted to report the problem quickly, but I'm looking into it
>> right now.
>
> It seems some issue with conformance level #defines.
> From output of c++ -E -dID, I can see that /usr/include/math.h is
> included (or more precisely, "/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/7.4.0/include-fixed/math.h"), but this bit of it isn't:
>
> #if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
> double  acosh(double);
> double  asinh(double);
> double  atanh(double);
> ...
> #endif /* (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)*/

I have struggled with multiple visibility definition issues over the
years, and find that defining things like _XOPEN_SOURCE leads to symbols
being hidden, compared to not having any visibility defines.  If
upstream is pedantic enough to only use symbols required by that
revision, then perhaps it works.  But in general it seems not to, for an
arbitrary upstream program.

> The command includes "-D_ALLBSD_SOURCE -D_BSDONLY_SOURCE" but neither
> _XOPEN_SOURCE nor _NETBSD_SOURCE.


I am unclear on whether _ALLBSD_SOURCE and _BSDONLY_SOURCE are
visibility defines or simply internal control for openjdk.  I am
guessing internal.

It seems that acosh (and presumably the other two) are now part of the
base, and perhaps this is in C99.  So our math.h may need some
adjusting, but it might not.

https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/acosh.html

I wonder if you can find out what visibilty define is being turned on,
as in the absence of any, _NETBSD_SOURCE is enabled.


Home | Main Index | Thread Index | Old Index