backbuffer.h from zipios++ and problems

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

backbuffer.h from zipios++ and problems

Post by PrzemoF »

Recent commit 1789c95 is causing problems on fedora builds. Not sure how's that on other linux distros, but the file backbuffer.h is not directly available on fedora. I'm trying to find out if that's a fedora problem or the file should not be used directly.

Any advice would be appreciated.

commit 1789c957df9da486043cd211e723c6fbc060f236
Author: wmayer <wmayer@users.sourceforge.net>
Date: Mon Sep 5 18:53:37 2022 +0200

P.S. Looks like it's OK on ubuntu, so it might be a fedora problem
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: backbuffer.h from zipios++ and problems

Post by onekk »

PrzemoF wrote: Mon Sep 19, 2022 8:36 pm ...
I know that developers are clever, but:

- Are you compiling from source ?
- what version of library are you using?

backbuffer.hpp is present in the source code (hoping the page is correct).

https://github.com/Zipios/Zipios

But as the library as some different versions, according to:

https://zipios.sourceforge.io/

I don't know old versions, (I'm using Arch Linux and there are even the 0.1.5.9 from 2007).

Github page contains some informations about requisites to compile the library, maybe it will be helpful, maybe not.

This could be a common problem, as example in Debian derivatives, "big packages" are divided in "library" and "library-dev" parts, and sometimes even in "library-doc", or "library-dev" is splitted in two or many packages for some reason (good or bad I can't judge).

Fedora is know to be "conservative" about library versions, so probably some library is not "up to date" and is using an "old version", or maybe some development library are not installed.

Probably suppling some version data about what library you are using could help developers to supply some more "centered" advices.

Hope it helps.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: backbuffer.h from zipios++ and problems

Post by wmayer »

PrzemoF wrote: Mon Sep 19, 2022 8:36 pm Recent commit 1789c95 is causing problems on fedora builds.
Does it work for you if you drop this line

Code: Select all

#include <zipios++/backbuffer.h>
from ZipHeader.h?

If fedora doesn't provide this file where is the class zipios::BackBuffer declared, then?
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: backbuffer.h from zipios++ and problems

Post by PrzemoF »

Compilation from spec ffile, the rest packaged. Build log: https://download.copr.fedorainfracloud. ... ive.log.gz

zipios++ x86_64 0.1.5.9-28.fc36

I'm testing the build without the backbuffer.h. The file is on the source, but it's not packaged into zipios++-devel for some reason.

The https://github.com/Zipios/Zipios contains backbuffer.hpp, FreeCAD needs backbuffer.h

I'm testing bundled zipios++ for now. It starts to look like a fedora packaging error.
mr-miky
Posts: 13
Joined: Sat Sep 28, 2019 1:16 pm

Re: backbuffer.h from zipios++ and problems

Post by mr-miky »

The easiest thing to do is to use the zipios++ that is already in the source.
Just pass the right parameter to rpmbuil or mock

From specs file:

Code: Select all

 rpmbuild --with=bundled_zipios: use bundled version of zipios++
In the latest versions of freecad you have to add to freecad.specs :

PathApp

Code: Select all

# Maintainers:  keep this list of plugins up to date
# List plugins in %%{_libdir}/%{name}/lib, less '.so' and 'Gui.so', here
%global plugins Fem FreeCAD .... PathApp 
and qt5-qtwebengine-devel

Code: Select all

BuildRequires:  qt5-qtwebengine-devel
Then if we want to use a dirty trick we can force internal zipios++

Code: Select all

%global bundled_zipios %{?_with_bundled_zipios: 1} %{?!_with_bundled_zipios: 1}
With these changes I made the build of freecad-0.21-pre_30890.fc36.x86_64
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: backbuffer.h from zipios++ and problems

Post by PrzemoF »

Thank ypu! I'll be back home next week and then I'll test it.
mr-miky
Posts: 13
Joined: Sat Sep 28, 2019 1:16 pm

Re: backbuffer.h from zipios++ and problems

Post by mr-miky »

However, not only backbuffer.h is missing, but also zipios_common.h.
I have re builded zipios++0.1.5.9-28.fc36.x86_64 copying the missing files from src in zipios++ and adding them to the makefie as well.
This way I can use zipio++ external of fedora 36 but it is certainly not the best way
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: backbuffer.h from zipios++ and problems

Post by PrzemoF »

Can you post the spec file you used? I want to take credit for your work :D
mr-miky
Posts: 13
Joined: Sat Sep 28, 2019 1:16 pm

Re: backbuffer.h from zipios++ and problems

Post by mr-miky »

to be able to build in fedora 37 you need to further modify the SPEC file as follows:

Code: Select all

%if 0%{?fedora} < 37
BuildRequires:  libusb-devel
%else
BuildRequires:  libusb1-devel
%endif
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: backbuffer.h from zipios++ and problems

Post by PrzemoF »

Nope, still zipios header missing. https://copr.fedorainfracloud.org/coprs ... d/5079489/
Even after forcing the built-in zipios. Unless the forcing didn't work for COPR...
That's the spce file: https://github.com/PrzemoF/FreeCAD/blob ... eecad.spec
Can you compare it with your please?
Post Reply