]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
luminous: examples: fix link order in librados example Makefile 25829/head
authorMahati Chamarthy <mahati.chamarthy@gmail.com>
Wed, 20 Sep 2017 14:09:55 +0000 (19:39 +0530)
committerBrad Hubbard <bhubbard@redhat.com>
Tue, 8 Jan 2019 05:38:12 +0000 (15:38 +1000)
The library link order in librados example Makefile is incorrect
and as a result 'make' throws an error. This change fixes the order.

Fixes: http://tracker.ceph.com/issues/37795
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
(cherry picked from commit 5b027155b41d15c9e9e26b81340a76673f483890)

examples/librados/Makefile
examples/librados/hello_world.readme

index 2b6109c4c6deab367b2f493e9dc9434e1d018348..e51c045a65d5d2a728b27b276bc06bca45e7fd2b 100644 (file)
@@ -3,13 +3,13 @@ CXX?=g++
 CXX_FLAGS?=-std=c++11 -Wall -Wextra -Werror -g
 CXX_LIBS?=-lrados -lradosstriper
 CXX_INC?=$(LOCAL_LIBRADOS_INC)
-CXX_CC=$(CXX) $(CXX_FLAGS) $(CXX_INC) $(LOCAL_LIBRADOS) $(CXX_LIBS)
+CXX_CC=$(CXX) $(CXX_FLAGS) $(CXX_INC) $(LOCAL_LIBRADOS)
 
 CC?=gcc
 CC_FLAGS=-Wall -Wextra -Werror -g
 CC_INC=$(LOCAL_LIBRADOS_INC)
 CC_LIBS?=-lrados
-CC_CC=$(CC) $(CC_FLAGS) $(CC_INC) $(LOCAL_LIBRADOS) $(CC_LIBS)
+CC_CC=$(CC) $(CC_FLAGS) $(CC_INC) $(LOCAL_LIBRADOS)
 
 # Relative path to the Ceph source:
 CEPH_SRC_HOME?=../../src
@@ -26,13 +26,13 @@ all-system: LOCAL_LIBRADOS_INC=
 all-system: all
 
 hello_world_cpp: hello_world.cc
-       $(CXX_CC) -o hello_world_cpp hello_world.cc
+       $(CXX_CC) -o hello_world_cpp hello_world.cc $(CXX_LIBS)
 
 hello_radosstriper_cpp: hello_radosstriper.cc
-       $(CXX_CC) -o hello_radosstriper_cpp hello_radosstriper.cc
+       $(CXX_CC) -o hello_radosstriper_cpp hello_radosstriper.cc $(CXX_LIBS)
 
 hello_world_c: hello_world_c.c
-       $(CC_CC) -o hello_world_c hello_world_c.c
+       $(CC_CC) -o hello_world_c hello_world_c.c $(CC_LIBS)
 
 clean:
        rm -f hello_world_cpp hello_radosstriper_cpp hello_world_c
index d438f932e47f3d9692572e6546bbb511f4fdb67e..afa1cb32e8fa4321b0ffdbc9b9a85af2752cdbad 100644 (file)
@@ -6,7 +6,7 @@ build tree (ie. using relative paths). If you would like to build the examples a
 your system librados and headers, use "make all-system".
 
 And executed using
-./librados_hello_world -c ../../src/ceph.conf
+./hello_world_cpp -c ../../src/ceph.conf
 (or whatever path to a ceph.conf is appropriate to you, or
 by explicitly specifying monitors, user id, and keys).