NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
176 stars 95 forks source link

Feature Request: Support building in FreeBSD #1049

Closed pittagurneyi closed 7 months ago

pittagurneyi commented 7 months ago

The following was necessary to successfully build ncpa under FreeBSD:

--- setup.py.orig   2023-11-26 22:54:18.026772000 +0000
+++ setup.py    2023-11-26 22:55:26.687658000 +0000
@@ -52,6 +52,8 @@
         library_dirs = ext.library_dirs or []
         libraries = self.get_libraries(ext)
         extra_args = ext.extra_link_args or []
+        if PLATFORM.startswith('freebsd'):
+            libraries.append('pthread')
         if IS_MINGW or IS_WINDOWS:
             compiler_type = self.compiler.compiler_type
             # support for delay load [windows]

Please patch it in the next version, so we can stop manually doing so in the FreeBSD port.

Thanks!

ne-bbahn commented 7 months ago

Where do you want this change to be made? I'm not familiar with FreeBSD and I can't find the surrounding code snippet anywhere in the repo and I can't find a setup.py file where the above would make sense.

pittagurneyi commented 7 months ago

I have to apologize, it was clearly far too late when I wrote this.

The fix belongs in cx_Freeze, the python build environment required by ncpa, for which I needed to add a port for FreeBSD as well.

Please ignore this and sorry for the time you wasted looking for this!