Opened 6 years ago
Closed 6 years ago
#57822 closed defect (fixed)
cvs-fast-export: 'CLOCK_REALTIME' macro redefined, and different types ('int' vs 'enum clockid_t')
Reported by: | ewenmcneill (Ewen McNeill) | Owned by: | mojca (Mojca Miklavec) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | mojave | Cc: | ewenmcneill (Ewen McNeill) |
Port: | cvs-fast-export |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
After upgrading to macOS 10.14 and following wiki:Migration I found that cvs-fast-export
fails to build:
:info:build ./cvs.h:437:13: error: typedef redefinition with different types ('int' vs 'enum clockid_t')
:info:build ./cvs.h:439:9: warning: 'CLOCK_REALTIME' macro redefined [-Wmacro-redefined]
This appears to be the same error as ticket:52388 (for macOS 10.12), fixed with a patch about 18 months ago, on the advice of upstream.
However it appears this patch has been removed again (in two steps, commented out, then removed as unused). Which seems to leave the same build errors as before, since cvs.h
now unconditionally redefines CLOCK_REALTIME
, etc, on all Apple platforms again. Possibly it was removed due to upstream including the patch upstream, but MacPorts hasn't updated to newer upstream? Either way it does not build for me today.
Perhaps the patch from ticket:52388 could be restored? Or maybe there's a newer upstream version to package that includes this fix?
Ewen
ewen@ashram:~/Desktop/macports$ uname -a Darwin ashram 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64 ewen@ashram:~/Desktop/macports$ sudo port install cvs-fast-export Password: ---> Computing dependencies for cvs-fast-export ---> Building cvs-fast-export Error: Failed to build cvs-fast-export: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cvs-fast-export/cvs-fast-export/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port cvs-fast-export failed ewen@ashram:~/Desktop/macports$ port info --maintainer cvs-fast-export maintainer: mojca@macports.org mojca, openmaintainer ewen@ashram:~/Desktop/macports$
ewen@ashram:/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cvs-fast-export/cvs-fast-export/work/cvs-fast-export-1.43$ grep -A 5 "if defined(__APPLE" cvs.h #if defined(__APPLE__) /* we mock this in utils.c; the CLOCK_REALTIME value is not used */ typedef int clockid_t; int clock_gettime(clockid_t clock_id, struct timespec *tp); #define CLOCK_REALTIME 0 #endif ewen@ashram:/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cvs-fast-export/cvs-fast-export/work/cvs-fast-export-1.43$
Attachments (1)
Change History (6)
Changed 6 years ago by ewenmcneill (Ewen McNeill)
comment:1 Changed 6 years ago by ewenmcneill (Ewen McNeill)
Cc: | ewenmcneill added |
---|
comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | mojca@… removed |
---|---|
Description: | modified (diff) |
Keywords: | mojave added; cvs-fast-export CLOCK_REALTIME clockid_t removed |
Owner: | set to mojca |
Status: | new → assigned |
Summary: | cvs-fast-export: error on 10.14.2: 'CLOCK_REALTIME' macro redefined, and different types ('int' vs 'enum clockid_t') → cvs-fast-export: 'CLOCK_REALTIME' macro redefined, and different types ('int' vs 'enum clockid_t') |
comment:3 Changed 6 years ago by mojca (Mojca Miklavec)
Thanks a lot for the report. Can you please check if https://github.com/macports/macports-ports/pull/3294 solves your problem?
My guess is that the removal of the patch was more or less accidental as part of mass-edits when adding support for newer functionality (like CLOCK_REALTIME
) to legacy systems. According to my understanding this patch was doing the reverse of what the portgroup did, but I hope that someone will double-check. (I didn't upgrade to 10.14 yet to be able to quickly verify whether it really works, but I hope it does.)
comment:4 Changed 6 years ago by ewenmcneill (Ewen McNeill)
Yes, it looks with that pull request patch manually applied it will now build and install on 10.14.2.
ewen@ashram:~$ uname -a Darwin ashram 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64 ewen@ashram:~$ port installed cvs-fast-export The following ports are currently installed: cvs-fast-export @1.44_0 (active) ewen@ashram:~$ cvs-fast-export --version cvs-fast-export: version 1.44 ewen@ashram:~$
My understanding of the patch applied in ticket:52388 was that it was preventing the definition of "placeholder" CLOCK_REALTIME
, etc, values, which was a work around needed on systems that did not have them to allow the build to succeed (but obviously not have "realtime" functionality; presumably lower granularity timing). But macOS somewhere around 10.12 added CLOCK_REALTIME
, etc, into the system includes. Hence the patch to only define the placeholders on systems without them defined already.
FWIW, I suspect this (patched by https://github.com/macports/macports-ports/pull/3294) version will probably be needed on 10.12, 10.13, and 10.14. (I went straight from 10.11 to 10.14 on this system, and have nothing not on 10.11 or 10.14 here now, so I can't test 10.12/10.13.)
Upgrading to 1.44 seems to be sufficient, and presumably merged in upstream the patch that upstream came up with 18 months ago.
Ewen
PS: FTR, what I did to build this pull request:
- Download pull request as a unified diff from https://patch-diff.githubusercontent.com/raw/macports/macports-ports/pull/3294.diff
- Manually apply patch, and then build again:
ewen@ashram:~$ cd $(port dir cvs-fast-export) ewen@ashram:/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/cvs-fast-export$ ls Portfile files work ewen@ashram:/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/cvs-fast-export$ grep version Portfile version 1.43 ewen@ashram:/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/cvs-fast-export$ sudo patch -p3 <~/Desktop/cvs-fast-export.patch Password: patching file Portfile patching file files/patch-Makefile.diff ewen@ashram:/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/cvs-fast-export$ grep version Portfile version 1.44 ewen@ashram:/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/cvs-fast-export$ cd ewen@ashram:~$ sudo port install cvs-fast-export Portfile changed since last build; discarding previous state. ---> Computing dependencies for cvs-fast-export ---> Fetching archive for cvs-fast-export ---> Attempting to fetch cvs-fast-export-1.44_0.darwin_18.x86_64.tbz2 from https://packages.macports.org/cvs-fast-export ---> Attempting to fetch cvs-fast-export-1.44_0.darwin_18.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/cvs-fast-export ---> Attempting to fetch cvs-fast-export-1.44_0.darwin_18.x86_64.tbz2 from http://kmq.jp.packages.macports.org/cvs-fast-export ---> Fetching distfiles for cvs-fast-export ---> Attempting to fetch cvs-fast-export-1.44.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/distfiles/cvs-fast-export ---> Attempting to fetch cvs-fast-export-1.44.tar.gz from https://distfiles.macports.org/cvs-fast-export ---> Attempting to fetch cvs-fast-export-1.44.tar.gz from http://sea.us.distfiles.macports.org/macports/distfiles/cvs-fast-export ---> Attempting to fetch cvs-fast-export-1.44.tar.gz from http://kmq.jp.distfiles.macports.org/cvs-fast-export ---> Attempting to fetch cvs-fast-export-1.44.tar.gz from http://www.catb.org/~esr/cvs-fast-export/ ---> Verifying checksums for cvs-fast-export ---> Extracting cvs-fast-export ---> Applying patches to cvs-fast-export ---> Configuring cvs-fast-export ---> Building cvs-fast-export ---> Staging cvs-fast-export into destroot ---> Installing cvs-fast-export @1.44_0 ---> Activating cvs-fast-export @1.44_0 ---> Cleaning cvs-fast-export ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found. ewen@ashram:~$
comment:5 Changed 6 years ago by mojca (Mojca Miklavec)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
cvs-fast-export/main.log from macOS 10.14 build attempt