Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed with "--disable-zypp" #616

Closed
henrich opened this issue Dec 27, 2020 · 0 comments · Fixed by #617
Closed

Build failed with "--disable-zypp" #616

henrich opened this issue Dec 27, 2020 · 0 comments · Fixed by #617

Comments

@henrich
Copy link
Contributor

henrich commented Dec 27, 2020

Build failed with --disable-zypp configure option as below

./client/utils/JsonFormatter.h:49: undefined reference to `json_object_put'
/bin/sh ../libtool  --tag=CXX   --mode=link g++  -g -O2 -fdebug-prefix-map=/build/snapper-0.8.15=. -fstack-protector-strong -Wformat -Werror=format-security -std=c++11 -Wall -Wextra -Wformat -Wnon-virtual-dtor -Wno-unused-parameter -Wsuggest-override  -Wl,-z,relro -Wl,-z,now -o systemd-helper systemd-helper.o cleanup.o proxy.o proxy-dbus.o proxy-lib.o misc.o libclient.la ../snapper/libsnapper.la utils/libutils.la ../dbus/libdbus.la -lbtrfs
/usr/bin/ld: ./.libs/libclient.a(JsonFormatter.o): in function `snapper::operator<<(std::ostream&, snapper::JsonFormatter const&)':
./client/utils/JsonFormatter.cc:41: undefined reference to `json_object_to_json_string_ext'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:718: snapper] Error 1

To avoid it, disable check for with_zypp in configure .ac

 configure.ac | 2 --
 1 file changed, 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 839d012..eead71d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,9 +194,7 @@ fi
 
 PKG_CHECK_MODULES(DBUS, dbus-1)
 PKG_CHECK_MODULES(XML2, libxml-2.0)
-if test "x$with_zypp" = "xyes"; then
    PKG_CHECK_MODULES(JSONC, json-c, [], [AC_MSG_WARN([Cannot find json-c. Please install libjson-c-devel])])
-fi
 
 AC_CHECK_HEADER(acl/libacl.h,[],[AC_MSG_ERROR([Cannout find libacl headers. Please install libacl-devel])])

But it is just a workaround, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant