mozilla-services / hindsight

Hindsight - light weight data processing skeleton
Mozilla Public License 2.0
668 stars 55 forks source link

Docker build fails while building rjson #166

Closed adriensaladin closed 6 years ago

adriensaladin commented 6 years ago

Hi, I'm new to hindsight. I wanted to understand an issue with a hindsight tutorial at https://github.com/Securing-DevOps/logging-pipeline due to some directories missing, but it's another story.

The dockerfile seems now unable to build hindsight:

> $ docker build . -t hindsight  
[...]
Step 6/8 : RUN sudo yum -y install [...]

Cloning into 'rapidjson'...
Note: checking out '67a17cfdbc25ff1fc8d01714be87e242b03a4cc9'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 67a17cf... Merge pull request #1207 from vim2meta/master
Submodule 'thirdparty/gtest' (https://github.com/google/googletest.git) registered for path 'thirdparty/gtest'
Cloning into 'thirdparty/gtest'...
Submodule path 'thirdparty/gtest': checked out '0a439623f75c029912728d80cb7f1b8b48739ca4'
[ 60%] No patch step for 'rapidjson'
[ 61%] Performing update step for 'rapidjson'
[ 61%] Performing configure step for 'rapidjson'
no configure
[ 62%] Performing build step for 'rapidjson'
no build
[ 62%] Performing install step for 'rapidjson'
no install
[ 63%] Completed 'rapidjson'
[ 63%] Built target rapidjson
Scanning dependencies of target rjson_copy_tests
[ 63%] Built target rjson_copy_tests
Scanning dependencies of target rjson_test_sandbox
[ 64%] Building C object rjson/CMakeFiles/rjson_test_sandbox.dir/test_sandbox.c.o
[ 64%] Linking C executable rjson_test_sandbox
[ 64%] Built target rjson_test_sandbox
Scanning dependencies of target rjson
[ 64%] Building CXX object rjson/CMakeFiles/rjson.dir/rjson.cpp.o
c++: error: unrecognized command line option '-std=c++14'
make[2]: *** [rjson/CMakeFiles/rjson.dir/rjson.cpp.o] Error 1
make[1]: *** [rjson/CMakeFiles/rjson.dir/all] Error 2
make: *** [all] Error 2
The command '/bin/sh -c sudo yum -y install epel-release.noarch &&     sudo yum -y install lua-devel luarocks cmake3 make clang gcc git rpm-build sudo &&     sudo ln -s /usr/bin/cmake3 /usr/local/bin/cmake &&     echo -e "[confluent]\nname=confluent\nbaseurl=http://packages.confluent.io/rpm/3.1/7\ngpgcheck=1\ngpgkey=http://packages.confluent.io/rpm/3.1/archive.key\n" | sudo tee /etc/yum.repos.d/confluent.repo &&     cd /app/src &&     git clone https://github.com/mozilla-services/lua_sandbox.git &&     git clone https://github.com/mozilla-services/lua_sandbox_extensions.git &&     cd lua_sandbox_extensions/ &&     . /app/src/lua_sandbox/build/functions.sh &&     build_lsbe() {         install_packages c++-compiler librdkafka-devel openssl-devel postgresql-devel systemd-devel zlib-devel &&         rm -rf ./release &&         mkdir release &&         cd release &&         cmake -DCMAKE_BUILD_TYPE=release         -DEXT_aws=off         -DEXT_bloom_filter=on         -DEXT_circular_buffer=on         -DEXT_cjson=on         -DEXT_compat=on         -DEXT_cuckoo_filter=on         -DEXT_elasticsearch=on         -DEXT_geoip=off         -DEXT_heka=on         -DEXT_hyperloglog=on         -DEXT_jose=off         -DEXT_kafka=on         -DEXT_lfs=on         -DEXT_lpeg=on         -DEXT_lsb=on         -DEXT_moz_ingest=on         -DEXT_moz_logging=on         -DEXT_moz_pioneer=off         -DEXT_moz_security=off         -DEXT_moz_telemetry=on         -DEXT_openssl=on         -DEXT_parquet=off         -DEXT_postgres=on         -DEXT_rjson=on         -DEXT_sax=on         -DEXT_snappy=off         -DEXT_socket=on         -DEXT_ssl=on         -DEXT_struct=on         -DEXT_syslog=on         -DEXT_systemd=on         -DEXT_zlib=on   "-DCPACK_GENERATOR=${CPACK_GENERATOR}" .. &&         make &&         ctest -V &&         make packages;     } &&     build_function="build_lsbe" main &&     sudo yum install -y /app/src/lua_sandbox_extensions/release/luasandbox*.rpm &&     cd /app/src/hindsight &&     mkdir release &&     cd release &&     cmake3 -DCMAKE_BUILD_TYPE=release .. &&     make &&     ctest3 &&     cpack3 -G RPM &&     sudo yum install -y /app/src/hindsight/release/hindsight*.rpm &&     cd /app &&     mkdir -p /app/cfg              /app/input              /app/output/input              /app/load              /app/load/input             /app/load/analysis             /app/load/output             /app/run/input              /app/run/analysis              /app/run/output &&     cp /app/src/hindsight/hindsight.cfg /app/cfg/hindsight.cfg &&     sudo luarocks install lrexlib-pcre &&     rm -rf /app/src &&     sudo yum -y remove cmake3 make clang git rpm-build c++-compiler librdkafka-devel openssl-devel postgresql-devel systemd-devel zlib-devel  &&     sudo yum -y autoremove &&     sudo yum -y clean all' returned a non-zero code: 2

thanks

ameihm0912 commented 6 years ago

Side note you may want to look at https://github.com/mozilla-services/lua_sandbox_extensions/blob/dev/Dockerfile as well, which builds a docker image with hindsight and all of the extensions enabled.

ameihm0912 commented 6 years ago

Docker build adjusted so we only build lua_sandbox and hindsight here now

Updated README in this repo as well to point at the lua_sandbox_extensions docker image which contains all of the extensions.