Edgio / hurl

http(s)+h2 server load tester
153 stars 34 forks source link

Getting openssl/ssl.h error while running this script ./build_simple.sh #18

Closed khadar02 closed 2 years ago

khadar02 commented 4 years ago

ubuntu@ip-172-31-36-96:~/hurl-1.7.1$ ./build_simple.sh /home/linuxbrew/.linuxbrew/bin/cmake ~/hurl-1.7.1/build ~/hurl-1.7.1 -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Deprecation Warning at CMakeLists.txt:27 (cmake_policy): The OLD behavior for policy CMP0050 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

-- Build Configuration:

Build Option                               Variable                Value
-----------------------------------------------------------------------------------------
Debug mode:                                DEBUG_MODE              OFF
Fortify Source:                            FORTIFY                 OFF
Build applications (hurl/phurl/fsurv):     BUILD_APPS              ON
Build unit tests:                          BUILD_TESTS             OFF
Install path:                              INSTALL_PREFIX          /usr/local
Enable google cpu/heap profiler support:   BUILD_PROFILER          OFF
Build Symbols                              BUILD_SYMBOLS           OFF
Build with tcmalloc:                       BUILD_TCMALLOC          OFF
Build with efence:                         BUILD_EFENCE            OFF
Build with Address Sanitizer:              BUILD_ASAN              OFF
Build with Undefined Behavior Sanitizer:   BUILD_UBSAN             OFF
Build with udns support:                   BUILD_UDNS              ON
Build for Ubuntu (adds package help):      BUILD_UBUNTU            OFF
Build for custom OpenSSL:                  BUILD_CUSTOM_OPENSSL    OFF
Build with KTLS support:                   BUILD_KTLS_SUPPORT      OFF

-- Libraries: pthread;ssl;crypto;pthread;rt;dl fatal: not a git repository (or any of the parent directories): .git CMake Deprecation Warning at src/hurl/CMakeLists.txt:27 (cmake_policy): The OLD behavior for policy CMP0050 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

CMake Deprecation Warning at src/phurl/CMakeLists.txt:25 (cmake_policy): The OLD behavior for policy CMP0050 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

