Opened 7 years ago

Last modified 7 years ago

#55337 new submission

mbuffer @20171011 new Portfile contribution

Reported by: hcardwell Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: mbuffer

Description

New submission for mbuffer. Built and tested on OS X 10.12.6 with MacPorts 2.4.1.

Attachments (4)

highsierrabuild.log (25.7 KB) - added by kencu (Ken) 7 years ago.
mbuffer build log on highsierra
Portfile (935 bytes) - added by hcardwell 7 years ago.
Updated Portfile, back-version to 20141227
patch-configure-gettime.diff (684 bytes) - added by hcardwell 7 years ago.
Diff to remove gettime checks in configure.
patch-mbuffer-darwin.diff (2.5 KB) - added by hcardwell 7 years ago.
Unified diff for mbuffer compilation on OSX.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: hcardwell removed
Keywords: maintainer removed
Version: 2.4.1

Thanks. As reporter, you do not need to Cc yourself.

comment:2 Changed 7 years ago by kencu (Ken)

I tried a quick build on 10.6.8, and it errored out due to:

| #ifdef __cplusplus
| extern "C"
| #endif
| char clock_gettime ();
| int
| main ()
| {
| return clock_gettime ();
|   ;
|   return 0;
| }
configure:4949: /opt/local/bin/clang-mp-3.9 -o conftest -pipe -Os -arch x86_64 -Wno-unused-result -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 conftest.c -lrt  -lpthread  >&5
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I _think_ clock_gettime() showed up in MacOS 10.12.

It appears that for some software, at least, it's possible to use an alternative approach to clock_gettime(), if anyone is interested in exploring that idea. <https://gist.github.com/jbenet/1087739>

comment:3 Changed 7 years ago by kencu (Ken)

Here's another clock_gettime() replacement that looks easier to use

<https://github.com/jordansissel/xdotool/commit/9bc31403b95826d9fd8d6540c459ee862b2ac127>

comment:4 Changed 7 years ago by kencu (Ken)

I tried a build on highsierra as well. It built through to completion, but with this kinda ominous-sounding warning, considering what this software is meant to do:

mbuffer.c:70:2: warning: sendfile is unable to send from buffers [-W#warnings]
#warning sendfile is unable to send from buffers

when I tried to run it, here's what happened:

$ mbuffer
mbuffer: fatal: Error creating semaphore Buf2Dev: Function not implemented

I'll post up the entire build log for you to ponder.

Changed 7 years ago by kencu (Ken)

Attachment: highsierrabuild.log added

mbuffer build log on highsierra

comment:5 Changed 7 years ago by hcardwell

Excellent. Thanks for the feedback. Sounds like I happened to have found the unicorn build environment.

I have a 10.13 box I will work on now. Once I isolate that issue I will work on patches as necessary for older variants to build.

Anyone know if the correct tracking process for me to close this request? Or update it with a new Portfile when I have met with additional successes?

Thanks again for the testing.

comment:6 Changed 7 years ago by hcardwell

I replicated the 10.13 issue. This is quite interesting, and I need to look at my MBP to understand why it built on my 10.12.6 install at all.

OSX does not implement anonymous semaphors and their commensurate functions. As such, a call to sem_init is expected to fail with "not implemented".

Injecting wrappers with fake names is not a big deal, but it'll take a bit to write the patches against mbuffer.c.

It's possible I have some other port installed on my MBP's MacPorts install that is already providing the wrappers.

I shall investigate.

comment:7 Changed 7 years ago by hcardwell

I built patches for 20171011 that address the semaphore issues, but it looks like newer versions (after the author broke out the input functions) continue to be broken.

I am attaching a new Portfile and patches for mbuffer 20141227 that are working for me. Not much original work, as it's others' wrappers for the clock functions with preprocessor conditionals for < Sierra, and the same semaphore wrappers as before. I just simplified the diff and added the version conditionals.

I apologize for the crappy initial submission. I do not have an older OSX install to test on, but I believe I got the logic right. This ticket can be closed and I can re-submit with the correct version number of that is desired. I am sorry I am unfamiliar with the process.

In the interim, I will work on the ports for the more current versions.

Changed 7 years ago by hcardwell

Attachment: Portfile added

Updated Portfile, back-version to 20141227

Changed 7 years ago by hcardwell

Diff to remove gettime checks in configure.

Changed 7 years ago by hcardwell

Attachment: patch-mbuffer-darwin.diff added

Unified diff for mbuffer compilation on OSX.

Note: See TracTickets for help on using tickets.