Discussion:
[MacPorts] #53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
MacPorts
2016-12-15 16:37:29 UTC
Permalink
#53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
------------------------------+-----------------
Reporter: josephsacco | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: leopard, powerpc | Port: zmq
------------------------------+-----------------
The latest version of zmq does not build on a PPC running leopard. The
previous version, 4.1.6_0, builds without incident.

The problem is CLOCK_MONOTONIC is not defined in time.h for OSX 10.5.8[see
snippet of build output below].

-Joseph

src/clock.cpp: In static member function 'static uint64_t
zmq::clock_t::rdtsc()':
src/clock.cpp:243:19: error: 'CLOCK_MONOTONIC' was not declared in this
scope
clock_gettime(CLOCK_MONOTONIC, &ts);
^~~~~~~~~~~~~~~
src/clock.cpp:243:39: error: 'clock_gettime' was not declared in this
scope
clock_gettime(CLOCK_MONOTONIC, &ts);
^

--
Ticket URL: <https://trac.macports.org/ticket/53075>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-15 18:13:05 UTC
Permalink
#53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
--------------------------+------------------------------
Reporter: josephsacco | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: leopard, powerpc
Port: zmq |
--------------------------+------------------------------

Comment (by kencu):

The issue could be here
<https://github.com/zeromq/libzmq/commit/0dfb32a2595e96bd5850987c7cab9a7936e672e8>

this guard block
{{{
#if defined ZMQ_HAVE_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 //
less than macOS 10.12
+ int rc = alt_clock_gettime (CLOCK_MONOTONIC, &tv);
+#else
int rc = clock_gettime (CLOCK_MONOTONIC, &tv);
+#endif
}}}

might not be working correctly for Leopard, because Leopard should not be
seeing that function call, it appears. Why don't you try forcing
`alt_clock_gettime` to be used and see if that fixes it?

for a quick one-off way to do that, port -v configure it, go into the
source, and monkey with that file like so maybe:

{{{
int rc = alt_clock_gettime (CLOCK_MONOTONIC, &tv);
}}}

then try building. If it doesn't work, look for other guards that might
need fiddling with.

--
Ticket URL: <https://trac.macports.org/ticket/53075#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-15 20:15:16 UTC
Permalink
#53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
--------------------------+------------------------------
Reporter: josephsacco | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: leopard, powerpc
Port: zmq |
--------------------------+------------------------------

Comment (by josephsacco):

That was one of the first things I tried... :-) The problem is the macro
CLOCK_MONOTONIC is ''' not defined''' for OS X 10.5.8.

The code for version 4.1.6 does something far more trivial. The method
containing the offending line,

zmq::clock_t::rdsc()[[BR]]

returns 0 under OS X 10.5.8.[[BR]]

I am not sure what that means, or whether it is the right thing to do. If
I make that change, zmq @4.2 builds.

For added amusement I then ran 'make test'. Of the 77 tests that ran,
only 3 passed. The remaining 74 failed [illegal instruction: exit 132]


-Joseph

--
Ticket URL: <https://trac.macports.org/ticket/53075#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-16 12:11:01 UTC
Permalink
#53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
--------------------------+------------------------------
Reporter: josephsacco | Owner: merijn@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: leopard, powerpc
Port: zmq |
--------------------------+------------------------------
Changes (by ryandesign):

* status: new => assigned
* cc: stromnov@… (removed)
* cc: michaelld, stromnov (added)
Post by MacPorts
The latest version of zmq does not build on a PPC running leopard. The
previous version, 4.1.6_0, builds without incident.
The problem is CLOCK_MONOTONIC is not defined in time.h for OSX
10.5.8[see snippet of build output below].
-Joseph
src/clock.cpp: In static member function 'static uint64_t
src/clock.cpp:243:19: error: 'CLOCK_MONOTONIC' was not declared in this
scope
clock_gettime(CLOCK_MONOTONIC, &ts);
^~~~~~~~~~~~~~~
src/clock.cpp:243:39: error: 'clock_gettime' was not declared in this
scope
clock_gettime(CLOCK_MONOTONIC, &ts);
^
New description:

The latest version of zmq does not build on a PPC running leopard. The
previous version, 4.1.6_0, builds without incident.

The problem is CLOCK_MONOTONIC is not defined in time.h for OSX 10.5.8[see
snippet of build output below].

-Joseph

{{{
src/clock.cpp: In static member function 'static uint64_t
zmq::clock_t::rdtsc()':
src/clock.cpp:243:19: error: 'CLOCK_MONOTONIC' was not declared in this
scope
clock_gettime(CLOCK_MONOTONIC, &ts);
^~~~~~~~~~~~~~~
src/clock.cpp:243:39: error: 'clock_gettime' was not declared in this
scope
clock_gettime(CLOCK_MONOTONIC, &ts);
^
}}}

--

--
Ticket URL: <https://trac.macports.org/ticket/53075#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2016-12-16 14:42:30 UTC
Permalink
#53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
--------------------------+-----------------------------
Reporter: josephsacco | Owner: merijn@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: leopard powerpc
Port: zmq |
--------------------------+-----------------------------
Changes (by mf2k):

* keywords: leopard, powerpc => leopard powerpc


--
Ticket URL: <https://trac.macports.org/ticket/53075#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-30 02:43:49 UTC
Permalink
#53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
--------------------------+-----------------------------
Reporter: josephsacco | Owner: merijn
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: leopard powerpc
Port: zmq |
--------------------------+-----------------------------

Comment (by ryandesign):

Is this still a problem? If so, please report it to the developers of zmq
so that they can fix it.
--
Ticket URL: <https://trac.macports.org/ticket/53075#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-30 15:06:44 UTC
Permalink
#53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
--------------------------+-----------------------------
Reporter: josephsacco | Owner: merijn
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: leopard powerpc
Port: zmq |
--------------------------+-----------------------------

Comment (by josephsacco):

Ryan,

zmq @4.3.0_0 builds and installs on a PPC running OS X 10.5.8. A change
was made to the guard block in {{{src/clock.cpp}}}

{{{
#if defined ZMQ_HAVE_OSX
\
&& __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 // less than macOS 10.12
alt_clock_gettime (SYSTEM_CLOCK, &ts);
#else
clock_gettime (CLOCK_MONOTONIC, &ts);
#endif
return static_cast<uint64_t> (ts.tv_sec) * nsecs_per_usec *
usecs_per_sec
+ ts.tv_nsec;
#endif
}}}

The call to {{{alt_clock_gettime()}}} now uses SYSTEM_CLOCK rather than
CLOCK_MONOTONIC.

-Joseph
--
Ticket URL: <https://trac.macports.org/ticket/53075#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-30 22:07:15 UTC
Permalink
#53075: zmq @4.2.0 does not build on a PPC running OS X 10.5.8
--------------------------+-----------------------------
Reporter: josephsacco | Owner: merijn
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: fixed | Keywords: leopard powerpc
Port: zmq |
--------------------------+-----------------------------
Changes (by michaelld):

* status: assigned => closed
* resolution: => fixed


Comment:

I'm going to go ahead and close this ticket as fixed (even if, admittedly,
it wasn't intentional to do so). Thanks for reporting back!
--
Ticket URL: <https://trac.macports.org/ticket/53075#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...