-- Configuring done -- Generating done -- Build files have been written to: /home/ubuntu/hurl-1.7.1/build Scanning dependencies of target ext_udns [ 1%] Creating directories for 'ext_udns' [ 3%] No download step for 'ext_udns' [ 4%] No patch step for 'ext_udns' [ 6%] No update step for 'ext_udns' [ 7%] Performing configure step for 'ext_udns' configure... udns package checking for C compiler... gcc checking whenever C compiler (gcc) is GNU CC... yes checking whenever the C compiler (gcc -Wall -W -O2 -pipe) can produce executables... yes checking for ranlib... ranlib checking for getopt()... yes checking for libraries needed for socket and connect... ok (none needed) checking for inet_pton() && inet_ntop()... yes checking for socklen_t... yes checking for IPv6... yes checking for poll()... yes creating config.h... ok creating Makefile... ok creating config.status... ok all done. [ 9%] Performing build step for 'ext_udns' udns_resolver.c: In function ‘dns_dummy_cb’: udns_resolver.c:868:67: warning: parameter ‘data’ set but not used [-Wunused-but-set-parameter] static void dns_dummy_cb(struct dns_ctx ctx, void result, void data) { ^~~~ ar: creating libudns.a a - udns_dn.o a - udns_dntosp.o a - udns_parse.o a - udns_resolver.o a - udns_init.o a - udns_misc.o a - udns_XtoX.o a - udns_rr_a.o a - udns_rr_ptr.o a - udns_rr_mx.o a - udns_rr_txt.o a - udns_bl.o a - udns_rr_srv.o a - udns_rr_naptr.o a - udns_codes.o a - udns_jran.o dnsget.c: In function ‘dbgcb’: dnsget.c:413:31: warning: unused parameter ‘unused_q’ [-Wunused-parameter] const struct dns_query unused_q, void unused_data) { ^~~~ dnsget.c:413:47: warning: unused parameter ‘unused_data’ [-Wunused-parameter] const struct dns_query unused_q, void *unused_data) { ^~~ rblcheck.c: In function ‘main’: rblcheck.c:298:5: warning: this statement may fall through [-Wimplicit-fallthrough=] error(1, "unable to read zonefile `%s'", optarg); ^~~~~~~~~~~~ rblcheck.c:299:3: note: here case 'c': ++zgiven; nzones = 0; break; ^~~~ [ 10%] No install step for 'ext_udns' [ 12%] Completed 'ext_udns' [ 12%] Built target ext_udns Scanning dependencies of target nghttp2 [ 14%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_buf.c.o [ 15%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_callbacks.c.o [ 17%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_debug.c.o [ 18%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_frame.c.o [ 20%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_hd.c.o [ 21%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_hd_huffman.c.o [ 23%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_hd_huffman_data.c.o [ 25%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_helper.c.o /home/ubuntu/hurl-1.7.1/ext/nghttp2/src/nghttp2_helper.c: In function ‘nghttp2_put_uint16be’: /home/ubuntu/hurl-1.7.1/ext/nghttp2/src/nghttp2_helper.c:33:16: warning: implicit declaration of function ‘htons’ [-Wimplicit-function-declaration] uint16_t x = htons(n); ^~~~~ /home/ubuntu/hurl-1.7.1/ext/nghttp2/src/nghttp2_helper.c: In function ‘nghttp2_put_uint32be’: /home/ubuntu/hurl-1.7.1/ext/nghttp2/src/nghttp2_helper.c:38:16: warning: implicit declaration of function ‘htonl’; did you mean ‘atoll’? [-Wimplicit-function-declaration] uint32_t x = htonl(n); ^~~~~ atoll /home/ubuntu/hurl-1.7.1/ext/nghttp2/src/nghttp2_helper.c: In function ‘nghttp2_get_uint16’: /home/ubuntu/hurl-1.7.1/ext/nghttp2/src/nghttp2_helper.c:45:10: warning: implicit declaration of function ‘ntohs’ [-Wimplicit-function-declaration] return ntohs(n); ^~~~~ /home/ubuntu/hurl-1.7.1/ext/nghttp2/src/nghttp2_helper.c: In function ‘nghttp2_get_uint32’: /home/ubuntu/hurl-1.7.1/ext/nghttp2/src/nghttp2_helper.c:51:10: warning: implicit declaration of function ‘ntohl’; did you mean ‘atoll’? [-Wimplicit-function-declaration] return ntohl(n); ^~~~~ atoll [ 26%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_http.c.o [ 28%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_map.c.o [ 29%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_mem.c.o [ 31%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_npn.c.o [ 32%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_option.c.o [ 34%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_outbound_item.c.o [ 35%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_pq.c.o [ 37%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_priority_spec.c.o [ 39%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_queue.c.o [ 40%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_rcbuf.c.o [ 42%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_session.c.o [ 43%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_stream.c.o [ 45%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_submit.c.o [ 46%] Building C object ext/nghttp2/src/CMakeFiles/nghttp2.dir/nghttp2_version.c.o [ 48%] Linking C static library libnghttp2.a [ 48%] Built target nghttp2 Scanning dependencies of target hurlcore [ 50%] Building CXX object src/core/CMakeFiles/hurlcore.dir///ext/http_parser/http_parser.cc.o [ 51%] Building CXX object src/core/CMakeFiles/hurlcore.dir///ext/hostcheck/hostcheck.cc.o [ 53%] Building CXX object src/core/CMakeFiles/hurlcore.dir///ext/base64/base64.cc.o [ 54%] Building CXX object src/core/CMakeFiles/hurlcore.dir/evr/evr.cc.o [ 56%] Building CXX object src/core/CMakeFiles/hurlcore.dir/evr/evr_select.cc.o [ 57%] Building CXX object src/core/CMakeFiles/hurlcore.dir/support/ndebug.cc.o [ 59%] Building CXX object src/core/CMakeFiles/hurlcore.dir/support/file_util.cc.o [ 60%] Building CXX object src/core/CMakeFiles/hurlcore.dir/support/string_util.cc.o [ 62%] Building CXX object src/core/CMakeFiles/hurlcore.dir/support/time_util.cc.o [ 64%] Building CXX object src/core/CMakeFiles/hurlcore.dir/support/tls_util.cc.o /home/ubuntu/hurl-1.7.1/src/core/support/tls_util.cc:35:10: fatal error: openssl/ssl.h: No such file or directory

include "openssl/ssl.h"

      ^~~~~~~~~~~~~~~

compilation terminated. src/core/CMakeFiles/hurlcore.dir/build.make:179: recipe for target 'src/core/CMakeFiles/hurlcore.dir/support/tls_util.cc.o' failed make[2]: [src/core/CMakeFiles/hurlcore.dir/support/tls_util.cc.o] Error 1 CMakeFiles/Makefile2:262: recipe for target 'src/core/CMakeFiles/hurlcore.dir/all' failed make[1]: [src/core/CMakeFiles/hurlcore.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 ~/hurl-1.7.1 ubuntu@ip-172-31-36-96:~/hurl-1.7.1$ cd

khadar02 commented 4 years ago

Thank you in advance

tinselcity commented 4 years ago

@khadar02 do you have any info about your environment like what OS you're using etc? I see ubuntu in the prompt but what version are you using? It'll help me to recreate.

khadar-sk commented 4 years ago

@tinselcity iam using Ubuntu 16.04.6 LTS. I have taken zip file from the releases. 1) What are the pre-requisites for running this application. 2) I tried on a different Vm of same operating system, First i run ./build_static_lib.sh later i run ./build_simple.sh . I did not get any error. But hurl package is not installed.

This is output of ./build_static_lib.sh

`ubuntu@ip-172-31-39-243:~/hurl-1.7.1$ ./build_static_lib.sh /home/ubuntu/.linuxbrew/bin/cmake /usr/bin/g++ /usr/bin/make ~/hurl-1.7.1/build ~/hurl-1.7.1 CMake Deprecation Warning at CMakeLists.txt:27 (cmake_policy): The OLD behavior for policy CMP0050 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

-- Build Configuration:

Build Option                               Variable                Value
-----------------------------------------------------------------------------------------
Debug mode:                                DEBUG_MODE              OFF
Fortify Source:                            FORTIFY                 OFF
Build applications (hurl/phurl/fsurv):     BUILD_APPS              OFF
Build unit tests:                          BUILD_TESTS             ON
Install path:                              INSTALL_PREFIX          /usr
Enable google cpu/heap profiler support:   BUILD_PROFILER          OFF
Build Symbols                              BUILD_SYMBOLS           ON
Build with tcmalloc:                       BUILD_TCMALLOC          ON
Build with efence:                         BUILD_EFENCE            OFF
Build with Address Sanitizer:              BUILD_ASAN              ON
Build with Undefined Behavior Sanitizer:   BUILD_UBSAN             OFF
Build with udns support:                   BUILD_UDNS              ON
Build for Ubuntu (adds package help):      BUILD_UBUNTU            ON
Build for custom OpenSSL:                  BUILD_CUSTOM_OPENSSL    OFF
Build with KTLS support:                   BUILD_KTLS_SUPPORT      OFF

-- Found LIBSSL include: /usr/include -- Found LIBSSL lib: /usr/lib/x86_64-linux-gnu/libssl.a -- Found LIBCRYPTO include: /usr/include -- Found LIBCRYPTO lib: /usr/lib/x86_64-linux-gnu/libcrypto.a -- Found LIBZ include: /usr/include -- Found LIBZ lib: /usr/lib/x86_64-linux-gnu/libz.a -- Libraries: asan;/usr/lib/x86_64-linux-gnu/libssl.a;/usr/lib/x86_64-linux-gnu/libcrypto.a;/usr/lib/x86_64-linux-gnu/libz.a;pthread;rt;dl fatal: Not a git repository (or any of the parent directories): .git -- Package Configuration:

Option                                     Value
---------------------------------------------------------------------
Package Version:                           -xenial

-- Found Python module pytest at /home/ubuntu/.local/lib/python2.7/site-packages/pytest.pyc -- Found Python module requests at /home/ubuntu/.local/lib/python2.7/site-packages/requests -- Configuring done -- Generating done -- Build files have been written to: /home/ubuntu/hurl-1.7.1/build [ 10%] Built target ext_udns [ 13%] Built target compiled_catch [ 45%] Built target nghttp2 [ 47%] Built target wb_nlru [ 50%] Built target wb_nbq [ 86%] Built target hurlcore [ 89%] Built target wb_obj_pool [ 91%] Built target wb_ai_cache [ 94%] Built target wb_nconn_tls [ 97%] Built target wb_nresolver [100%] Built target wb_nconn_tcp ~/hurl-1.7.1`

this is output of ./build_simple.sh

`ubuntu@ip-172-31-39-243:~/hurl-1.7.1$ ./build_simple.sh /home/ubuntu/.linuxbrew/bin/cmake ~/hurl-1.7.1/build ~/hurl-1.7.1 CMake Deprecation Warning at CMakeLists.txt:27 (cmake_policy): The OLD behavior for policy CMP0050 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

-- Build Configuration:

Build Option                               Variable                Value
-----------------------------------------------------------------------------------------
Debug mode:                                DEBUG_MODE              OFF
Fortify Source:                            FORTIFY                 OFF
Build applications (hurl/phurl/fsurv):     BUILD_APPS              OFF
Build unit tests:                          BUILD_TESTS             ON
Install path:                              INSTALL_PREFIX          /usr
Enable google cpu/heap profiler support:   BUILD_PROFILER          OFF
Build Symbols                              BUILD_SYMBOLS           ON
Build with tcmalloc:                       BUILD_TCMALLOC          ON
Build with efence:                         BUILD_EFENCE            OFF
Build with Address Sanitizer:              BUILD_ASAN              ON
Build with Undefined Behavior Sanitizer:   BUILD_UBSAN             OFF
Build with udns support:                   BUILD_UDNS              ON
Build for Ubuntu (adds package help):      BUILD_UBUNTU            ON
Build for custom OpenSSL:                  BUILD_CUSTOM_OPENSSL    OFF
Build with KTLS support:                   BUILD_KTLS_SUPPORT      OFF

-- Found LIBSSL include: /usr/include -- Found LIBSSL lib: /usr/lib/x86_64-linux-gnu/libssl.a -- Found LIBCRYPTO include: /usr/include -- Found LIBCRYPTO lib: /usr/lib/x86_64-linux-gnu/libcrypto.a -- Found LIBZ include: /usr/include -- Found LIBZ lib: /usr/lib/x86_64-linux-gnu/libz.a -- Libraries: asan;/usr/lib/x86_64-linux-gnu/libssl.a;/usr/lib/x86_64-linux-gnu/libcrypto.a;/usr/lib/x86_64-linux-gnu/libz.a;pthread;rt;dl fatal: Not a git repository (or any of the parent directories): .git -- Package Configuration:

Option                                     Value
---------------------------------------------------------------------
Package Version:                           -xenial

-- Found Python module pytest at /home/ubuntu/.local/lib/python2.7/site-packages/pytest.pyc -- Found Python module requests at /home/ubuntu/.local/lib/python2.7/site-packages/requests -- Configuring done -- Generating done -- Build files have been written to: /home/ubuntu/hurl-1.7.1/build [ 10%] Built target ext_udns [ 42%] Built target nghttp2 [ 78%] Built target hurlcore [ 80%] Built target compiled_catch [ 83%] Built target wb_nlru [ 86%] Built target wb_nbq [ 89%] Built target wb_obj_pool [ 91%] Built target wb_nresolver [ 94%] Built target wb_ai_cache [ 97%] Built target wb_nconn_tcp [100%] Built target wb_nconn_tls ~/hurl-1.7.1`

Output of hurl

ubuntu@ip-172-31-39-243:~/hurl-1.7.1$ hurl No command 'hurl' found, did you mean: Command 'curl' from package 'curl' (main) Command 'zurl' from package 'zurl' (universe) hurl: command not found

khadar-sk commented 4 years ago

khadar-sk and khadar02 both are same

tinselcity commented 4 years ago

You'll need to specify the path for the executable unless it's already installed in one of your path locations. So you have two options I think you can either

Hope this helps.

khadar-sk commented 4 years ago

This is what iam getting for sudo make install

ubuntu@ip-172-31-39-243:~/hurl-1.7.1/build$ sudo make install [ 10%] Built target ext_udns [ 42%] Built target nghttp2 [ 78%] Built target hurlcore [ 80%] Built target compiled_catch [ 83%] Built target wb_nlru [ 86%] Built target wb_nbq [ 89%] Built target wb_obj_pool [ 91%] Built target wb_nresolver [ 94%] Built target wb_ai_cache [ 97%] Built target wb_nconn_tcp [100%] Built target wb_nconn_tls Install the project... -- Install configuration: "" -- Up-to-date: /usr/lib/libnghttp2.a

and checked this ./build/src/hurl/hurl -V also

ubuntu@ip-172-31-39-243:~/hurl-1.7.1$ ./build/src/hurl/hurl -V -bash: ./build/src/hurl/hurl: No such file or directory

Inside the build/src/hurl/ ubuntu@ip-172-31-39-243:~/hurl-1.7.1$ cd ./build/src/hurl ubuntu@ip-172-31-39-243:~/hurl-1.7.1/build/src/hurl$ ls CMakeFiles cmake_install.cmake hurl.1 Makefile