Clang compiling mysql (Ubuntu10 64-bit)

Source: Internet
Author: User

Compile and install mysql (Ubuntu10 64-bit) http://www.cnblogs.com/2018/p/3482259.html this introduction gcc form compile and install mysql

Then we use clang to compile and check the specific effect.

Compile and install

After testing, we can solve the following problems:

V ABI_CHECK

N. This problem occurs after the configuration is complete.

V Clang

N or

Export CXX = clang ++

Export CC = clang

I first looked at it.

Clang vs calng ++

Http://stackoverflow.com/questions/14226840/c-11-threads-with-clang

 

You can compile and install the above process. The specific script is as follows:

If [-d mysql-5.6.15]; then

Echo "mysql

Else

Tar xzf mysql-5.6.15.tar.gz

Fi

# Cmake/abi_check.cmake ABI

# LINE30 SET (RUN_ABI_CHECK 0)

Cp-f abi_check.cmake mysql-5.6.15/cmake/abi_check.cmake

 

Mkdir-p build

Pushd build

 

If [-f CMakeCache.txt]; then

Make clean

Rm-f CMakeCache.txt

Fi

#

Export CXX = clang ++

Export CC = clang

 

#

 

Cmake ../mysql-5.6.15 \

-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \

-DCMAKE_BUILD_TYPE = Release \

-DSYSCONFDIR =/etc \

-DINSTALL_SBINDIR =/usr/local/mysql/bin \

-DMYSQL_DATADIR =/usr/local/mysql/data \

-DMYSQL_UNIX_ADDR =/tmp/mysql. sock \

-DENABLED_LOCAL_INFILE = 1 \

-DMYSQL_TCP_PORT = 3306 \

-DDEFAULT_CHARSET = utf8 \

-DDEFAULT_COLLATION = utf8_general_ci \

-DWITH_EMBEDDED_SERVER = 0 \

-DWITH_MYISAM_STORAGE_ENGINE = 1 \

-DWITH_INNOBASE_STORAGE_ENGINE = 1 \

-DWITH_PARTITION_STORAGE_ENGINE = 1 \

-DWITH_ARCHIVE_STORAGE_ENGINE = 0 \

-DWITH_BLACKHOLE_STORAGE_ENGINE = 0 \

-DWITH_MEMORY_STORAGE_ENGINE = 0 \

-DWITH_PERFSCHEMA_STORAGE_ENGINE = 0 \

-DWITH_EXTRA_CHARSETS = none \

-DWITH_DEBUG = 0 \

-Dwith_1_= 1 \

#-DENABLE_DOWNLOADS = 0 \

 

# End of cmake

If [$? -Ne 0];

Then

Echo-e "\ e [1; 41 m cmake's config error! \ E [0 m"

Exit 1

Fi

Make

If [$? -Ne 0];

Then

Echo-e "\ e [1; 41 m cmake done! \ E [0 m"

Exit 1

Fi

 

Popd

Echo "The package is in build directory! "

 

References

Http://pan.baidu.com/s/1Cc7cr source/mysql5.6

Mysql_clang.sh my. cnf abi_check.cmake

 

 

Related Article

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.