Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux package repositories #336

Closed
mia-0 opened this issue Jul 17, 2017 · 36 comments
Closed

Linux package repositories #336

mia-0 opened this issue Jul 17, 2017 · 36 comments

Comments

@mia-0
Copy link
Collaborator

mia-0 commented Jul 17, 2017

Just wanted to let you know that I’m maintaining packages for Debian 9.0 (Stretch), Fedora 26 and Rawhide, openSUSE Leap 42.1/42.2/42.3 and Tumbleweed (including ARM/PPC), as well as Ubuntu 17.04 and AppImages for all the other distros at openSUSE’s Open Build Service:

https://software.opensuse.org//download.html?project=home%3Alachs0r%3Amandelbulber2&package=mandelbulber2

AppImages are here (including zsync files for delta updates): http://download.opensuse.org/repositories/home:/lachs0r:/mandelbulber2/AppImage/

These are packages of the latest release, including OpenCL support. Feel free to link to these builds; I will keep them up to date.

@ghost
Copy link

ghost commented Jul 18, 2017

muchos gracias!

@ghost
Copy link

ghost commented Jul 18, 2017

Please provide additional engineering documentation for review.
Do you have any scripts or files worth adding to repo for these build configs?
Please explain like I am 5 years old, the opensuse build architecture, I am unfamiliar and request full reasoning.

@ghost ghost self-assigned this Jul 18, 2017
@ghost ghost added this to the 2.16 milestone Jul 18, 2017
@mia-0
Copy link
Collaborator Author

mia-0 commented Jul 18, 2017 via email

@ghost
Copy link

ghost commented Jul 18, 2017

Great insight, the snapshot CI sounds useful. Would you like to modify the cmake file and become a contributor?

@mia-0
Copy link
Collaborator Author

mia-0 commented Jul 18, 2017

Yeah, I’ll look into it. Shouldn’t be too hard to fix.

@ghost
Copy link

ghost commented Jul 19, 2017

Looking forward to your pull request. Thanks!

@probonopd
Copy link
Contributor

Great job on building AppImages on OBS! 👍

Minor issue, I am getting

Error: Can't open file /usr/share/mandelbulber2/formula/ui/fractal_mandelbulb.ui
Fractal ui file can't be loaded

/usr is not where things are in an AppImage. Hence the application should, rather than trying to load things from /usr, try to load things from "relative to itself". Let me know if you need help on doing this in Qt.

@mia-0
Copy link
Collaborator Author

mia-0 commented Jul 24, 2017

Thanks for making it possible!
Yeah, I’ve noticed this with other applications. I didn’t get around to working on the build system yet, but I’ll do that later today, and fix this in the process.

@zebastian
Copy link
Collaborator

@probonopd
we determine the shareddir in the following way:

#ifdef _WIN32 /* WINDOWS */
	systemData.sharedDir = QDir::toNativeSeparators(QDir::currentPath() + QDir::separator());
#else
	systemData.sharedDir = QDir::toNativeSeparators(QString(SHARED_DIR) + QDir::separator());
#endif /* WINDOWS */

see usage in https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/src/system.cpp

When we can determine this path with appimages somewhere else it should be fine. We only need to make sure, that it will still be compatible with windows, osx, and simple installed version under linux.

@probonopd
Copy link
Contributor

You need to make the path relative to the running executable, e.g., using QCoreApplication::applicationDirPath(). See http://archives.seul.org/tor/cvs/Mar-2012/msg00886.html for an example.

@zebastian
Copy link
Collaborator

hmm, is there no dedicated path for the shared data of the program?
Some kind of environment variable, or pragma compiled into the AppImage?
Seems unusable to expect the data just relative to the location of the executed binary...

@mia-0
Copy link
Collaborator Author

mia-0 commented Jul 24, 2017

But that’s how it usually works—even outside AppImage usage. Think of relocating a program to a different prefix.

@probonopd
Copy link
Contributor

probonopd commented Jul 24, 2017

If you use QCoreApplication::applicationDirPath() then it will work for all Linux builds, regardless of whether it is for an AppImage or not.

