[libvirt] [PATCH] vz: build fix for virStorageBackendVzPoolStart

Nikolay Shirokovskiy posted 1 patch 5 years, 1 month ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1550570223-32802-1-git-send-email-nshirokovskiy@virtuozzo.com
src/storage/storage_backend_vstorage.c | 1 -
1 file changed, 1 deletion(-)
[libvirt] [PATCH] vz: build fix for virStorageBackendVzPoolStart
Posted by Nikolay Shirokovskiy 5 years, 1 month ago
Remove unused variable. Fix for [1]

[1] 821dd6d8: storage: Use VIR_AUTOFREE for storage backends

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
---

Pushed as trivial build fix.

 src/storage/storage_backend_vstorage.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/storage/storage_backend_vstorage.c b/src/storage/storage_backend_vstorage.c
index df157a4..d446aa2 100644
--- a/src/storage/storage_backend_vstorage.c
+++ b/src/storage/storage_backend_vstorage.c
@@ -37,7 +37,6 @@ virStorageBackendVzPoolBuild(virStoragePoolObjPtr pool,
 static int
 virStorageBackendVzPoolStart(virStoragePoolObjPtr pool)
 {
-    int ret = -1;
     virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
     VIR_AUTOFREE(char *) grp_name = NULL;
     VIR_AUTOFREE(char *) usr_name = NULL;
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: build fix for virStorageBackendVzPoolStart
Posted by Eric Blake 5 years, 1 month ago
On 2/19/19 3:57 AM, Nikolay Shirokovskiy wrote:
> Remove unused variable. Fix for [1]
> 
> [1] 821dd6d8: storage: Use VIR_AUTOFREE for storage backends
> 
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
> ---
> 
> Pushed as trivial build fix.

I'm trying to get a working build of src/vz/ on my system, to make sure
I don't cause similar types of build-breakage.  What is the process for
getting PARALLELS_SDK installed on Fedora 29?

I found: https://src.openvz.org/projects/OVZ/repos/libprlsdk/browse

which mentions libprlcommon, libprlxmlmodel, and libprlsdk, but the
latest git builds for those three projects is failing for me:

$ export SDK_HEADERS=~/libprlsdk/Sources
$ cd libprlsdk
$ make
...
Project MESSAGE: ContextSwitcher
/home/eblake/libprlsdk/Sources/Libraries/ContextSwitcher/ContextSwitcher.pro
-> prl_sdk
Project ERROR: Please install libprlcommon-devel package
$ cd ../libprlcommon
$ make
...
make[2]: Entering directory '/home/eblake/libprlcommon/Libraries/OpenSSL'
g++ -c -pipe -fno-strict-aliasing -frandom-seed=parallels -MD -MP
-Werror -O2 -g -D_REENTRANT -Wall -W -fPIC -D_LIN_=1 -D_RELEASE
-D_FILE_OFFSET_BITS=64 -D_LIN_ -D_TARGET_=OpenSSL_init_helper -DNDEBUG=1
-DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED
-I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore
-I/usr/include -I. -I../../../libprlcommon -I../../Interfaces
-I../../../libprlsdk/Sources
-I../../z-Build/Release/.moc/OpenSSL_init_helper -o
../../z-Build/Release/.obj/OpenSSL_init_helper/OpenSSL.o OpenSSL.cpp
OpenSSL.cpp: In function ‘void OpenSSL::__freeSSL()’:
OpenSSL.cpp:83:3: error: ‘CRYPTO_mem_leaks_fp’ was not declared in this
scope
   CRYPTO_mem_leaks_fp(stderr);
   ^~~~~~~~~~~~~~~~~~~
...
$ cd ../libprlxmlmodel
$ make
...
g++ -c -pipe -fno-strict-aliasing -frandom-seed=parallels -MD -MP
-Werror -O2 -g -Wall -W -D_REENTRANT -DPRL_PROD_SERVER=1 -D_LIN_
-D_LIN_=1 -D_RELEASE -D_FILE_OFFSET_BITS=64 -D_TARGET_=xsd2src
-DNDEBUG=1 -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore
-I/usr/include/QtXml -I/usr/include -I. -I../../../libprlxmlmodel
-I../../z-Build/Release/.moc/xsd2src -o
../../z-Build/Release/.obj/xsd2src/main.o main.cpp
In file included from CodeComposer.h:33,
                 from main.cpp:27:
CodeTemplates.h:96:2: error: invalid suffix on literal; C++11 requires a
space between literal and string macro [-Werror=literal-suffix]
  " public "DEFAULT_BASE_CLASS"\n"
  ^
...


Is there a pre-built repository of the library that would be sufficient
for building libvirt against, instead of me having to build my own copies?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: build fix for virStorageBackendVzPoolStart
Posted by Nikolay Shirokovskiy 5 years ago

On 15.03.2019 23:02, Eric Blake wrote:
> On 2/19/19 3:57 AM, Nikolay Shirokovskiy wrote:
>> Remove unused variable. Fix for [1]
>>
>> [1] 821dd6d8: storage: Use VIR_AUTOFREE for storage backends
>>
>> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
>> ---
>>
>> Pushed as trivial build fix.
> 
> I'm trying to get a working build of src/vz/ on my system, to make sure
> I don't cause similar types of build-breakage.  What is the process for
> getting PARALLELS_SDK installed on Fedora 29?

Hi, Erik! 

We don't test our package builds on anything except our own Centos7 
based distributive. So I think it would be best if one installs Virtuozzo
for build tests or try to use packages from official repo:

http://repo.virtuozzo.com/vz/releases/

I hope one day I help to include builds on Virtuozzo in CI. Until
that I can help to check builds by myself if you add me to CC or
use 'vz: ' in subject.

Nikolay

> 
> I found: https://src.openvz.org/projects/OVZ/repos/libprlsdk/browse
> 
> which mentions libprlcommon, libprlxmlmodel, and libprlsdk, but the
> latest git builds for those three projects is failing for me:
> 
> $ export SDK_HEADERS=~/libprlsdk/Sources
> $ cd libprlsdk
> $ make
> ...
> Project MESSAGE: ContextSwitcher
> /home/eblake/libprlsdk/Sources/Libraries/ContextSwitcher/ContextSwitcher.pro
> -> prl_sdk
> Project ERROR: Please install libprlcommon-devel package
> $ cd ../libprlcommon
> $ make
> ...
> make[2]: Entering directory '/home/eblake/libprlcommon/Libraries/OpenSSL'
> g++ -c -pipe -fno-strict-aliasing -frandom-seed=parallels -MD -MP
> -Werror -O2 -g -D_REENTRANT -Wall -W -fPIC -D_LIN_=1 -D_RELEASE
> -D_FILE_OFFSET_BITS=64 -D_LIN_ -D_TARGET_=OpenSSL_init_helper -DNDEBUG=1
> -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED
> -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore
> -I/usr/include -I. -I../../../libprlcommon -I../../Interfaces
> -I../../../libprlsdk/Sources
> -I../../z-Build/Release/.moc/OpenSSL_init_helper -o
> ../../z-Build/Release/.obj/OpenSSL_init_helper/OpenSSL.o OpenSSL.cpp
> OpenSSL.cpp: In function ‘void OpenSSL::__freeSSL()’:
> OpenSSL.cpp:83:3: error: ‘CRYPTO_mem_leaks_fp’ was not declared in this
> scope
>    CRYPTO_mem_leaks_fp(stderr);
>    ^~~~~~~~~~~~~~~~~~~
> ...
> $ cd ../libprlxmlmodel
> $ make
> ...
> g++ -c -pipe -fno-strict-aliasing -frandom-seed=parallels -MD -MP
> -Werror -O2 -g -Wall -W -D_REENTRANT -DPRL_PROD_SERVER=1 -D_LIN_
> -D_LIN_=1 -D_RELEASE -D_FILE_OFFSET_BITS=64 -D_TARGET_=xsd2src
> -DNDEBUG=1 -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED
> -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore
> -I/usr/include/QtXml -I/usr/include -I. -I../../../libprlxmlmodel
> -I../../z-Build/Release/.moc/xsd2src -o
> ../../z-Build/Release/.obj/xsd2src/main.o main.cpp
> In file included from CodeComposer.h:33,
>                  from main.cpp:27:
> CodeTemplates.h:96:2: error: invalid suffix on literal; C++11 requires a
> space between literal and string macro [-Werror=literal-suffix]
>   " public "DEFAULT_BASE_CLASS"\n"
>   ^
> ...
> 
> 
> Is there a pre-built repository of the library that would be sufficient
> for building libvirt against, instead of me having to build my own copies?
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: build fix for virStorageBackendVzPoolStart
Posted by Eric Blake 5 years ago
On 3/18/19 2:27 AM, Nikolay Shirokovskiy wrote:

>> I'm trying to get a working build of src/vz/ on my system, to make sure
>> I don't cause similar types of build-breakage.  What is the process for
>> getting PARALLELS_SDK installed on Fedora 29?
> 
> Hi, Erik! 
> 
> We don't test our package builds on anything except our own Centos7 
> based distributive. So I think it would be best if one installs Virtuozzo
> for build tests or try to use packages from official repo:
> 
> http://repo.virtuozzo.com/vz/releases/

I tried creating /etc/yum.repos.d/virtuozzo.repo with:

[virtuozzo]
name=Virtuozzo repo
baseurl=http://repo.virtuozzo.com/vz/releases/7.0/$basearch/os
skip_if_unavailable=True
repo_gpgcheck=0
enabled=1
enabled_metadata=1

(hmm, your site doesn't allow https://, are you worried about MitM attacks?)

but on Fedora 29, it fails:

 Problem: package libprlsdk-devel-7.0.226-2.vz7.x86_64 requires
libprlsdk = 7.0.226-2.vz7, but none of the providers can be installed
  - package libprlsdk-devel-7.0.226-2.vz7.x86_64 requires
libprl_sdk.so.7()(64bit), but none of the providers can be installed
  - conflicting requests
  - nothing provides libboost_filesystem-mt.so.1.53.0()(64bit) needed by
libprlsdk-7.0.226-2.vz7.x86_64
  - nothing provides libboost_system-mt.so.1.53.0()(64bit) needed by
libprlsdk-7.0.226-2.vz7.x86_64

I'm wondering if I can force the -devel files to install even without
the shared-lib .so files (so that I can work around Fedora not having
the same boost .so files as your modified CentOS 7 starting point), if
only to get compilation working.

> 
> I hope one day I help to include builds on Virtuozzo in CI. Until
> that I can help to check builds by myself if you add me to CC or
> use 'vz: ' in subject.

Well, there's more coming, as I refactor snapshots to make it possible
to share code with checkpoints.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: build fix for virStorageBackendVzPoolStart
Posted by Andrea Bolognani 5 years ago
On Mon, 2019-03-18 at 07:27 +0000, Nikolay Shirokovskiy wrote:
> On 15.03.2019 23:02, Eric Blake wrote:
> > I'm trying to get a working build of src/vz/ on my system, to make sure
> > I don't cause similar types of build-breakage.  What is the process for
> > getting PARALLELS_SDK installed on Fedora 29?
> 
> Hi, Erik!
> 
> We don't test our package builds on anything except our own Centos7
> based distributive. So I think it would be best if one installs Virtuozzo
> for build tests or try to use packages from official repo:
> 
> http://repo.virtuozzo.com/vz/releases/
> 
> I hope one day I help to include builds on Virtuozzo in CI. Until
> that I can help to check builds by myself if you add me to CC or
> use 'vz: ' in subject.

FYI, up until now we have resisted installing packages from third
party repositories (including EPEL) on our CI workers.

I'm not saying this policy can't be challenged, just trying to set
your expectations right :)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list