[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13791232#comment-13791232
 ] 

Germán Blanco commented on ZOOKEEPER-1742:
------------------------------------------

I think I could fix the "ld -wrap" option issue in Mac OSX. There is a proposal 
here:
https://discussions.apple.com/thread/617779?start=0&tstart=0
I have already tried this in Utils.h, and it works for external functions 
(those that are not defined in the zookeeper library):
{noformat}
#define DECLARE_WRAPPER(ret,sym,sig) \
    typedef ret (*fptr_##sym) sig; extern "C" ret sym sig
#define CALL_REAL(sym,params) \
    (*((fptr_##sym)dlsym(RTLD_NEXT, "sym"))) params
{noformat}
For the functions in the zookeeper library that are wrapped, the easiest 
solution for me would be to use a different version of the zookeeper library 
for the tests, changing the name of these functions.

> "make check" doesn't work on macos
> ----------------------------------
>
>                 Key: ZOOKEEPER-1742
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1742
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Flavio Junqueira
>            Assignee: Benjamin Reed
>             Fix For: 3.4.6, 3.5.0
>
>
> There are two problems I have spotted when running "make check" with the C 
> client. First, it complains that the sleep call is not defined in two test 
> files: tests/ZooKeeperQuorumServer.cc and tests/TestReconfigServer.cc. 
> Including unistd.h works. The second problem is with linker options. It 
> complains that "--wrap" is not a valid. I'm not sure how to deal with this 
> one yet, since I'm not sure why we are using it.  



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to