Based from QCoreApplication::applicationDirPath() you can of course add a relative path for the shared data of the program, e.g., assuming that the application is in bin, it could be something like (pseudeo-code!) QCoreApplication::applicationDirPath() (operator) ../share/mandebulber2.

@ghost
Copy link

ghost commented Jul 24, 2017

In my opinion, reworking the share data folder to relative path improves portability of the system, increasing quality. @buddhi you are designer, what are your thoughts?

@zebastian
Copy link
Collaborator

I just read into the topic of AppImages, nice solution to get "batteries included" binaries. This will be great to incorporate in our travis file!

The relative directory solution is IMHO error prone to use for all linux compiling.
In general it should be /usr/bin/[application] and /usr/share/[application]/stuff, but the binary may be located somewhere else, maybe /usr/local/bin/[application] which will break with the relative approach.

How about we introduce a new pragma to the code (SHARED_DIR_IS_APP_DIR)? When this is set (when compiling for AppImage we can give it as a CLI argument) we will use the relative approach, otherwise we will use the default behaviour.

@ghost
Copy link

ghost commented Jul 25, 2017

I like the idea of a pragmatic, but is it required to select one or the other alternative? Can we support both alternatives with the same binary?

is it possible to scan for shared files in multiple locations, then support both relative and standardized locals?

@probonopd
Copy link
Contributor

Sure: check the path(s) relative to the application first, and if they don't exist, fall back to hardcoded absolute paths.

@buddhi1980
Copy link
Owner

@probonopd , this solution need many changes in the code. It's is good idea and doable, but now I have another priorities (OpenCL)

For short therm solution I like proposal of @zebastian to define new makro SHARED_DIR_IS_APP_DIR which could do the same as for WIN32
(systemData.sharedDir = QDir::toNativeSeparators(QDir::currentPath() + QDir::separator());)

zebastian added a commit that referenced this issue Jul 25, 2017
allows shared data at the same location as the apllication, when defined
at compile time, this can be used for AppImage packaging, see also:

#336
@zebastian
Copy link
Collaborator

@buddhi1980 @probonopd just added a commit, which enables the pragma: e1ba399
@probonopd When you now compile with -DSHARED_DIR_IS_APP_DIR you should be able to package with AppImages. Please let me know, if you run into any problems.

Thanks for your engagement!

@probonopd
Copy link
Contributor

@lachs0r can you add that to your OBS appimage.yml please?

@mia-0
Copy link
Collaborator Author

mia-0 commented Jul 25, 2017 via email

@mia-0
Copy link
Collaborator Author

mia-0 commented Jul 25, 2017 via email

@zebastian zebastian modified the milestones: 2.12, 2.16 Jul 25, 2017
@zebastian
Copy link
Collaborator

zebastian commented Jul 25, 2017

I just tried the installation from here:
https://software.opensuse.org//download.html?project=home%3Alachs0r%3Amandelbulber2&package=mandelbulber2
which ran fine, when i then try to execute mandelbulber i get the following issue:

mandelbulber2: /usr/lib/x86_64-linux-gnu/libQt5Multimedia.so.5: version `Qt_5' not found (required by mandelbulber2)
mandelbulber2: /usr/lib/x86_64-linux-gnu/libQt5Test.so.5: version `Qt_5' not found (required by mandelbulber2)
mandelbulber2: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version `Qt_5' not found (required by mandelbulber2)
mandelbulber2: /usr/lib/x86_64-linux-gnu/libQt5Network.so.5: version `Qt_5' not found (required by mandelbulber2)
mandelbulber2: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by mandelbulber2)
mandelbulber2: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.7' not found (required by mandelbulber2)
mandelbulber2: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by mandelbulber2)

I am still running 16.04, which may cause this, but i think this comes due to unreferenced dependencies. Anyway i am just upgrading the OS and will retry after completion.

@probonopd
Copy link
Contributor

@zebastian please try the AppImage, it bundles the required subset of Qt and should therefore run on your system.

