[MacPorts] #56196: fluxbox @1.3.7_1 does not compile on macOS High Sierra, Version 10.13.4, because it clock_gettime() and uses a pointer instead an int
MacPorts
noreply at macports.org
Sat Mar 31 12:18:15 UTC 2018
#56196: fluxbox @1.3.7_1 does not compile on macOS High Sierra, Version 10.13.4,
because it clock_gettime() and uses a pointer instead an int
------------------------+---------------------
Reporter: ballapete | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.4.2
Keywords: highsierra | Port: fluxbox
------------------------+---------------------
First bug:
{{{
/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I/opt/local/include/freetype2
-I/opt/local/include/fribidi -I/opt/local/include/glib-2.0
-I/opt/local/lib/glib-2.0/include\
-include ./config.h -I./src -I./src -I./nls -I/opt/local/include -pipe
-Os -stdlib=libc++ -arch x86_64 -MT src/FbTk/libFbTk_a-FbWindow.o -MD -MP
-MF src/FbTk/\
.deps/libFbTk_a-FbWindow.Tpo -c -o src/FbTk/libFbTk_a-FbWindow.o `test -f
'src/FbTk/FbWindow.cc' || echo './'`src/FbTk/FbWindow.cc
src/FbTk/FbTime.cc:64:10: error: redefinition of '_mono'
uint64_t _mono() {
^
src/FbTk/FbTime.cc:33:10: note: previous definition is here
uint64_t _mono() {
^
1 error generated.
}}}
The cause it that configure finds `clock_gettime()` works correctly and
therefore sets `HAVE_CLOCK_GETTIME`. This can be corrected with this
patch, `HighSierra-src_FbTK_FbTime.cc-clock_gettime.patch`:
{{{
--- src/FbTk/FbTime.cc~ 2015-02-08 11:44:45.000000000 +0100
+++ src/FbTk/FbTime.cc 2018-03-31 13:18:34.000000000 +0200
@@ -25,7 +25,7 @@
#include <sys/time.h>
-#ifdef HAVE_CLOCK_GETTIME // linux|*bsd|solaris
+#if defined HAVE_CLOCK_GETTIME &&
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300 //
linux|*bsd|solaris
#include <time.h>
namespace {
}}}
Second failure is this:
{{{
/usr/bin/clang++ -DHAVE_CONFIG_H -I. -include ./config.h -I./src/FbTk
-I/opt/local/include -pipe -Os -stdlib=libc++ -arch x86_64 -MT util
/fluxbox_remote-fluxb\
ox-remote.o -MD -MP -MF util/.deps/fluxbox_remote-fluxbox-remote.Tpo -c -o
util/fluxbox_remote-fluxbox-remote.o `test -f 'util/fluxbox-remote.cc' ||
echo './'`ut\
il/fluxbox-remote.cc
util/fluxbox-remote.cc:76:32: error: ordered comparison between pointer
and zero ('unsigned char *' and 'int')
&& text_prop.value > 0
~~~~~~~~~~~~~~~ ^ ~
}}}
` text_prop.value` is the value member in this struct:
{{{
typedef struct {
unsigned char *value;
Atom encoding;
int format;
unsigned long nitems;
} XTextProperty;
}}}
A possible patch,`HighSierra-util_fluxbox-remote.cc-nullptr.patch`, is:
{{{
--- util/fluxbox-remote.cc~ 2015-02-08 11:44:45.000000000 +0100
+++ util/fluxbox-remote.cc 2018-03-31 13:56:09.000000000 +0200
@@ -73,7 +73,7 @@
if (strcmp(cmd, "result") == 0) {
XTextProperty text_prop;
if (XGetTextProperty(disp, root, &text_prop, atom_result) != 0
- && text_prop.value > 0
+ && text_prop.value != nullptr
&& text_prop.nitems > 0) {
printf("%s", text_prop.value);
}}}
--
Ticket URL: <https://trac.macports.org/ticket/56196>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list