Opened 14 months ago
Last modified 14 months ago
#68213 new defect
zmq: error: unknown type name 'clockid_t'; did you mean 'clock_id_t'
Reported by: | Schamschula (Marius Schamschula) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | zmq |
Description
After revision bumping zmq* I fond the following error for El Capitan (10.11) and below:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_zmq/zmq-devel/work/libzmq-8c725093ac4b44a97e6cb64566989ef12b71986c/src/clock.cpp In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_zmq/zmq-devel/work/libzmq-8c725093ac4b44a97e6cb64566989ef12b71986c/src/clock.cpp:31: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_zmq/zmq-devel/work/libzmq-8c725093ac4b44a97e6cb64566989ef12b71986c/src/clock.hpp:48: /opt/local/include/LegacySupport/time.h:83:27: error: unknown type name 'clockid_t'; did you mean 'clock_id_t'? extern int clock_gettime( clockid_t clk_id, struct timespec *ts ); ^ /usr/include/mach/clock_types.h:53:13: note: 'clock_id_t' declared here typedef int clock_id_t; /* clock identification type */ ^
Updating legacysupport to version 1.1 did not fix it, although there is additional clock support.
It looks similar to an issue Ryan ran into with php
, that was fixed upstream: https://github.com/swoole/swoole-src/pull/1365/files
Change History (5)
comment:1 Changed 14 months ago by barracuda156
comment:2 Changed 14 months ago by barracuda156
Replying to Schamschula:
BTW, have you reported it to zmq
upstream? This looks like a genuine bug that has to be fixed.
UPD. Well, I am not sure in fact. The error refers to our legacysupport
include.
comment:3 Changed 14 months ago by barracuda156
- S. Anyway, let me update the -devel port and fix the bug along.
comment:4 Changed 14 months ago by barracuda156
Got the same error now with R-webfakes
:
/opt/local/bin/gcc-mp-12 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -DNO_CGI -DNO_FILES -DARCH_IS_BIG_ENDIAN=1 -fPIC -pipe -Os -arch ppc -c civetweb.c -o civetweb.o In file included from /usr/include/sys/time.h:197, from /opt/local/include/LegacySupport/sys/time.h:25, from civetweb.c:371: /opt/local/include/LegacySupport/time.h:83:27: error: unknown type name 'clockid_t'; did you mean 'clock_id_t'? 83 | extern int clock_gettime( clockid_t clk_id, struct timespec *ts ); | ^~~~~~~~~ | clock_id_t /opt/local/include/LegacySupport/time.h:84:27: error: unknown type name 'clockid_t'; did you mean 'clock_id_t'? 84 | extern int clock_getres ( clockid_t clk_id, struct timespec *ts ); | ^~~~~~~~~ | clock_id_t make: *** [civetweb.o] Error 1 ERROR: compilation failed for package ‘webfakes’
So looks like this is legacy-support
fault, not zmq
(even though zmq
seems to have an unnecessary/harmful chunk of code which triggers the error).
comment:5 Changed 14 months ago by kencu (Ken)
zmq has their own clock_gettime() implementation to use if none is available… nothing wrong with that.
why is legacy_support using clockid_t instead of clock_id_t ? Something to look into there…which is right? Are both used in code in different projects? Why? Do we need to define both?
Chris wrote this legacysupport clock stuff, so he probably knows.
Same on 10.6.8 Rosetta.