[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Automagically check if libssh2 is new enough for Phyp-support to be build



Daniel Veillard wrote:
On Tue, Sep 08, 2009 at 12:24:08PM +0200, Maximilian Wilhelm wrote:
Anno domini 2009 Maximilian Wilhelm scripsit:

Hi!

My buildbot spotted a problem with the latest changes to Phyp, as the
function libssh2_session_block_directions() only is available with
libssh2 version 1.0 and later.
At least on Debian Lenny there is an older one which prevents libVirt
from building, so I updated the configure.in script to add another
piece of magic (and thereby fixed the indenation of the Phypchecks).
See attached patch.
Nobody interested?

  Yeah, I wanted to look at it but got sidetracked ...
Small problem, with the patch it fails for me even with
libssh2-devel-1.0-2.fc11
from config.log:

configure:44489: checking for libssh2_session_startup in -lssh2
configure:44524: gcc -o conftest -g -O2   conftest.c -lssh2  -lpthread
&5
configure:44531: $? = 0
configure:44552: result: yes
configure:44572: checking for libssh2.h
configure:44594: gcc -c -g -O2  conftest.c >&5
configure:44601: $? = 0
configure:44618: result: yes
configure:44666: gcc -o conftest -g -O2   conftest.c -lpthread  >&5
/tmp/ccAcKiEO.o: In function `main':
/u/veillard/libvirt/conftest.c:214: undefined reference to
`libssh2_session_block_directions'
collect2: ld returned 1 exit status

  the problem is taht -lssh2 is not passed to the linker so I guess
this would always fail :-)

Somehow the AC_TRY_LINK should get the flags but it doesn't ...

+    if test "$with_phyp" != "no"; then
+        AC_TRY_LINK([#include <libssh2.h>], [
+            (void) libssh2_session_block_directions(NULL);
+        ], [
+            AC_DEFINE_UNQUOTED([WITH_PHYP], 1, [whether IBM HMC / IVM
driver is enabled])
+        ], [

I you know how to fix this :-)

F10 is currently experiencing a build failure related to this function.

Configured as:

sh autogen.sh --enable-debug=yes --enable-compile-warnings=error --prefix=/

I get:

  CC     libvirt_driver_phyp_la-phyp_driver.lo
cc1: warnings being treated as errors
phyp/phyp_driver.c: In function 'waitsocket':
phyp/phyp_driver.c:1478: error: implicit declaration of function 'libssh2_session_block_directions' phyp/phyp_driver.c:1478: error: nested extern declaration of 'libssh2_session_block_directions' phyp/phyp_driver.c:1480: error: 'LIBSSH2_SESSION_BLOCK_INBOUND' undeclared (first use in this function) phyp/phyp_driver.c:1480: error: (Each undeclared identifier is reported only once
phyp/phyp_driver.c:1480: error: for each function it appears in.)
phyp/phyp_driver.c:1483: error: 'LIBSSH2_SESSION_BLOCK_OUTBOUND' undeclared (first use in this function)
make[3]: *** [libvirt_driver_phyp_la-phyp_driver.lo] Error 1
make[3]: Leaving directory `/root/libvirt/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/libvirt/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/libvirt'
make: *** [all] Error 2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]