I followed the http://libguestfs.org/guestfs-building.1.html to build source. git clone https://github.com/libguestfs/libguestfs cd libguestfs ./autogen.sh make I installed the lib I didn't have it and everything is ok untill I enter *make* I got error message:> CCLD libguestfs.la > ar: `u' modifier ignored since `D' is the default (see `U') > make[3]: Leaving directory '/home/pahome/git/libguestfs/lib' > make[2]: Leaving directory '/home/pahome/git/libguestfs/lib' > Making all in docs > make[2]: Entering directory '/home/pahome/git/libguestfs/docs' > make[2]: Nothing to be done for 'all'. > make[2]: Leaving directory '/home/pahome/git/libguestfs/docs' > Making all in examples > make[2]: Entering directory '/home/pahome/git/libguestfs/examples' > CCLD create-disk > ../lib/.libs/libguestfs.so: undefined reference to `yajl_tree_free' > ../lib/.libs/libguestfs.so: undefined reference to `yajl_tree_parse' > collect2: error: ld returned 1 exit status > Makefile:1926: recipe for target 'create-disk' failed > make[2]: *** [create-disk] Error 1 > make[2]: Leaving directory '/home/pahome/git/libguestfs/examples' > Makefile:1975: recipe for target 'all-recursive' failed > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory '/home/pahome/git/libguestfs' > Makefile:1884: recipe for target 'all'why is *undefined reference to 'yajl_tree_parse'*, I already install it from https://github.com/lloyd/yajl
On Tue, 2017-07-25 at 17:42 +0800, lampahome wrote:> why is undefined reference to 'yajl_tree_parse', I already install it from https://github.com/lloyd/yajlFirst thing I see is that it hasn't been installed to a place mentioned in your LD_LIBRARY_PATH, or not discovered at configure time. Since you are working on a linux machine, I guess your distro is providing the development packages for libyajl: it would be easier to install them rather than build from source. -- Cedric
I try to install like below: apt-get install libyajl2 apt-get install libyajl2-dev apt-get install libyajl2-dbg and rebuild again:> ./configure > makestill the same errors happened anyone has the same issue? 2017-07-25 18:27 GMT+08:00 Cedric Bosdonnat <cbosdonnat@suse.com>:> On Tue, 2017-07-25 at 17:42 +0800, lampahome wrote: > > why is undefined reference to 'yajl_tree_parse', I already install it > from https://github.com/lloyd/yajl > > First thing I see is that it hasn't been installed to a place mentioned in > your > LD_LIBRARY_PATH, or not discovered at configure time. Since you are > working on a > linux machine, I guess your distro is providing the development packages > for libyajl: > it would be easier to install them rather than build from source. > > -- > Cedric > >