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

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. Ciao Max -- "really soon now": an unspecified period of time, likly to be greater than any reasonable definition of "soon".

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? Ciao Max -- Träume nicht von Dein Leben: Lebe Deinen Traum!

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 :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

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

On Fri, Sep 04, 2009 at 02:45:57PM +0200, Maximilian Wilhelm wrote:
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.
Okay I revamped the patch a bit to set LIBS with -lssh2 before trying to link, that seems to fix the problem I was having with your patch, applied and commited. Dave could you double check on your F10 setup ? Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

Daniel Veillard wrote:
On Fri, Sep 04, 2009 at 02:45:57PM +0200, Maximilian Wilhelm wrote:
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.
Okay I revamped the patch a bit to set LIBS with -lssh2 before trying to link, that seems to fix the problem I was having with your patch,
applied and commited. Dave could you double check on your F10 setup ?
Builds fine on F10 now. Dave

Anno domini 2009 Daniel Veillard scripsit:
On Fri, Sep 04, 2009 at 02:45:57PM +0200, Maximilian Wilhelm wrote:
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.
Okay I revamped the patch a bit to set LIBS with -lssh2 before trying to link, that seems to fix the problem I was having with your patch,
Oh cool, so I can remove this from my todo list and enjoy my vacation ;) Thanks! Ciao Max -- Friends are relatives you make for yourself.
participants (3)
-
Daniel Veillard
-
Dave Allan
-
Maximilian Wilhelm