Re: [libvirt] Compiling libvirt RPC client library for QNX

On 25/02/14 9:18 PM, "Panday Ritesh Sharma (rpanday)" <rpanday@cisco.com> wrote:
Hi Roman, Sorry !!! I did not understand "Once again, please don't top-post on technical lists."
I should not include 'libvirt-list@redhat.com' in my mail thread ?
I have already used the option '--without-libvirtd' and hence the result.
We are using a wrapper of make for compilation for QNX. So I need to know, when I am compiling this client library on linux with '--without-libvirtd' option, what all .c files and libraries are being used. Then I will take those .c files to my build environment and link that to the libraries needed. I will have to see whether those libraries are present in my QNX build environment. Please helpŠ
Regards Ritesh Sharma
On 25/02/14 8:57 PM, "Eric Blake" <eblake@redhat.com> wrote:
On 02/25/2014 08:10 AM, Panday Ritesh Sharma (rpanday) wrote:
Once again, please don't top-post on technical lists.
Hi Eric, I used the option '--without-macvtap' and I was able to compile on my linux box. When I compiled, I see many libraries are getting built. But as I have explained my requirement earlier, I just need a RPC client library, essentially the option '--with-remote'.
To build just the client library, use ./configure --without-libvirtd.
If I check .c files I see only './src/libvirt.c' and './tools/virsh.c' are the two files where '# ifdef WITH_REMOTE' is present.
Does it mean that as per my requirement I only need to compile these files?
No. You must unpack the ENTIRE tarball, and then use the configure options to control which files are built. Some of the logic on what to build is in the makefiles, and another consideration is that there are a LOT of library files that are used in both libvirt.so (your client library) and in libvirtd (the daemon executable that you are not building).
My intent is to have a library with minimal files which suffice to my requirement. Because that way it will be easier for me to compile them on QNX.
Using configure options to compile fewer files is reasonable. Omitting files from the tarball is not.
You have mentioned on another thread that in a weeks time some new version of libvirt will come which we can compile for non-linux machines ? What change is coming in that version ? The latest version of libvirt can not be compiled for QNX ?
The latest version is currently 1.2.1, but 1.2.2-rc0 was just announced and 1.2.2 is expected next week if all goes well. If you could test 1.2.2-rc0 on QNX, we can still fix issues that you turn up before 1.2.2 goes stable.
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Adding [libvirt-list] Hi Eric, This time I am writing a the bottom of this thread, is this correct ? Write way of mailing ? Could you please reply my query ? Regards Ritesh Sharma

On 02/25/2014 09:05 AM, Panday Ritesh Sharma (rpanday) wrote:
We are using a wrapper of make for compilation for QNX. So I need to know, when I am compiling this client library on linux with '--without-libvirtd' option, what all .c files and libraries are being used. Then I will take those .c files to my build environment and link that to the libraries needed. I will have to see whether those libraries are present in my QNX build environment. Please helpŠ
That feels awkward. Does QNX have a POSIX-compatible /bin/sh? If so, just unpack the tarball there, and run ./configure on your QNX machine the same way you do on Linux. I'm not personally familiar enough with QNX to know what build environment it provides. It may also be a situation where people tend to cross-compile for QNX rather than building natively. Libvirt supports cross-compilation (we build mingw client-only binaries under Fedora, so that setup could be copied for compiling client-only QNX binaries if you have a qnx cross-compiler on Linux). But at this point, you are pioneering new ground with regards to libvirt, and you will probably have to seek more help from people familiar with QNX compilation, as this list doesn't have the expertise with your system. Feel free to post build logs, and we can still try to help decipher them, but if you hit failures, you will probably have to be the one to do the legwork to resolve them.
Hi Eric, This time I am writing a the bottom of this thread, is this correct ?
Yes, thanks! -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 25/02/14 11:17 PM, "Eric Blake" <eblake@redhat.com> wrote:
On 02/25/2014 09:05 AM, Panday Ritesh Sharma (rpanday) wrote:
We are using a wrapper of make for compilation for QNX. So I need to know, when I am compiling this client library on linux with '--without-libvirtd' option, what all .c files and libraries are being used. Then I will take those .c files to my build environment and link that to the libraries needed. I will have to see whether those libraries are present in my QNX build environment. Please helpŠ
That feels awkward. Does QNX have a POSIX-compatible /bin/sh? If so, just unpack the tarball there, and run ./configure on your QNX machine the same way you do on Linux.
I'm not personally familiar enough with QNX to know what build environment it provides. It may also be a situation where people tend to cross-compile for QNX rather than building natively. Libvirt supports cross-compilation (we build mingw client-only binaries under Fedora, so that setup could be copied for compiling client-only QNX binaries if you have a qnx cross-compiler on Linux). But at this point, you are pioneering new ground with regards to libvirt, and you will probably have to seek more help from people familiar with QNX compilation, as this list doesn't have the expertise with your system. Feel free to post build logs, and we can still try to help decipher them, but if you hit failures, you will probably have to be the one to do the legwork to resolve them.
Hi Eric, This time I am writing a the bottom of this thread, is this correct ?
Yes, thanks!
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Hi Eric, Yes you are right, we cross compile for QNX. I am here in touch with my build team to find how can we use './configure' and 'make' on my compilation machine and compile these tar boll. Regards Ritesh Sharma

