{"action":"created","issue":{"url":"https://api.github.com/repos/percival-detector/framereceiver/issues/13","labels_url":"https://api.github.com/repos/percival-detector/framereceiver/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/percival-detector/framereceiver/issues/13/comments","events_url":"https://api.github.com/repos/percival-detector/framereceiver/issues/13/events","html_url":"https://github.com/percival-detector/framereceiver/pull/13","id":113103711,"number":13,"title":"Making frameReceiver build on Mac OSX","user":{"login":"ulrikpedersen","id":6115544,"avatar_url":"https://avatars.githubusercontent.com/u/6115544?v=3","gravatar_id":"","url":"https://api.github.com/users/ulrikpedersen","html_url":"https://github.com/ulrikpedersen","followers_url":"https://api.github.com/users/ulrikpedersen/followers","following_url":"https://api.github.com/users/ulrikpedersen/following{/other_user}","gists_url":"https://api.github.com/users/ulrikpedersen/gists{/gist_id}","starred_url":"https://api.github.com/users/ulrikpedersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulrikpedersen/subscriptions","organizations_url":"https://api.github.com/users/ulrikpedersen/orgs","repos_url":"https://api.github.com/users/ulrikpedersen/repos","events_url":"https://api.github.com/users/ulrikpedersen/events{/privacy}","received_events_url":"https://api.github.com/users/ulrikpedersen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/percival-detector/framereceiver/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-23T21:29:56Z","updated_at":"2015-10-26T14:21:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/percival-detector/framereceiver/pulls/13","html_url":"https://github.com/percival-detector/framereceiver/pull/13","diff_url":"https://github.com/percival-detector/framereceiver/pull/13.diff","patch_url":"https://github.com/percival-detector/framereceiver/pull/13.patch"},"body":"Mostly just because we can - it has no real usage in the real world - but it's nice to work natively on my laptop during development :smiley: \r\n\r\nOnly two minor changes were required to make it build:\r\n\r\n* Adding a Linux/Mac compatible gettime function.\r\n* Linking librt only on Linux.\r\n\r\nHowever, the unittest fail in \"CreateAndPingRxThread\" with a few unpredictable errors:\r\n\r\n    [ulrik@macpro build]$ ./bin/frameReceiverTest --log_level=all -- run_test=FrameReceiverRxThreadUnitTest\r\n    Running 1 test case...\r\n    Entering test suite \"FrameReceiverUnitTests\"\r\n    Entering test suite \"FrameReceiverRxThreadUnitTest\"\r\n    Entering test case \"CreateAndPingRxThread\"\r\n    Setup test fixture\r\n    Tear down test fixture\r\n    Bus error: 10\r\n    [ulrik@macpro build]$ \r\n    [ulrik@macpro build]$ ./bin/frameReceiverTest --log_level=all --run_test=FrameReceiverRxThreadUnitTest\r\n    Running 1 test case...\r\n    Entering test suite \"FrameReceiverUnitTests\"\r\n    Entering test suite \"FrameReceiverRxThreadUnitTest\"\r\n    Entering test case \"CreateAndPingRxThread\"\r\n    Setup test fixture\r\n    Tear down test fixture\r\n    unknown location:0: fatal error in \"CreateAndPingRxThread\": std::exception: RX channel failed to set receive socket buffer size for port 8989 : No buffer space available\r\n    Leaving test case \"CreateAndPingRxThread\"; testing time: 1730mks\r\n    Leaving test suite \"FrameReceiverRxThreadUnitTest\"\r\n    Leaving test suite \"FrameReceiverUnitTests\"\r\n    \r\n    *** 1 failure detected in test suite \"FrameReceiverUnitTests\"\r\n    Segmentation fault: 11\r\n    [ulrik@macpro build]$ \r\n    [ulrik@macpro build]$ ./bin/frameReceiverTest --log_level=all --run_test=FrameReceiverRxThreadUnitTest\r\n    Running 1 test case...\r\n    Entering test suite \"FrameReceiverUnitTests\"\r\n    Entering test suite \"FrameReceiverRxThreadUnitTest\"\r\n    Entering test case \"CreateAndPingRxThread\"\r\n    Setup test fixture\r\n    Tear down test fixture\r\n    Segmentation fault: 11\r\n\r\n\r\nLow and behold the frameReceiver application also segfaults with a similar error:\r\n\r\n    [ulrik@macpro build]$ ./bin/frameReceiver -c test_config/fr_test.config -d 2 \r\n    0 [0x7fff76698300] DEBUG FrameReceiver null - Debug level set to  2\r\n    0 [0x7fff76698300] DEBUG FrameReceiver null - Parsing configuration file test_config/fr_test.config\r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - log4cxx config file is set to ../config/log4cxx.config\r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - Setting frame buffer maximum memory size to 840000000\r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - Setting sensor type to percivalemulator (0)\r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - Setting RX port(s) to 8000 8001 \r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - Setting RX interface address to 0.0.0.0\r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - Setting shared frame buffer name to FrameReceiverBuffer\r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - Setting incomplete frame timeout to 1000\r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - Setting number of frames to receive to 0\r\n    2015-10-23 22:20:56,030 DEBUG FrameReceiver - Packet diagnostic logging is enabled\r\n    2015-10-23 22:20:56,030 INFO  FrameReceiver - Running frame receiver\r\n    2015-10-23 22:20:56,030 INFO  FrameReceiver - Created PERCIVAL emulator frame decoder instance\r\n    2015-10-23 22:20:56,040 DEBUG FrameReceiver - Initialised frame buffer manager of total size 840000000 with 100 buffers\r\n    2015-10-23 22:20:56,040 DEBUG FrameReceiver - Running RX thread service\r\n    2015-10-23 22:20:56,041 DEBUG FrameReceiver - RX thread receive buffer size for port 8000 is 196724\r\n    2015-10-23 22:20:56,041 ERROR FrameReceiver - Frame receiver run failed: RX channel failed to set receive socket buffer size for port 8000 : No buffer space available\r\n\r\nI have not yet tracked down where this goes wrong so maybe this PR is not quite ready for merging :smile: "},"comment":{"url":"https://api.github.com/repos/percival-detector/framereceiver/issues/comments/151153018","html_url":"https://github.com/percival-detector/framereceiver/pull/13#issuecomment-151153018","issue_url":"https://api.github.com/repos/percival-detector/framereceiver/issues/13","id":151153018,"user":{"login":"ulrikpedersen","id":6115544,"avatar_url":"https://avatars.githubusercontent.com/u/6115544?v=3","gravatar_id":"","url":"https://api.github.com/users/ulrikpedersen","html_url":"https://github.com/ulrikpedersen","followers_url":"https://api.github.com/users/ulrikpedersen/followers","following_url":"https://api.github.com/users/ulrikpedersen/following{/other_user}","gists_url":"https://api.github.com/users/ulrikpedersen/gists{/gist_id}","starred_url":"https://api.github.com/users/ulrikpedersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulrikpedersen/subscriptions","organizations_url":"https://api.github.com/users/ulrikpedersen/orgs","repos_url":"https://api.github.com/users/ulrikpedersen/repos","events_url":"https://api.github.com/users/ulrikpedersen/events{/privacy}","received_events_url":"https://api.github.com/users/ulrikpedersen/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T14:21:40Z","updated_at":"2015-10-26T14:21:40Z","body":"> What's the best workflow for adding changes to the pull request? Merge/close the pull request then commit the subsequent mods?\r\n\r\nYes, as the changes are on my fork you can't add to them. You can either merge this PR - or close it and create a new branch based on my fork. I could have (and normally would have) created a feature branch right here - but didn't because I was just playing around and not sure if it was going anywhere. I don't really mind which way you go..."}}