Segmentation fault on compile without makefile

Oct 31, 2014 at 12:14 PM
Edited Oct 31, 2014 at 7:53 PM
upd: The sample in ~/casablanca/Release/build.release/Binaries works fine, but if I try compile it from source from ~/casablanca/Release/samples/BingRequest -> Segmentation fault.
where an error?
  1. g++ -std=c++11 -I/home/berkut/casablanca/Release/include -c bingrequest.cpp
    result: bingrequest.o
  2. g++ -o bingrequest bingrequest.o -Wl,-rpath,/home/berkut/casablanca/Release/build.release/Binaries/ /home/berkut/casablanca/Release/build.release/Binaries/libcpprest.so /home/berkut/casablanca/Release/build.release/Binaries/libcommon_utilities.so -lboost_system
  3. ./bingrequest office res.txt
    Segmentation fault.

ldd bingrequest:

    linux-gate.so.1 (0xb7765000)
    libcpprest.so.2.2 => /home/berkut/casablanca/Release/build.release/Binaries/libcpprest.so.2.2 (0xb7541000)
    libcommon_utilities.so => /home/berkut/casablanca/Release/build.release/Binaries/libcommon_utilities.so (0xb753f000)
    libboost_system.so.1.55.0 => /usr/lib/i386-linux-gnu/libboost_system.so.1.55.0 (0xb752f000)
    libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb743d000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb73f8000)
    libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb73db000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7269000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb724d000)
    libboost_thread.so.1.55.0 => /usr/lib/i386-linux-gnu/libboost_thread.so.1.55.0 (0xb7235000)
    libboost_chrono.so.1.55.0 => /usr/lib/i386-linux-gnu/libboost_chrono.so.1.55.0 (0xb722d000)
    libboost_locale.so.1.55.0 => /usr/lib/i386-linux-gnu/libboost_locale.so.1.55.0 (0xb7153000)
    libboost_random.so.1.55.0 => /usr/lib/i386-linux-gnu/libboost_random.so.1.55.0 (0xb714f000)
    libssl.so.1.0.0 => /usr/lib/i386-linux-gnu/i686/cmov/libssl.so.1.0.0 (0xb70f0000)
    libcrypto.so.1.0.0 => /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 (0xb6f25000)
    /lib/ld-linux.so.2 (0xb7766000)
    libunittestpp.so => /home/berkut/casablanca/Release/build.release/Binaries/libunittestpp.so (0xb6f11000)
    librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb6f08000)
    libicuuc.so.52 => /usr/lib/i386-linux-gnu/libicuuc.so.52 (0xb6d85000)
    libicui18n.so.52 => /usr/lib/i386-linux-gnu/libicui18n.so.52 (0xb6b60000)
    libicudata.so.52 => /usr/lib/i386-linux-gnu/libicudata.so.52 (0xb54f3000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb54ee000)

strace

berkut@Debian-70-wheezy-32-minimal:~/casablanca/Release/samples/BingRequest$ strace http://pastebin.com/2vgXY4jb
Coordinator
Nov 4, 2014 at 5:15 AM
Does this also crash when you link against the debug version?

roschuma
Nov 4, 2014 at 4:21 PM
Hmm... Under debug version i have no crash... I change "build.release" to "build.debug".
Why "release" don't work?
Coordinator
Nov 5, 2014 at 1:26 AM
I suspect it is because you've omitted several critical macros in your compilation of bingrequest.cpp. For the full list of compile flags, pass in VERBOSE=1 when you execute make on the Release build tree.

roschuma