On 25/02/14 11:17 PM, "Eric Blake" <eblake@redhat.com> wrote:
On 02/25/2014 09:05 AM, Panday Ritesh Sharma (rpanday) wrote:
We are using a wrapper of make for compilation for QNX. So I need to know, when I am compiling this client library on linux with '--without-libvirtd' option, what all .c files and libraries are being used. Then I will take those .c files to my build environment and link that to the libraries needed. I will have to see whether those libraries are present in my QNX build environment. Please helpŠ
That feels awkward. Does QNX have a POSIX-compatible /bin/sh? If so, just unpack the tarball there, and run ./configure on your QNX machine the same way you do on Linux.
I'm not personally familiar enough with QNX to know what build environment it provides. It may also be a situation where people tend to cross-compile for QNX rather than building natively. Libvirt supports cross-compilation (we build mingw client-only binaries under Fedora, so that setup could be copied for compiling client-only QNX binaries if you have a qnx cross-compiler on Linux). But at this point, you are pioneering new ground with regards to libvirt, and you will probably have to seek more help from people familiar with QNX compilation, as this list doesn't have the expertise with your system. Feel free to post build logs, and we can still try to help decipher them, but if you hit failures, you will probably have to be the one to do the legwork to resolve them.
Hi Eric, This time I am writing a the bottom of this thread, is this correct ?
Yes, thanks!
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Hi Team, I am working here with our build infra team to get this library compiled for QNX. We will not be compiling on QNX-machine but use cross compiler. While going through 'configure' file, I realised it uses gcc compiler and links all related libraries. But here internally we use icc compiler for x86-machines. Do you have a configure file which I can use for icc i.e.; 'icc.10.2.014b'compiler ? When I tried using 'gcc.c4.2.1-p2' for trial purpose, which is available to us, I hit the error ======= checking for gnutls_handshake in -lgnutls... no configure: error: You must install the GnuTLS library in order to compile and run libvirt ====== Is there a option in 'configure' file which I can use to bypass this error ? Regards Ritesh Sharma

On 01/03/14 9:39 AM, "Panday Ritesh Sharma (rpanday)" <rpanday@cisco.com> wrote:
On 25/02/14 11:17 PM, "Eric Blake" <eblake@redhat.com> wrote:
On 02/25/2014 09:05 AM, Panday Ritesh Sharma (rpanday) wrote:
We are using a wrapper of make for compilation for QNX. So I need to know, when I am compiling this client library on linux with '--without-libvirtd' option, what all .c files and libraries are being used. Then I will take those .c files to my build environment and link that to the libraries needed. I will have to see whether those libraries are present in my QNX build environment. Please helpŠ
That feels awkward. Does QNX have a POSIX-compatible /bin/sh? If so, just unpack the tarball there, and run ./configure on your QNX machine the same way you do on Linux.
I'm not personally familiar enough with QNX to know what build environment it provides. It may also be a situation where people tend to cross-compile for QNX rather than building natively. Libvirt supports cross-compilation (we build mingw client-only binaries under Fedora, so that setup could be copied for compiling client-only QNX binaries if you have a qnx cross-compiler on Linux). But at this point, you are pioneering new ground with regards to libvirt, and you will probably have to seek more help from people familiar with QNX compilation, as this list doesn't have the expertise with your system. Feel free to post build logs, and we can still try to help decipher them, but if you hit failures, you will probably have to be the one to do the legwork to resolve them.
Hi Eric, This time I am writing a the bottom of this thread, is this correct ?
Yes, thanks!
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Hi Team, I am working here with our build infra team to get this library compiled for QNX. We will not be compiling on QNX-machine but use cross compiler.
While going through 'configure' file, I realised it uses gcc compiler and links all related libraries. But here internally we use icc compiler for x86-machines. Do you have a configure file which I can use for icc i.e.; 'icc.10.2.014b'compiler ?
When I tried using 'gcc.c4.2.1-p2' for trial purpose, which is available to us, I hit the error
======= checking for gnutls_handshake in -lgnutls... no configure: error: You must install the GnuTLS library in order to compile and run libvirt ======
Is there a option in 'configure' file which I can use to bypass this error ?
Regards Ritesh Sharma
Hi Team, Could you reply my query. Your help is much appreciated. Regards Ritesh Sharma

