TFS compilation ---- alas, Taobao's open source is truly a waste of resources. These engineers are all fucking fool!

Source: Internet
Author: User

I am a 64-bit Ubuntu, GCC 4.7, officially speaking of 4.1.2. but I don't know what's going on. I simply didn't install gcc4.1.2 on the machine, so I had to stick my head to GCC 4.7 and continue.

InstallLibuuid-devel,Zlib-devel,Mysql-develThree Development kits.

 

The MySQL-devel library on Ubuntu is named libmysqld-Dev.

Sudo apt-Get install libmysqld-Dev

It took several days to install zlib-Dev. It turns out that the name of the Ubuntu package has changed.

Sudo apt-Get installZlib-Dev changedSudo apt-Get install Zlib1g-Dev

Install libuuid-devel,Apt-Get install e2fsprogs

Install TB-common-utils

Add in/etc/profile

Tblib_root = ****

Export Tblib_root

./Configure -- prefix/home/Zhy/softeware/tfsi

Readline Error
    • Solution: Install apt-Get install libreadline-Dev

 

An error occurred while holding tcmalloc. ?
Configure: Error:In '/Home/Zhy/softeware/tfs ':Configure: Error: tcmalloc link failed (-- without-tcmalloc to disable)

Solution: Because I have 64-bit data, I found that I want to install other things.

Install the libunwind library for the 64-bit operating system. Do not install the 32-bit operating system. The libunwind library is based on 64-bit CPU and Operating SystemProgramProvides the basic stack trigger and undo functions, including the APIs used to output stack traces, APIs used to program the trigger and undo stacks, and APIs that support the C ++ exception handling mechanism.

Apt-Get install libunwind8

Apt-Get install libunwind8-dev I Found Out With cache when I installed it with 8

When I installed Google-perftools, I failed to install it several times. I did not know how to install it. I found several times, so I used the full installation below.

Apt-Get install libgoogle-perftools *

Apt-Get install Google-perftools

Use lsof-N | grep tcmalloc to check whether the installation is successful.

Make ErrorFirst, the first error is the error of conversion of various types. At the same time[-Werror = Conversion].

It is assumed that a warning error occurs during GCC compilation,

Solution: remove the werror option of cflags In the configure. AC and makfile. Am files.

Configure is successfully re-configured.

 UUID. h errors during make:

Failed to install UUID-Dev

Note that the names of different systems are different when you install UUID-Dev. If you use centeros, you need to install Yum install libuuid-devel. Ubuntu users can install apt-Get install UUID-dev directly.

The sessionutil: gene_session_id function in session_util.cpp and session_util.h does not match,

Check that the int32 defined in session_util.h is converted to int.

I don't know why. I guess what was done during GCC compilation, So I removed all the contents of the GCC option cflags In the configure file. Re-configure, then an error was reported: The int32 variable definition cannot be found in session_util.h, but why is session_util.cpp successful?

Solution: In session_util.h (add # include <tbsys. h> # include <stdlib. h>.

 

Make error 'uint64 _ T * {aka long unsigned int *} 'to 'ulofg *{

Find the corresponding file and enhance the conversion of the system type. The error file I reported is src/new_client/tfs_meta_helper.cpp row 281.

Make error atomic_inc parameter type error, uint32_t uint64_t.

Vim src/nameserver/client_request_server.cpp line 725,722, I still use the forced conversion

Ns_define.cpp: 196: 70: Error: no matching function is available for 'atomic _ Inc (uint64_t *) 'calls.

Or force conversion

Error/usr/bin/ld: cannot find-ljemalloc returned when making

Solution: Install apt-Get install libjemalloc-Dev.

Or make,

Undefined reference to 'uuid _ generate'

Undefined reference to 'uuid _ unparse'

 

    • Undefined reference to 'uncompus'
    • Undefined reference to 'uuid _ generate'
    • Undefined reference to 'uuid _ unparse'

Modify makefile in src/tools/nameserver

Line 1 libs =-lmysqlclient-LRT-lpthread-lm-LDL-LC Plus-LZ-luuid

Row 277 mysql_ldflags =-L/usr/lib/i386-linux-gnu-lmysqlclient_r-lpthread-LZ-lm-LRT-LDL plus-luuid

Prompt NO curses. h file

Install sudo apt-Get install libncurses5-dev

 

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.