KJ7LNW / xnec2c

Xnec2c is a high-performance multi-threaded electromagnetic simulation package to model antenna near- and far-field radiation patterns for Linux and UNIX operating systems.
https://www.xnec2c.org/
GNU General Public License v3.0
77 stars 16 forks source link

Compilation cleanup #33

Closed charlieb closed 1 year ago

charlieb commented 1 year ago

Removed cglm directory. The configure of the submodule didn't work so I just installed the system package for clgm and everything worked ok.

Kept getting type mismatches between the glib and local version of g_idle_add_once from glib version. The local version adds thread safety so I added a _ts suffix to all the uses of that function.

KJ7LNW commented 1 year ago

Hi Charlie, thanks for looking into this.

The opengl branch is a bit behind the master branch, so you might consider rebasing opengl atop of master in case there are other conflicts.

In this particular case, there is a commit that fixes g_idle_add_once (c1d743032f4cfbc11cab50254654b00cc31a501c) for GLIB>=2.74 in master:

Added support for GLIB v2.74

Last year g_idle_add_once() was implemented in xnec2c, and a year later the
Gnome team added that very function:
  https://thisweek.gnome.org/posts/2022/05/twig-45/

They may be implemented differently, but the only real difference between the
two versions in terms of functionality is the return value. This patch adds a
few #ifdef's that needed to deal with the change and fixes return values from
the xnec2c implementation of g_idle_add_once.

Thanks to the Debian maintainer Christoph Berg, DF7CB, for his initial work on
this! (f57e3b)

For systems that support it (>=2.74), we should use the official GLIB version in case the glib people change their internals; for older systems (<2.74), xnec2c provides a work-around compatibility function with the same exact calling convention.

KJ7LNW commented 1 year ago

I'm closing this PR for now.

If you rebase opengl on master then re-open this PR and I'll put it up.