On Sat, Mar 01, 2014 at 04:09:00AM +0000, Panday Ritesh Sharma (rpanday) wrote:
When I tried using 'gcc.c4.2.1-p2' for trial purpose, which is available to us, I hit the error
======= checking for gnutls_handshake in -lgnutls... no configure: error: You must install the GnuTLS library in order to compile and run libvirt ======
Is there a option in 'configure' file which I can use to bypass this error ?
You can answer this yourself by looking at the "./configure --help" output which lists all possible otions. Hint --without-gnutls is what you want in this case. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 04/03/14 12:09 AM, "Daniel P. Berrange" <berrange@redhat.com> wrote:
On Sat, Mar 01, 2014 at 04:09:00AM +0000, Panday Ritesh Sharma (rpanday) wrote:
When I tried using 'gcc.c4.2.1-p2' for trial purpose, which is available to us, I hit the error
======= checking for gnutls_handshake in -lgnutls... no configure: error: You must install the GnuTLS library in order to compile and run libvirt ======
Is there a option in 'configure' file which I can use to bypass this error ?
You can answer this yourself by looking at the "./configure --help" output which lists all possible otions. Hint --without-gnutls is what you want in this case.
Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Hi Daniel, IS there a configure file which can be used for 'icc' compiler, or the same configure file I need to modify and use for 'icc' ? This library is ever compiled with 'icc' compiler ? For the sake of compilation if I use '--without-gnutls' and '--without-macvtap' what will be it's impact ? I mean, will I be able to use the libvirt RPC client library ? Regards Ritesh Sharma

On Mon, Mar 03, 2014 at 06:49:25PM +0000, Panday Ritesh Sharma (rpanday) wrote:
On 04/03/14 12:09 AM, "Daniel P. Berrange" <berrange@redhat.com> wrote:
On Sat, Mar 01, 2014 at 04:09:00AM +0000, Panday Ritesh Sharma (rpanday) wrote:
When I tried using 'gcc.c4.2.1-p2' for trial purpose, which is available to us, I hit the error
======= checking for gnutls_handshake in -lgnutls... no configure: error: You must install the GnuTLS library in order to compile and run libvirt ======
Is there a option in 'configure' file which I can use to bypass this error ?
You can answer this yourself by looking at the "./configure --help" output which lists all possible otions. Hint --without-gnutls is what you want in this case.
Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Hi Daniel, IS there a configure file which can be used for 'icc' compiler, or the same configure file I need to modify and use for 'icc' ?
Just set the CC environment variable eg export CC=icc
This library is ever compiled with 'icc' compiler ?
I've tried it once in the past, but not for many years. It should mostly work since icc claims strong compatibility with gcc.
For the sake of compilation if I use '--without-gnutls' and '--without-macvtap' what will be it's impact ? I mean, will I be able to use the libvirt RPC client library ?
GNUTLS is used to provide TLS encryption for libvirtd TCP sockets. Libvirt can alternatively use cyrus-sasl for Kerberos based encryption and authentication. Failing that you'd have to use an SSH tunnel to access the libvirt RPC API remotely. macvtap has no impact on the client library. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 02/28/2014 09:09 PM, Panday Ritesh Sharma (rpanday) wrote:
While going through 'configure' file, I realised it uses gcc compiler and links all related libraries. But here internally we use icc compiler for x86-machines. Do you have a configure file which I can use for icc i.e.; 'icc.10.2.014b'compiler ?
The 'configure' file defaults to using gcc when compiling natively, but is already generic enough to support any compiler, native or cross. All you have to do is tell configure what it needs to know: ./configure --build=$(build-aux/config.guess) \ --host=$FIXME CC=icc.10.2.014b where you replace $FIXME with the proper target triple of your QNX machine (I honestly don't know what that would be, and a quick read through build-aux/config.sub which lists all canonical target triples didn't make it obvious to me). It sounds like you are brand new to cross-compiling code that follows GNU Coding Standards. If so, I'd highly suggest that you FIRST try something MUCH simpler, like cross-compiling GNU Hello[1] using the same arguments to that project's configure. Once you get a simple binary cross-compiling with correct --build, --host, and CC= arguments, then you can use the same arguments on any other project (including libvirt) where ./configure follows GNU Coding Standards. And as this list is not full of people with QNX experience, you may have better luck looking elsewhere for people who DO know how to cross-compile to QNX, even if what they compile is not libvirt, to at least learn the basics of setting up a successful cross-compile for your platform. [1]https://www.gnu.org/software/hello/ -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Daniel P. Berrange
-
Eric Blake
-
Panday Ritesh Sharma (rpanday)