{"action":"created","issue":{"url":"https://api.github.com/repos/Morgan-Stanley/hobbes/issues/318","repository_url":"https://api.github.com/repos/Morgan-Stanley/hobbes","labels_url":"https://api.github.com/repos/Morgan-Stanley/hobbes/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/Morgan-Stanley/hobbes/issues/318/comments","events_url":"https://api.github.com/repos/Morgan-Stanley/hobbes/issues/318/events","html_url":"https://github.com/Morgan-Stanley/hobbes/issues/318","id":545046456,"node_id":"MDU6SXNzdWU1NDUwNDY0NTY=","number":318,"title":"Build fails on ignored return value","user":{"login":"thmzlt","id":7709,"node_id":"MDQ6VXNlcjc3MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/7709?v=4","gravatar_id":"","url":"https://api.github.com/users/thmzlt","html_url":"https://github.com/thmzlt","followers_url":"https://api.github.com/users/thmzlt/followers","following_url":"https://api.github.com/users/thmzlt/following{/other_user}","gists_url":"https://api.github.com/users/thmzlt/gists{/gist_id}","starred_url":"https://api.github.com/users/thmzlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thmzlt/subscriptions","organizations_url":"https://api.github.com/users/thmzlt/orgs","repos_url":"https://api.github.com/users/thmzlt/repos","events_url":"https://api.github.com/users/thmzlt/events{/privacy}","received_events_url":"https://api.github.com/users/thmzlt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2020-01-03T15:47:17Z","updated_at":"2020-01-04T17:20:37Z","closed_at":null,"author_association":"NONE","body":"I'm stuck building hobbes outside of the Ubuntu Linux CI environment. I'm also running Linux but using the [Nix](https://nixos.org/nix/) package manager. Nix builds software in isolate which helps with reliability and reproducibility. It's available on Linux and macOS.\r\n\r\nI can test multiple combinations of GCC and LLVM versions in Nix, but most of them fail on `db/signals.C` where a return vaule is being ignored according to the compiler. Here is the verbose output for GCC 5.5 and LLVM 3.5:\r\n\r\n```\r\nthese derivations will be built:\r\n  /nix/store/qyvypzxa995560zgccn2r07f1d9psmm5-hobbes.drv\r\nbuilding '/nix/store/qyvypzxa995560zgccn2r07f1d9psmm5-hobbes.drv'...\r\nunpacking sources\r\nunpacking source archive /nix/store/j2wn47ky8zb1lnxvgagp4f58zfqs65ia-hobbes\r\nsource root is hobbes\r\npatching sources\r\nconfiguring\r\nRe-run cmake no build system arguments\r\n-- The C compiler identification is GNU 5.5.0\r\n-- The CXX compiler identification is GNU 5.5.0\r\n-- Check for working C compiler: /nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/gcc\r\n-- Check for working C compiler: /nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/gcc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Check for working CXX compiler: /nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/g++\r\n-- Check for working CXX compiler: /nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/g++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- Found ZLIB: /nix/store/ylpi31dwsgm9c9rndp0j5b4na749d97z-zlib-1.2.11/lib/libz.so (found version \"1.2.11\")\r\n-- Found readline: /nix/store/y5w0ifg4kqskzqx958bhyhqcdfglzfrq-readline-6.3p08-dev/include\r\n-- Looking for cbreak in /nix/store/3cz3xgnghkpy41ab9hcj7011sqbrpg4n-ncurses-6.1-20190112/lib/libncurses.so\r\n-- Looking for cbreak in /nix/store/3cz3xgnghkpy41ab9hcj7011sqbrpg4n-ncurses-6.1-20190112/lib/libncurses.so - found\r\n-- Found Curses: /nix/store/3cz3xgnghkpy41ab9hcj7011sqbrpg4n-ncurses-6.1-20190112/lib/libncurses.so\r\n-- llvm libs: /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMJIT.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMExecutionEngine.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMipo.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMVectorize.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMX86Disassembler.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMX86AsmParser.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMX86CodeGen.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMSelectionDAG.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMAsmPrinter.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMCodeGen.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMScalarOpts.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMInstCombine.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMTransformUtils.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMipa.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMAnalysis.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMTarget.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMX86Desc.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMObject.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMMCParser.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMBitReader.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMCore.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMX86Info.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMX86AsmPrinter.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMMC.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMX86Utils.so /nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib/libLLVMSupport.so\r\n-- llvm ldflags: -L/nix/store/gpla85b2p4y6lk0dvwywcl5xahpjimzx-llvm-3.5.2/lib\r\n-- llvm syslibs: -lrt -ldl -ltinfo -lpthread -lz\r\n-- Found PythonInterp: /nix/store/gk0lrrvqz491xn0mgrshzgvazx4rghl2-python-2.7.17/bin/python (found version \"2.7.17\")\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /build/hobbes\r\nbuilding\r\nbuild flags: SHELL=/nix/store/xb062l4b76zyhq6grqf4iyfdikkpg8fl-bash-4.4-p23/bin/bash\r\n/nix/store/af4js9rv5cnxs0ig0vfqbb0arh2n0bfy-cmake-3.15.5/bin/cmake -S/build/hobbes -B/build/hobbes --check-build-system CMakeFiles/Makefile.cmake 0\r\n/nix/store/af4js9rv5cnxs0ig0vfqbb0arh2n0bfy-cmake-3.15.5/bin/cmake -E cmake_progress_start /build/hobbes/CMakeFiles /build/hobbes/CMakeFiles/progress.marks\r\nmake -f CMakeFiles/Makefile2 all\r\nmake[1]: Entering directory '/build/hobbes'\r\nmake -f CMakeFiles/hobbes-pic.dir/build.make CMakeFiles/hobbes-pic.dir/depend\r\nmake[2]: Entering directory '/build/hobbes'\r\ncd /build/hobbes && /nix/store/af4js9rv5cnxs0ig0vfqbb0arh2n0bfy-cmake-3.15.5/bin/cmake -E cmake_depends \"Unix Makefiles\" /build/hobbes /build/hobbes /build/hobbes /build/hobbes /build/hobbes/CMakeFiles/hobbes-pic.dir/DependInfo.cmake --color=\r\nDependee \"/build/hobbes/CMakeFiles/hobbes-pic.dir/DependInfo.cmake\" is newer than depender \"/build/hobbes/CMakeFiles/hobbes-pic.dir/depend.internal\".\r\nDependee \"/build/hobbes/CMakeFiles/CMakeDirectoryInformation.cmake\" is newer than depender \"/build/hobbes/CMakeFiles/hobbes-pic.dir/depend.internal\".\r\nScanning dependencies of target hobbes-pic\r\nmake[2]: Leaving directory '/build/hobbes'\r\nmake -f CMakeFiles/hobbes-pic.dir/build.make CMakeFiles/hobbes-pic.dir/build\r\nmake[2]: Entering directory '/build/hobbes'\r\n[  0%] Building CXX object CMakeFiles/hobbes-pic.dir/lib/hobbes/boot/gen/boot.C.o\r\n/nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/g++  -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/build/hobbes/include  -Werror=old-style-cast -Werror -Wall -Wextra -Winit-self -Wreturn-type -Wunused-variable -Wsign-compare -Warray-bounds -Wunknown-pragmas -Wuninitialized -Wstrict-aliasing -Wunused-value -Wunused-label -Wswitch -Wcast-align -Wctor-dtor-privacy -Wmissing-noreturn -Wunused-parameter -Wreorder -fPIC   -std=gnu++11 -o CMakeFiles/hobbes-pic.dir/lib/hobbes/boot/gen/boot.C.o -c /build/hobbes/lib/hobbes/boot/gen/boot.C\r\n[  1%] Building CXX object CMakeFiles/hobbes-pic.dir/lib/hobbes/db/bindings.C.o\r\n/nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/g++  -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/build/hobbes/include  -Werror=old-style-cast -Werror -Wall -Wextra -Winit-self -Wreturn-type -Wunused-variable -Wsign-compare -Warray-bounds -Wunknown-pragmas -Wuninitialized -Wstrict-aliasing -Wunused-value -Wunused-label -Wswitch -Wcast-align -Wctor-dtor-privacy -Wmissing-noreturn -Wunused-parameter -Wreorder -fPIC   -std=gnu++11 -o CMakeFiles/hobbes-pic.dir/lib/hobbes/db/bindings.C.o -c /build/hobbes/lib/hobbes/db/bindings.C\r\n[  1%] Building CXX object CMakeFiles/hobbes-pic.dir/lib/hobbes/db/cbindings.C.o\r\n/nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/g++  -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/build/hobbes/include  -Werror=old-style-cast -Werror -Wall -Wextra -Winit-self -Wreturn-type -Wunused-variable -Wsign-compare -Warray-bounds -Wunknown-pragmas -Wuninitialized -Wstrict-aliasing -Wunused-value -Wunused-label -Wswitch -Wcast-align -Wctor-dtor-privacy -Wmissing-noreturn -Wunused-parameter -Wreorder -fPIC   -std=gnu++11 -o CMakeFiles/hobbes-pic.dir/lib/hobbes/db/cbindings.C.o -c /build/hobbes/lib/hobbes/db/cbindings.C\r\n[  2%] Building CXX object CMakeFiles/hobbes-pic.dir/lib/hobbes/db/file.C.o\r\n/nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/g++  -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/build/hobbes/include  -Werror=old-style-cast -Werror -Wall -Wextra -Winit-self -Wreturn-type -Wunused-variable -Wsign-compare -Warray-bounds -Wunknown-pragmas -Wuninitialized -Wstrict-aliasing -Wunused-value -Wunused-label -Wswitch -Wcast-align -Wctor-dtor-privacy -Wmissing-noreturn -Wunused-parameter -Wreorder -fPIC   -std=gnu++11 -o CMakeFiles/hobbes-pic.dir/lib/hobbes/db/file.C.o -c /build/hobbes/lib/hobbes/db/file.C\r\n[  2%] Building CXX object CMakeFiles/hobbes-pic.dir/lib/hobbes/db/series.C.o\r\n/nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/g++  -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/build/hobbes/include  -Werror=old-style-cast -Werror -Wall -Wextra -Winit-self -Wreturn-type -Wunused-variable -Wsign-compare -Warray-bounds -Wunknown-pragmas -Wuninitialized -Wstrict-aliasing -Wunused-value -Wunused-label -Wswitch -Wcast-align -Wctor-dtor-privacy -Wmissing-noreturn -Wunused-parameter -Wreorder -fPIC   -std=gnu++11 -o CMakeFiles/hobbes-pic.dir/lib/hobbes/db/series.C.o -c /build/hobbes/lib/hobbes/db/series.C\r\n[  3%] Building CXX object CMakeFiles/hobbes-pic.dir/lib/hobbes/db/signals.C.o\r\n/nix/store/6ivqy3cygxpn3nbwm6isx80hgcbk2dh6-gcc-wrapper-5.5.0/bin/g++  -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/build/hobbes/include  -Werror=old-style-cast -Werror -Wall -Wextra -Winit-self -Wreturn-type -Wunused-variable -Wsign-compare -Warray-bounds -Wunknown-pragmas -Wuninitialized -Wstrict-aliasing -Wunused-value -Wunused-label -Wswitch -Wcast-align -Wctor-dtor-privacy -Wmissing-noreturn -Wunused-parameter -Wreorder -fPIC   -std=gnu++11 -o CMakeFiles/hobbes-pic.dir/lib/hobbes/db/signals.C.o -c /build/hobbes/lib/hobbes/db/signals.C\r\n/build/hobbes/lib/hobbes/db/signals.C: In lambda function:\r\n/build/hobbes/lib/hobbes/db/signals.C:105:47: error: ignoring return value of 'ssize_t read(int, void*, size_t)', declared with attribute warn_unused_result [-Werror=unused-result]\r\n         read(fd, event, sizeof(inotify_event));\r\n                                               ^\r\n/build/hobbes/lib/hobbes/db/signals.C:107:44: error: ignoring return value of 'ssize_t read(int, void*, size_t)', declared with attribute warn_unused_result [-Werror=unused-result]\r\n           read(fd, event->name, event->len);\r\n                                            ^\r\ncc1plus: all warnings being treated as errors\r\nmake[2]: *** [CMakeFiles/hobbes-pic.dir/build.make:128: CMakeFiles/hobbes-pic.dir/lib/hobbes/db/signals.C.o] Error 1\r\nmake[2]: Leaving directory '/build/hobbes'\r\nmake[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/hobbes-pic.dir/all] Error 2\r\nmake[1]: Leaving directory '/build/hobbes'\r\nmake: *** [Makefile:141: all] Error 2\r\nbuilder for '/nix/store/qyvypzxa995560zgccn2r07f1d9psmm5-hobbes.drv' failed with exit code 2\r\nerror: build of '/nix/store/qyvypzxa995560zgccn2r07f1d9psmm5-hobbes.drv' failed\r\n```\r\n\r\nFor those interested, this is the Nix derivation I'm using to build hobbes:\r\n\r\n```nix\r\n{ pkgs ? import (fetchTarball https://github.com/nixos/nixpkgs-channels/archive/nixos-unstable.tar.gz) {} }:\r\n\r\npkgs.stdenv.mkDerivation {\r\n  name = \"hobbes\";\r\n  src = ./.;\r\n\r\n  nativeBuildInputs = with pkgs; [\r\n    cmake\r\n    gcc5\r\n    llvm_35\r\n    ncurses\r\n    python27\r\n    readline\r\n    zlib\r\n  ];\r\n\r\n  configurePhase = ''\r\n    cmake .\r\n  '';\r\n\r\n  VERBOSE = \"1\";\r\n}\r\n```\r\n\r\nYou can install Nix, add the contents above as a `default.nix` file in the root of the project, and then run **`nix-build`**.\r\n\r\nIf you can point me in the right direction, I'll be more than happy to contribute with a fix. I'm currently using hobbes inside a docker container running Ubuntu which is not ideal."},"comment":{"url":"https://api.github.com/repos/Morgan-Stanley/hobbes/issues/comments/570802881","html_url":"https://github.com/Morgan-Stanley/hobbes/issues/318#issuecomment-570802881","issue_url":"https://api.github.com/repos/Morgan-Stanley/hobbes/issues/318","id":570802881,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MDgwMjg4MQ==","user":{"login":"thmzlt","id":7709,"node_id":"MDQ6VXNlcjc3MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/7709?v=4","gravatar_id":"","url":"https://api.github.com/users/thmzlt","html_url":"https://github.com/thmzlt","followers_url":"https://api.github.com/users/thmzlt/followers","following_url":"https://api.github.com/users/thmzlt/following{/other_user}","gists_url":"https://api.github.com/users/thmzlt/gists{/gist_id}","starred_url":"https://api.github.com/users/thmzlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thmzlt/subscriptions","organizations_url":"https://api.github.com/users/thmzlt/orgs","repos_url":"https://api.github.com/users/thmzlt/repos","events_url":"https://api.github.com/users/thmzlt/events{/privacy}","received_events_url":"https://api.github.com/users/thmzlt/received_events","type":"User","site_admin":false},"created_at":"2020-01-04T17:20:37Z","updated_at":"2020-01-04T17:20:37Z","author_association":"NONE","body":"Damn!\r\n\r\nI use Nix across other projects and I have successfully set it up with GitLab and CircleCI. I'll give Travis a try later today and let you know."}}
{"actor":{"display_login":"thmzlt"}}