Open akien-mga opened 7 years ago
@akien-mga , thank you for reporting the issue. Unfortunately, the problem isn't reproduced on my environment.
Could you tell me your cmake options?
Sure, here are the options from Mageia's %cmake
macro for packaging:
$ rpm --eval %cmake
CFLAGS="${CFLAGS:--O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4}" ; export CXXFLAGS ;
FFLAGS="${FFLAGS:--O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4}" ; export FFLAGS ;
LDFLAGS="${LDFLAGS:- -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags}" ; export LDFLAGS
mkdir -p build
cd build
/usr/bin/cmake .. \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 \
-DCMAKE_INSTALL_LIBEXECDIR:PATH=/usr/libexec \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
-DINCLUDE_INSTALL_DIR:PATH=/usr/include \
-DLIB_INSTALL_DIR:PATH=/usr/lib64 \
-DSYSCONF_INSTALL_DIR:PATH=/etc \
-DSHARE_INSTALL_PREFIX:PATH=/usr/share \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-DNDEBUG" \
-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="-DNDEBUG" \
%if "lib64" == "lib64"
-DLIB_SUFFIX=64 \
%endif
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags" \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_STATIC_LIBS:BOOL=OFF
I'm not sure but #710 and #717 might solve the issue.
Hi there,
When building msgpack-c in shared library mode, the C library's test fail:
It seems that those tests don't find the
libmsgpackc.so.2.0.0
, which is in${CMAKE_BINARY_DIR}
(here./build
).Running the test binaries manually with
LD_LIBRARY_PATH
works fine:I've tried to tweak the
test/CMakeLists.txt
to get it defined in a way thatctest
would take into account, but no luck so far. (I've tried what is documented here and here to setLD_LIBRARY_PATH
to${CMAKE_BINARY_DIR}
).A workaround could be to get those binaries linked against the static library, so that there is no library path issue when running tests.