Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52546 closed defect (fixed)

ctorrent does not build on macOS Sierra

Reported by: vb@… Owned by: rene@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: larryv (Lawrence Velázquez)
Port: ctorrent

Description (last modified by larryv (Lawrence Velázquez))

:info:build In file included from compat.c:11:
:info:build ./compat.h:23:13: error: typedef redefinition with different types ('int' vs 'enum clockid_t')
:info:build typedef int clockid_t;
:info:build             ^
:info:build /usr/include/time.h:171:3: note: previous definition is here
:info:build } clockid_t;
:info:build   ^
:info:build 1 error generated.

Attachments (2)

main.log (31.0 KB) - added by vb@… 4 years ago.
ctorrent-sierra-fix.diff (615 bytes) - added by ken-cunningham-webuse 4 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 4 years ago by larryv (Lawrence Velázquez)

Description: modified (diff)
Owner: changed from macports-tickets@… to rene@…

Please run sudo port clean ctorrent, try building again, and attach the full main.log to this ticket.

Changed 4 years ago by vb@…

Attachment: main.log added

comment:2 Changed 4 years ago by ken-cunningham-webuse

something not working right in the configuration on Sierra. The uploaded patch fixes the symptom and allows the build, but does not debug why it's occurring.

The following ports are currently installed:
  ctorrent @3.3.2_2 (active) platform='darwin 16' archs='x86_64'
$ ctorrent
Enhanced CTorrent dnh3.3.2   Original code Copyright: YuHong(992126018601033)
WARNING: THERE IS NO WARRANTY FOR CTorrent. USE AT YOUR OWN RISK!!!

General Options:
-h/-H           Show this message
-x              Decode metainfo (torrent) file only, don't download
-c              Check pieces only, don't download
-v              Verbose output (for debugging)
Last edited 4 years ago by ken-cunningham-webuse (previous) (diff)

Changed 4 years ago by ken-cunningham-webuse

Attachment: ctorrent-sierra-fix.diff added

comment:3 Changed 4 years ago by larryv (Lawrence Velázquez)

This should be fixed with a patch, not a reinplace.

comment:4 in reply to:  3 ; Changed 4 years ago by ken-cunningham-webuse

Replying to larryv@…:

This should be fixed with a patch, not a reinplace.

I like reinplaces for these two-character changes -- way faster to do and test. Why would you like this to be a patch?

comment:5 in reply to:  4 Changed 4 years ago by larryv (Lawrence Velázquez)

Patches are more explicit, provide context, are less likely to break in the future, and allow adding explanatory metadata.

The fix is subpar, in any case. The correct fix is to improve the preprocessor condition so that building on Sierra does not trigger the typedef.

comment:6 Changed 4 years ago by ken-cunningham-webuse

I'll learn from what you come up with.

comment:7 in reply to:  6 Changed 4 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added

I can’t promise anything, but I’ll try to take a look within the next couple of days.

comment:8 Changed 4 years ago by ken-cunningham-webuse

I suppose it comes down to a question of how much effort it is worth.

This is a small port. It's broken for anyone who uses this app and has upgraded to sierra. They are frustrated.

The two character fix I made works perfectly. Anything fancier for a fix will not make it work any better. Done. If you want to comment it further, it's easy enough to do. The fix references this ticket, which is all the commenting I would ever need.

The clean and proper fix upstream may come someday -- or it may never come -- but in the meantime, why spend another second on this fixed port? There is _way_ too much other stuff to be done to fuss another moment on this. For me anyway.

But that's my way -- I'm extremely practical. I don't have any interest (really) in fixing the configure logic for the ctorrent application -- upstream can do that.

comment:9 in reply to:  8 Changed 4 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: newclosed

Please look at this from a broader perspective. We wish to encourage habits that improve maintainability across the project. One of those habits is to prefer patches over install-time substitutions, except where absolutely necessary.

I just fixed this in a robust way in r154030; one would be hard-pressed to call it “fancy”. It did not take very much time and is easy to translate into a concrete fix for upstream to consider. You might argue that it was only simple because I have been doing this for a while, but it would not have been simple had I decided that I wasn’t ever going to bother digging into configure scripts and wading through autoconf to understand how it works. Taking time up front to learn the build systems pays dividends down the road.

comment:10 Changed 4 years ago by ken-cunningham-webuse

accepted. please accept my apologies. only human. --K

Note: See TracTickets for help on using tickets.