From user-return-12826-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Mon Jun 8 08:59:22 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 78B86180647 for ; Mon, 8 Jun 2020 10:59:22 +0200 (CEST) Received: (qmail 68267 invoked by uid 500); 8 Jun 2020 08:59:21 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 68255 invoked by uid 99); 8 Jun 2020 08:59:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2020 08:59:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 45DF91A417A for ; Mon, 8 Jun 2020 08:59:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Aq-bHLguknI2 for ; Mon, 8 Jun 2020 08:59:18 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::535; helo=mail-ed1-x535.google.com; envelope-from=szalay.beko.mate@gmail.com; receiver= Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id E60FB7F567 for ; Mon, 8 Jun 2020 08:59:17 +0000 (UTC) Received: by mail-ed1-x535.google.com with SMTP id q13so12770635edi.3 for ; Mon, 08 Jun 2020 01:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=3aZPkLjkJ5eJaB7zjCQiGv05CEvANZMDHlmzC9Yi+Cs=; b=LSU43sNU5M1Y1cGhjJoONCdROZ1jYMKDTVDjr5gaopDIOuUaAviO8CvOc/Psc5fnNj 6sjQejBm94TJOY7XMuJ0LDEiRWswCzYFkybLDGypzR4xM3vxit3f+R0k+NRW8bzbO4XM iK+gSPjVJ3WgrYEeeVaxdhQcxag/vqw7A0YCLuod+PpSNdPpv1v6Lb89D+DVqJDLlxZW kiUx9G+rbccNjzZLKp6Crpp3HuEhlUdDgLKhSMW0wTqXHK04XR2CzPcadzN6SnNYUIQJ pVZE/jkvm+8wW1z7syXRwaq1X306A4+8VEIo3VcK0ySO+NPFNt/Ss71UD6VULzXnBllC +Bpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3aZPkLjkJ5eJaB7zjCQiGv05CEvANZMDHlmzC9Yi+Cs=; b=MUbfXrhzzNxwVub+HU/DfIgQHwQ95kH6Cmqg1qVhDusY/MD/CJaXV7nw2LPtVtW00t Bu+6q9/6ayeZMBw2gD0vhtfOskINQHKKZo0NRz9Ebn6e93Mq3XuM2V07JYTg2v6pOxTX JpGbLbny6XiO8DvDm7e9U7ohj4c9ldQkzmOxT3NG60ZOzYWDkvc2nkAdjgnrMHJUX+sv fiHqOLa2P47vaGN1sHJ9tHE22z3y+X9nwf54Vta5BK3Jw7Z9p6WVvl672W3SeDdQKQwt QsabncrO1SlaMhMnig+g328W58oD9kBox97bdbLXxa2g+HQtqUYus0HU670NQdx8R7O+ zDmg== X-Gm-Message-State: AOAM531mbsTo52fqibNZlwAWVgTKmj8f1X1XLqbRqLIUG7mfVvUXH50d vQ7QhjGXa0sA/nnN8q4XIpT4UHUzAqSuKrWEcGTxwHD64w== X-Google-Smtp-Source: ABdhPJxZUKZFsvgeYRuoK1IHxw5L0qkfDY6WBd7Uv/tb7qtL33NrHn+h4Y9waT5PT0w1i9VK0HsFzIQJnxm4zw9fczc= X-Received: by 2002:aa7:d5c7:: with SMTP id d7mr21380083eds.11.1591606756862; Mon, 08 Jun 2020 01:59:16 -0700 (PDT) MIME-Version: 1.0 References: <667B69D3-80F1-4900-BDB9-3F4191608C3C@juniper.net> In-Reply-To: <667B69D3-80F1-4900-BDB9-3F4191608C3C@juniper.net> From: =?UTF-8?B?U3phbGF5LUJla8WRIE3DoXTDqQ==?= Date: Mon, 8 Jun 2020 10:59:05 +0200 Message-ID: Subject: Re: How to use -DTHREADED compile option while compiling To: UserZooKeeper Content-Type: multipart/alternative; boundary="0000000000005d703c05a78ed367" --0000000000005d703c05a78ed367 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Pankaj, ZooKeeper C client provides two different APIs, a sync (multithreaded) and an async (single threaded). If you want to use the sync API (multi threaded) then make sure to link your application code against the zookeeper_mt library. When compiling the ZooKeeper C client code, you can set if you want to also build the zookeeper_mt library. Depending on your preferred build tool: - cmake: use the -DTHREADED cmake option to enable sync API build - make: use the "./configure --without-syncapi" to disable the sync API build normally I just use "mvn clean install -DskipTests -Pfull-build" command to build both the java and C code, which will build both the sync and async zookeeper libraries. This readme file should help, although I am not 100% sure it is totally up-to-date :) https://github.com/apache/zookeeper/tree/master/zookeeper-client/zookeeper-= client-c Kind regards, Mate On Fri, Jun 5, 2020 at 6:04 PM Pankaj Kumar wrote: > Hi, > I was making libzookeeper and libzookeeper-devel for latest zookeeper > release 3.6.1. > In our software we are making some api calls, however some api calls are > giving error:- > > > error: =E2=80=98zoo_create=E2=80=99 was not declared in this scope > > path_buffer_len); > > ^ > > error: =E2=80=98zoo_delete=E2=80=99 was not declared in this scope > > return zoo_delete(zh, path, version); > > > > error: =E2=80=98zoo_get=E2=80=99 was not declared in this scope > > return zoo_get(zh, path, watch, buffer, buffer_len, stat); > > ^ > > error: =E2=80=98zoo_exists=E2=80=99 was not declared in this scope > > > > > > Then after looking into latest library code and found that these calls ar= e > defined under #define THREADED > And for this thing to work I have to compile zookeeper C client with > -DTHREADED option. > > What I want to ask that How can I enable this compile -DTHREADED option. = I > have tried this with =E2=80=9Cmake=E2=80=9D command and =E2=80=9C./config= ure=E2=80=9D command, but couldn=E2=80=99t > proceed further. > > Can someone please help me on how to use DTHREADED option? > > Thanks, > Pankaj > > > Juniper Business Use Only > --0000000000005d703c05a78ed367--