Kafka C + + client compilation

Source: Internet
Author: User

Kafka is a high-throughput distributed publish-subscribe messaging system that handles all the action flow data in a consumer-scale website. This kind of action (web browsing, search and other user actions) is a key factor in many social functions on modern networks. This data is usually resolved by processing logs and log aggregations due to throughput requirements. This is a viable solution for the same log data and offline analysis system as Hadoop, but requires real-time processing constraints. The purpose of Kafka is to unify online and offline message processing through Hadoop's parallel loading mechanism, and also to provide real-time consumption through the cluster machine.

The following explains the Kafka C + + client compilation link process.

1. The following URLs can be found in the various languages of the client address: https://cwiki.apache.org/confluence/display/KAFKA/Clients#Clients-C/C++

You can find the C + + client address: Https://github.com/edenhill/librdkafka

2. After downloading the extract, execute it in the directory:./configure

3. The error is as follows:

    

############################################################## Configure failed # # # ############################################################## Accumulated failures: #######     ####################################################### __sync_32 (have_atomics_32) module:atomics action:disable Reason:compile Check FAILED:CC:CCFLAGS:GCC-g-o2-fpic-wall-werror _MKLTMP30679.C-o _MKLTMP30679.C.O:/tmp/ccuxfue4.o:in function ' Foo':/HOME/XUMJ/SUPPORT/KAFKA/LIBRDKAFKA-MASTER/_MKLTMP30679.C:4: Undefined reference to ' __sync_add_and_fetch_4'Collect2:ld return1Source: #include<inttypes.h>int32_t foo (int32_t i) {return__sync_add_and_fetch (&i,1);} __sync_64 (have_atomics_64) module:atomics action:disable reason:compile Check FAILED:CC:CCFLAGS:GCC-g-o2-fpic-wall-werror _MKLTMP30720.C-o _MKLTMP30720.C.O:/tmp/ccynhxii.o:in function ' Foo':/HOME/XUMJ/SUPPORT/KAFKA/LIBRDKAFKA-MASTER/_MKLTMP30720.C:4: Undefined reference to ' __sync_add_and_fetch_8'Collect2:ld return1Source: #include<inttypes.h>int64_t foo (int64_t i) {return__sync_add_and_fetch (&i,1);}

Please use the following command to execute:

Cflags= "-o2-march=i686"./configure--cc=gcc--cxx=g++--arch=i686--mbits=32--prefix=/home/test/support/kafka/ Install

4. Execute make

5. Execute make install.

  

Kafka C + + client compilation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.