Skip to content

Resolve obvious build problems #22

Open
@smarek

Description

@smarek

Fix no.1

diff --git a/tpwriter.cpp b/tpwriter.cpp
index ded5831..116b54f 100644
--- a/tpwriter.cpp
+++ b/tpwriter.cpp
@@ -11,6 +11,7 @@
 #include <tarantool/tarantool.h>
 #include <tarantool/tnt_net.h>
 #include <tarantool/tnt_opt.h>
+#define MP_SOURCE 1
 #include <msgpuck.h>
 extern "C" {
 #include <tarantool/tnt_io.h>

Fixes build issue like this:

/usr/bin/c++   -pipe -O2 -fomit-frame-pointer -ffunction-sections -fdata-sections  -rdynamic -Wl,-s -Wl,--gc-sections CMakeFiles/rp.dir/dbreader.cpp.o CMakeFiles/rp.dir/main.cpp.o CMakeFiles/rp.dir/tpwriter.cpp.o  -o replicatord -lrt -ldl -ltarantool lib/libslave/libslave_a.a lib/yaml-cpp/libyaml-cpp.a -lpthread
/usr/bin/ld: CMakeFiles/rp.dir/tpwriter.cpp.o: undefined reference to symbol 'mp_type_hint'
/usr/bin/ld: //usr/local/lib/libmsgpuck.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Fix no.2

diff --git a/CMakeLists.txt b/CMakeLists.txt
index be1ff02..cfeb942 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,7 +40,7 @@ find_library(LPTHREAD pthread)
 
 add_executable(rp ${REPLICATOR_SRC})
 set_target_properties(rp PROPERTIES COMPILE_FLAGS "-std=c++11" LINK_FLAGS "-Wl,-s -Wl,--gc-sections" OUTPUT_NAME replicatord)
-target_link_libraries(rp rt dl tnt slave_a yaml-cpp ${LPTHREAD})
+target_link_libraries(rp rt dl tarantool slave_a yaml-cpp ${LPTHREAD})
 
 install(TARGETS rp RUNTIME DESTINATION sbin)
 install(FILES replicatord.yml DESTINATION etc)

Fixes build issue like this:

/usr/bin/c++   -pipe -O2 -fomit-frame-pointer -ffunction-sections -fdata-sections  -rdynamic -Wl,-s -Wl,--gc-sections CMakeFiles/rp.dir/dbreader.cpp.o CMakeFiles/rp.dir/main.cpp.o CMakeFiles/rp.dir/tpwriter.cpp.o  -o replicatord -lrt -ldl -ltnt lib/libslave/libslave_a.a lib/yaml-cpp/libyaml-cpp.a -lpthread 
/usr/bin/ld: cannot find -ltnt
collect2: error: ld returned 1 exit status

Fix no.3 is PR in libslave
tarantool/libslave#12

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogIssues for upcoming releases (to be done soon)buildprio7

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions