Cppcms Compilation Guide in centos

Source: Internet
Author: User

1. download the latest version of cppcms
SVN Co https://cppcms.svn.sourceforge.net/svnroot/cppcms/framework/trunk (cppcms)
2. Extract
CD cppcms
Tar-xjf cppcms_boost.tar.bz2
3. Create a build directory
1. mkdir build
2. CD build
4. Install cmake-dcmake_install_prefix =/usr/.. In the/usr/directory with the following error message:

[... Ocalhost build] $ cmake-dcmake_install_prefix =/usr /..

-- Looking for ICU Libraries
-- ICU not found, disabling ICU localization backend
GNU gcrypt or OpenSSL librarys are not found, disabling aes_encryptor
Cmake error: the following variables are used in this project, but they are set to notfound.
Please set them or make sure they are set and tested correctly in the cmake files:
Pcre_lib
Linked by target "Booster" in directory/home/ryanliang/mysrc/cppcms/cppcms-0.99.4/booster
Linked by target "booster-static" in directory/home/ryanliang/mysrc/cppcms/cppcms-0.99.4/booster
Zlib_include_dir
Used as include directory in directory/home/ryanliang/mysrc/cppcms/cppcms-0.99.4

-- Refreshing incomplete, errors occurred!

Find a brother on the Internet with the same problem (http://stackoverflow.com/questions/6083195/cppcms-build-error-with-libraries ):

He found the answer here: http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_build_troubleshooting

Run the following command to solve the problem:

sudo apt-get install build-essential libpcre3-dev libicu-dev libgcrypt11-dev zlib1g-dev cmake

However, Apt-get and the following installation libraries are available only in the Debian or ubantu system. I use centos and cannot use it;

Solution:

1. We cannot find several system libraries. If we can find lib installation similar to those libraries in centos, it may be feasible;

2. Find it through powerful grep, install the following software, and compile it;

Rpm-IVH rpm-build-4.4.2.3-22.el5.x86_64.rpm
Sudo rpm-IVH rpm-build-4.4.2.3-22.el5.x86_64.rpm
Sudo rpm-IVH pcre-devel-6.6-6.el5.x86_64.rpm
Sudo RPM libicu-devel-3.6-5.16.x86_64.rpm.
Sudo rpm-IVH libicu-devel-3.6-5.16.x86_64.rpm
Sudo rpm-IVH libgpg-error-devel-1.4-2.x86_64.rpm
Sudo rpm-IVH libgcrypt-devel-1.4.4-5.el5.x86_64.rpm
Sudo rpm-IVH zlib-devel-1.2.3-3.x86_64.rpm
Sudo rpm-IVH zlib-1.2.3-3.x86_64.rpm

The compiled result is as follows:

[Ryanliang @ localhost build] $ cmake-dcmake_install_prefix =/usr /..
-- Looking for ICU Libraries
-- ICU found, building booster locale
-- Processing ing done
-- Generating done
-- Build files have been written to:/home/wuliang/mysrc/cppcms-0.99.10.1/build

[Ryanliang @ localhost build] $ make test
Running tests...
Start processing tests
Test Project/home/ryanliang/mysrc/cppcms-0.99.10.1/build
1/76 testing base64_test passed
2/76 testing encryptor_test passed
3/76 testing storage_test passed
4/76 testing json_test passed
5/76 testing multipart_parser_test passed
6/76 testing content_type_parser_test passed
7/76 testing cache_backend_test passed
8/76 testing serialization_test passed
9/76 testing xss_test passed
10/76 testing url_mapper_test passed
11/76 testing copy_filter_test passed
12/76 testing tc_test passed
13/76 testing status_test passed
14/76 testing async_status_test passed
15/76 testing form_test passed
16/76 testing cookie_test passed
17/76 testing internal_forwarder_test passed
18/76 testing forwarder_test passed
19/76 testing jsonrpc_test passed
20/76 testing http_timeouts_test_read passed
21/76 testing http_timeouts_test_write passed
22/76 testing file_server_test passed
23/76 testing file_server_with_listing_test passed
24/76 testing disco_test_http passed.
25/76 testing disco_test_fastcgi_tcp passed
26/76 testing disco_test_scgi_tcp passed
27/76 testing disco_test_fastcgi_unix passed
28/76 testing disco_test_scgi_unix passed
29/76 testing proto_test_async_http passed
30/76 testing proto_test_async_scgi passed
31/76 testing proto_test_async_fastcgi passed
32/76 testing proto_test_async_scgi_unix passed
33/76 testing proto_test_async_fastcgi_unix passed
34/76 testing proto_test_sync_http passed
35/76 testing proto_test_sync_scgi passed
36/76 testing proto_test_sync_fastcgi passed
37/76 testing proto_test_sync_scgi_unix passed
38/76 testing proto_test_sync_fastcgi_unix passed
39/76 testing test_function_function passed
40/76 testing test_function_callback passed
41/76 testing test_ptime_posix_time passed
42/76 testing test_thread_thread passed
43/76 testing test_thread_fork passed
44/76 testing test_smart_ptr_shared_ptr passed
45/76 testing test_smart_ptr_atomic_counter passed
46/76 testing test_smart_ptr_sp_counter passed
47/76 testing test_log_log passed
48/76 testing test_nowide_nowide passed
49/76 testing test_iostreams_streambuf passed
50/76 testing test_regex_regex passed
51/76 testing test_aio_reactor passed
52/76 testing test_aio_timer passed
53/76 testing test_aio_event_loop passed
54/76 testing test_aio_socket passed
55/76 testing test_aio_endpoint passed
56/76 testing test_backtrace_backtrace passed
57/76 testing test_aio_prefork passed
58/76 testing test_locale_codepage passed
59/76 testing test_locale_message passed
60/76 testing test_locale_ios_prop passed
61/76 testing test_locale_codepage_converter passed
62/76 testing test_locale_date_time passed
63/76 testing test_locale_generator passed
64/76 testing test_locale_config passed
65/76 testing test_locale_utf passed
66/76 testing test_locale_collate passed
67/76 testing test_locale_convert passed
68/76 testing test_locale_boundary passed
69/76 testing test_locale_formatting passed
70/76 testing test_locale_icu_vs_ OS _timezone passed
71/76 testing test_locale_std_convert passed
72/76 testing test_locale_std_formatting passed
73/76 testing test_locale_std_collate passed
74/76 testing test_locale_posix_collate passed
75/76 testing test_locale_posix_convert passed
76/76 testing test_locale_posix_formatting passed

100% Tests passed, 0 tests failed out of 76

[Ryanliang @ localhost build] $ sudo make install
[18%] built target Booster
[1, 38%] built target cppcms
[2, 38%] built target base64_test
[2, 38%] built target cache_backend_test
[2, 38%] built target content_type_parser_test
[2, 39%] built target cookie_test
[2, 39%] built target copy_filter_test
[2, 58%] built target cppcms-static
[2, 59%] built target cppcms_config_find_param
[1, 59%] built target cppcms_make_key
[59%] built target cppcms_scale
[2, 60%] built target disco_test
[2, 60%] built target encryptor_test
[1, 60%] built target file_server _
[2, 61%] built target form_test
[2, 61%] built target forwarder_test
[2, 63%] built target hello_world
[2, 63%] built target http_timeouts_test
[2, 63%] built target json_test
[2, 64%] built target jsonrpc_test
[2, 64%] built target multipart_parser_test
[2, 64%] built target proto_test
[2, 65%] built target serialization_test
[2, 65%] built target skin3
[2, 66%] built target status_test
[2, 66%] built target storage_test
[1, 67%] built target tc_skin
[1, 67%] built target tc_skin_a
[1, 68%] built target tc_skin_ B
[2, 68%] built target tc_test
[2, 68%] built target url_mapper_test
[2, 69%] built target xss_test
[2, 87%] built target booster-static
[1, 87%] built target test_aio_endpoint
[1, 88%] built target test_aio_event_loop
[2, 88%] built target test_aio_prefork
[2, 88%] built target test_aio_reactor
[2, 89%] built target test_aio_socket
[2, 89%] built target test_aio_timer
[1, 89%] built target test_backtrace_back
[1, 90%] built target test_function_callback
[1, 90%] built target test_function_function
[1, 90%] built target test_iostreams_streambuf
[2, 91%] built target test_locale_boundary
[2, 91%] built target test_locale_codepage
[2, 91%] built target test_locale_codepage_converter
[2, 92%] built target test_locale_collate
[2, 92%] built target test_locale_config
[2, 92%] built target test_locale_convert
[1, 93%] built target test_locale_date_time
[2, 93%] built target test_locale_formatting
[2, 93%] built target test_locale_generator
[1, 94%] built target test_locale_icu_vs_ OS _timezone
[1, 94%] built target test_locale_ios_prop
[2, 94%] built target test_locale_message
[2, 95%] built target test_locale_posix_collate
[2, 95%] built target test_locale_posix_convert
[2, 95%] built target test_locale_posix_formatting
[2, 96%] built target test_locale_std_collate
[2, 96%] built target test_locale_std_convert
[2, 96%] built target test_locale_std_formatting
[2, 97%] built target test_locale_utf
[1, 97%] built target test_log_log
[2, 97%] built target test_nowide_nowide
[1, 98%] built target test_ptime_posix_time
[2, 98%] built target test_regex_regex
[1, 98%] built target test_smart_ptr_atomic_counter
[2, 99%] built target test_smart_ptr_shared_ptr
[1, 99%] built target test_smart_ptr_sp_counter
[2, 99%] built target test_thread_fork
[2, 100%] built target test_thread_thread
Install the project...
-- Install configuration: "relwithdebinfo"
-- Installing:/usr/lib/libcppcms. so.1.0.0

-- Installing:/usr/include/booster/bad_weak_ptr.h
-- Installing:/usr/include/booster/locale
-- Installing:/usr/include/booster/locale/date_time_facet.h
-- Installing:/usr/include/booster/locale/date_time.h
-- Installing:/usr/include/booster/locale/collator. h
-- Installing:/usr/include/booster/locale/util. h
-- Installing:/usr/include/booster/locale/encoding_errors.h
-- Installing:/usr/include/booster/locale/format. h
-- Installing:/usr/include/booster/locale/info. h
-- Installing:/usr/include/booster/locale/boundary. h
-- Installing:/usr/include/booster/locale/generator. h
-- Installing:/usr/include/booster/locale/Boundary
-- Installing:/usr/include/booster/locale/Boundary/facets. h
-- Installing:/usr/include/booster/locale/Boundary/index. h
-- Installing:/usr/include/booster/locale/Boundary/types. h
-- Installing:/usr/include/booster/locale/Boundary/boundary_point.h
-- Installing:/usr/include/booster/locale/Boundary/segment. h
-- Installing:/usr/include/booster/locale/hold_ptr.h
-- Installing:/usr/include/booster/locale/gnu_gettext.h
-- Installing:/usr/include/booster/locale/config. h
-- Installing:/usr/include/booster/locale/time_zone.h
-- Installing:/usr/include/booster/locale/encoding. h
-- Installing:/usr/include/booster/locale/encoding_utf.h
-- Installing:/usr/include/booster/locale/message. h
-- Installing:/usr/include/booster/locale/formatting. h
-- Installing:/usr/include/booster/locale/conversion. h
-- Installing:/usr/include/booster/locale/UTF. h
-- Installing:/usr/include/booster/locale/localization_backend.h
-- Installing:/usr/include/booster/ctime. h
-- Installing:/usr/include/booster/enable_shared_from_this.h
-- Installing:/usr/include/booster/clone_ptr.h
-- Installing:/usr/include/booster/log. h
-- Installing:/usr/include/booster/copy_ptr.h
-- Installing:/usr/include/booster/refcounted. h
-- Installing:/usr/lib/libbooster. so.0.0.0
-- Installing:/usr/lib/libbooster. so.0
-- Installing:/usr/lib/libbooster. So
-- Installing:/usr/include/booster/build_config.h
-- Installing:/usr/lib/libbooster.
-- Up-to-date:/usr/include/booster/build_config.h
[Ryanliang @ localhost build] $

At the end of the installation, the following two directories will be created and the header files will be placed under this directory.
/Usr/include/cppcms
/Usr/include/booster
Several library files are added to the/usr/lib directory.
-- Installing:/usr/lib/libbooster. so.0.0.0
-- Installing:/usr/lib/libbooster. so.0
-- Installing:/usr/lib/libbooster. So
-- Installing:/usr/lib/libbooster.
-- Installing:/usr/lib/libcppcms. so.1.0.0
-- Installing:/usr/lib/libcppcms. so.1
-- Installing:/usr/lib/libcppcms. So

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.