@zebastian
Copy link
Collaborator

@probonopd thanks, appimage runs.
Only thing missing are a couple of icons, which are part of the theme (but these are also bundled as a fallback for windows)

@probonopd
Copy link
Contributor

Can you please post a screenshot? Thanks @zebastian

@mia-0
Copy link
Collaborator Author

mia-0 commented Jul 25, 2017

Might have to add an icon theme to the ingredients then.

Also, we’re getting build failures on newer distros:

[   89s] /home/abuild/rpmbuild/BUILD/mandelbulber2-2.12alpha5+20170725.g4e35c973/mandelbulber2/src/test.hpp:50:82: error: could not convert 'false' from 'bool' to 'QString'
[   89s]   Test(enumTestMode _testMode, int _difficulty = 10, QString _exampleOutputPath = false)
[   89s]                                                                                   ^~~~~
[   90s] /home/abuild/rpmbuild/BUILD/mandelbulber2-2.12alpha5+20170725.g4e35c973/mandelbulber2/src/command_line_interface.cpp: In member function 'void cCommandLineInterface::runTestCasesAndExit() const':
[   90s] /home/abuild/rpmbuild/BUILD/mandelbulber2-2.12alpha5+20170725.g4e35c973/mandelbulber2/src/command_line_interface.cpp:522:32: error: could not convert 'false' from 'bool' to 'QString'
[   90s]   Test test(Test::simpleTestMode);
[   90s]                                 ^

@zebastian
Copy link
Collaborator

Sure, some missing locations marked in red:
appimages-missing-icons

@lachs0r I just introduced an issue, which i solved with the latest commit, should be compilable now with latest master

@zebastian
Copy link
Collaborator

@lachs0r Can you fix the icon issue? Do you need something from us to fix this?

@zebastian zebastian modified the milestones: 2.13, 2.12 Aug 12, 2017
@mia-0
Copy link
Collaborator Author

mia-0 commented Aug 15, 2017

See AppImageCommunity/pkg2appimage#88. Qt is unable to select the correct theme, hence you don’t see any theme icons. There’s a workaround though (packaging Oxygen icons and moving them to the “hicolor” icon theme directory, which is the default fallback). Latest AppImages should “work”.

@zebastian
Copy link
Collaborator

thanks, looks good now.
But I dont understand, why there are missing in the first place. In windows there is no matching theme either, this is why we have all used tango items bundled with the application and use these svg icons as a fallbak for each icon usage, see here for example: https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/qt/dock_queue.ui#L47
I would have thought, if the application cannot determine the icons for the correct theme it would always fallback to these icons.

@ghost
Copy link

ghost commented Aug 21, 2017

@lachs0r @zebastian
I remember icons were broken in windows build for a minute.
Had to include $(QtDir)\plugins\iconengines
Hope this helps!
https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/msvc/mandelbulber2_autogen.vcxproj#L321

@buddhi1980
Copy link
Owner

It was missing only in msvc build. In mingw build it was already included.

@ghost
Copy link

ghost commented Aug 21, 2017

sounds right, btw msvc build needs updated to 2017.
still working on gsl nuget for 2017

ghost referenced this issue Sep 15, 2017
Make it comply with *nix conventions and allow relative data path,
e.g. for AppImage and Windows builds.
Avoid having symlinks in the repository. CMake does not follow them
and they’re poorly supported on Windows.
@ghost ghost closed this as completed Sep 15, 2017
@ghost
Copy link

ghost commented Oct 3, 2017

Hi lachs0r, (or anyone)
I Installed mandelbulber2_2.12alpha61 from the OpenSuse Ubuntu page. When I check 'About Mandelbulber' it says 'Mandelbulber 2.11'. I saw the same thing when I compiled from source so it's not the package build. The 2.12 version has OpenCL so I'm happy with that and this is not a bug.
Anyone else seeing this inherited version number?

@buddhi1980
Copy link
Owner

Internal version number was changed in 2.12 alpha7. It's still version for developers and testers so many things can be wrong.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants