vision-dbms / vision

The master repository for the Vision database system.
https://vision-dbms.com
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

Address newly absent 'matherr' structures on Linux #49

Closed MichaelJCaruso closed 5 years ago

MichaelJCaruso commented 6 years ago

As of 'glibc' 2.27 (see issue #48), Linux no longer supports 'matherr'. For our purposes, the implication of that change is the disappearance of a definition for 'struct __exception' from the header files. For portability reasons, our code long ago began using 'isfinite' to detect the issues 'matherr' was designed to address. For legacy reasons, we continue to provide an implementation of a 'matherr' callback to ensure that very old and System V Unix libraries return results detectable by 'isfinite'. Our Linux code is known to work correctly with and without it. That being the case, we just need to make sure that the virtually unused callback we provide continues to compile and could work if it was ever called. We've already addressed that case for other platforms. Add Linux to the list.

MichaelJCaruso commented 6 years ago

This conservative change appears to work as expected, but for jollies, it might want to be tested on a System V version (Solaris?).

c-kuhlman commented 6 years ago

I think I can find time to try it later this week … I’ll let you know

MichaelJCaruso commented 6 years ago

Thanks

c-kuhlman commented 6 years ago

I haven't actually tried it, because, as I read the code, this new version won't compile on Solaris. Before this change, the only platform that used a double underbar (struct __exception) was Linux. Windows was also special, using a single underbar. Everything else, including Solaris, used no underbar. (struct exception). With this new code, Solaris would get the double underbar which it doesn't want.

Am I reading it right?

c-kuhlman commented 6 years ago

built your (mjc) master branch this morning, and got the link error. Changed code to look like:

#if defined(_WIN32)
    struct  _exception *pException
#else
    struct  exception *pException
#endif

and the error went away. Hopefully that is fine for everything else --

However, batchvision still doesn't link. Regrettably, I don't have time to chase the following down, as I leave for vacation this afternoon--

Undefined                       first referenced
 symbol                             in file
V::VString&Vxa::VSet::getDescription_(V::VString&)const ../lib/libVxa.so
V::VString&Vxa::VType::getDescription_(V::VString&)const ../lib/libVxa.so
ld: fatal: symbol referencing errors. No output written to batchvision
gmake: *** [batchvision] Error 1
MichaelJCaruso commented 6 years ago

Just fixed (956fdbe) the conditional compilation issue (thanks @c-kuhlman).

Superficially the link issue looks related to the changes of 969e803. Don't know if this applies, but when I made that set of changes, I remember needing to do scrubs and rebuilds to get some of the links to work. I just assumed I missed something and moved on.

MichaelJCaruso commented 5 years ago

Converting the undefined symbol issue raised above into issue #50 and merging the apparently unrelated changes associated with this pull request into the mainline.