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

Can't compile & package on Manjaro Linux #10

Open
FabioLolix opened this issue Feb 9, 2021 · 10 comments
Open

Can't compile & package on Manjaro Linux #10

FabioLolix opened this issue Feb 9, 2021 · 10 comments

Comments

@FabioLolix
Copy link

Hello, I'm an AUR (Arch User Repository) packager and I have tried to package Sky but fails, Linux instructions seems Ubuntu specific

  • from 3rdparty.sh
if [ $1 = "all" -o $1 = "install" ]; then

    if [ $linux = true ]; then

        echo "INSTALLING X11"

        sudo apt-get install -y $X11_linux
  • from configure.sh
* # Linux

include32="/usr/include/i386-linux-gnu"
include64="/usr/include/x86_64-linux-gnu"

Qt5_version_linux="5.9.5"

The pkgbuild can be seen here https://github.com/FabioLolix/PKGBUILD-AUR_fix/blob/master/zz_wip_and_test/sky/PKGBUILD

$ LANG=C makepkg
==> Making package: sky 1.6.0-1 (mar 9 feb 2021, 20:56:35)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found sky-1.6.0.tar.gz
==> Validating source files with sha256sums...
    sky-1.6.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting sky-1.6.0.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
COPYING Qt
cp: cannot stat '/usr/include/i386-linux-gnu/qt5/QtCore': No such file or directory
==> ERROR: A failure occurred in build().
    Aborting...
@3unjee
Copy link
Member

3unjee commented Feb 10, 2021

Yes the 3rdparty/install.sh is currently designed with Ubuntu in mind. What version of Arch are you using ?

Thank you for reporting this.

@3unjee
Copy link
Member

3unjee commented Feb 10, 2021

Okay @FabioLolix, so I browsed this a little bit too quickly this morning...

In order to configure and build Sky you need the 3rdparty dependency, the quickest way to retrieve it and build everything would be the following:
sh build.sh linux all

@G-P-L
Copy link

G-P-L commented Feb 21, 2021

Hi everyone!

Now I had some time going after this issue.

@3unjee : Arch Linux does not have any version numbering (only its derivatives has, eg. Manjaro), it is a rolling distro.

@FabioLolix : I tried to build the latest master and I ran into the same problem, what you found. In my case the configure.sh did not find the ../3rdparty/linux/Qt/5.14.2/include/QtCore (and later the QtGui, QtQml, QtQuick) folder. Because the Qt in my system has higher version number (5.15.2), than the expected, I had to download the older installer files from the Arch Linux Archive (https://archive.archlinux.org/packages/q/). QtCore and QtGui are part of the qt5-base package, QtQml, QtQuick are part of the qt5-declarative package. When I extracted these folders, I could start to compile with running simply the following:

sh configure.sh linux
qmake -r
make

After few minutes of compiling the package, make exited with an error, but I think this is different issue:

/usr/include/libtorrent/torrent_flags.hpp:225:54: note: declared here
  225 |  constexpr torrent_flags_t TORRENT_DEPRECATED_MEMBER pinned = 14_bit;
      |                                                      ^~~~~~
make[1]: *** [Makefile:1459: WTorrentEngine.o] Error 1
make[1]: Leaving directory '/mnt/Adat/Ideiglenes/Sky-master/src/SkTorrent'
make: *** [Makefile:181: sub-src-SkTorrent-make_first-ordered] Error 2

@3unjee
Copy link
Member

3unjee commented Feb 22, 2021

Thanks @G-P-L for investigating, I appreciate it. Yeah it seems to be an isuse with libtorrent under SkTorrent. Which is probably one of the last library to compile.

Could you copy the entire log of the error ?

@G-P-L
Copy link

G-P-L commented Feb 27, 2021

Here you find the whole make log: Sky make log.txt
And this is the end of the log:

In file included from /usr/include/libtorrent/session_handle.hpp:39,
                 from /usr/include/libtorrent/session.hpp:41,
                 from ../../include/SkTorrent/private/../../../src/SkTorrent/src/torrent/WTorrentEngine_p.h:36,
                 from ../../include/SkTorrent/private/WTorrentEngine_p:1,
                 from src/torrent/WTorrentEngine.h:99,
                 from src/torrent/WTorrentEngine.cpp:23:
/usr/include/libtorrent/torrent_handle.hpp:877:8: note: declared here
  877 |   void set_sequential_download(bool sd) const;
      |        ^~~~~~~~~~~~~~~~~~~~~~~
src/torrent/WTorrentEngine.cpp: In member function ‘void WTorrentEnginePrivate::events()’:
src/torrent/WTorrentEngine.cpp:1713:47: warning: ‘torrent_added_alert’ is deprecated [-Wdeprecated-declarations]
 1713 |         else if (type == torrent_added_alert::alert_type)
      |                                               ^~~~~~~~~~
In file included from src/torrent/WTorrentEngine.cpp:35:
/usr/include/libtorrent/alert_types.hpp:233:35: note: declared here
  233 |  struct TORRENT_DEPRECATED_EXPORT torrent_added_alert final : torrent_alert
      |                                   ^~~~~~~~~~~~~~~~~~~
src/torrent/WTorrentEngine.cpp:1717:35: warning: ‘torrent_added_alert’ is deprecated [-Wdeprecated-declarations]
 1717 |             torrent_added_alert * event = alert_cast<torrent_added_alert>(alert);
      |                                   ^~~~~
In file included from src/torrent/WTorrentEngine.cpp:35:
/usr/include/libtorrent/alert_types.hpp:233:35: note: declared here
  233 |  struct TORRENT_DEPRECATED_EXPORT torrent_added_alert final : torrent_alert
      |                                   ^~~~~~~~~~~~~~~~~~~
src/torrent/WTorrentEngine.cpp:1717:54: warning: ‘torrent_added_alert’ is deprecated [-Wdeprecated-declarations]
 1717 |             torrent_added_alert * event = alert_cast<torrent_added_alert>(alert);
      |                                                      ^~~~~~~~~~~~~~~~~~~
In file included from src/torrent/WTorrentEngine.cpp:35:
/usr/include/libtorrent/alert_types.hpp:233:35: note: declared here
  233 |  struct TORRENT_DEPRECATED_EXPORT torrent_added_alert final : torrent_alert
      |                                   ^~~~~~~~~~~~~~~~~~~
src/torrent/WTorrentEngine.cpp:1771:34: error: variable ‘std::ofstream stream’ has initializer but incomplete type
 1771 |             std::ofstream stream(fileName.C_STR, std::ios_base::binary);
      |                                  ^~~~~~~~
src/torrent/WTorrentEngine.cpp: In member function ‘virtual bool WTorrentEngine::event(QEvent*)’:
src/torrent/WTorrentEngine.cpp:2466:43: warning: ‘libtorrent::torrent_flags::pinned’ is deprecated [-Wdeprecated-declarations]
 2466 |             params.flags = torrent_flags::pinned           |
      |                                           ^~~~~~
In file included from /usr/include/libtorrent/torrent_handle.hpp:58,
                 from /usr/include/libtorrent/session_handle.hpp:39,
                 from /usr/include/libtorrent/session.hpp:41,
                 from ../../include/SkTorrent/private/../../../src/SkTorrent/src/torrent/WTorrentEngine_p.h:36,
                 from ../../include/SkTorrent/private/WTorrentEngine_p:1,
                 from src/torrent/WTorrentEngine.h:99,
                 from src/torrent/WTorrentEngine.cpp:23:
/usr/include/libtorrent/torrent_flags.hpp:225:54: note: declared here
  225 |  constexpr torrent_flags_t TORRENT_DEPRECATED_MEMBER pinned = 14_bit;
      |                                                      ^~~~~~
make[1]: *** [Makefile:1459: WTorrentEngine.o] Error 1
make[1]: Leaving directory '/mnt/Adat/Ideiglenes/Sky-master/src/SkTorrent'
make: *** [Makefile:181: sub-src-SkTorrent-make_first-ordered] Error 2

@3unjee
Copy link
Member

3unjee commented Mar 1, 2021

In WTorrentEngine.cpp line 49, could you try to copy paste #include <fstream> under the #endif ?

Like so:

#ifdef LIBTORRENT_ABI_1
// Boost includes
#include <boost/bind.hpp>
#endif

// C   includes
#include <fstream>

@FabioLolix FabioLolix changed the title Can't compile & package on Manjaro Linux, make a proper build system? Can't compile & package on Manjaro Linux Mar 1, 2021
@FabioLolix
Copy link
Author

In order to configure and build Sky you need the 3rdparty dependency, the quickest way to retrieve it and build everything would be the following:
sh build.sh linux all

Hello again, using "sh build.sh linux all" didn't work

$ sh build.sh linux all
Usage: build <qt4 | qt5 | clean> <win32 | win64 | macOS | linux> [deploy | tools]

So I changed to "sh build.sh qt5 linux" and compiling started, with this step ahead I also started to build the package in a clean chroot which lead to the discovery that that package lib32-glibc is needed (1).
It failed anyway both in my home folder and in chroot with another error (2)

  • 1
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
    7 | # include <gnu/stubs-32.h>
      |           ^~~~~~~~~~~~~~~~
  • 2
/usr/sbin/ld: /usr/lib/libQt5Quick.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:536: ../../../../lib/libSkCore.so] Error 1
make[1]: Leaving directory '/build/sky/src/Sky-1.6.0/build/qt5/src/SkCore'
make: *** [Makefile:52: sub-src-SkCore-make_first-ordered] Error 2

I'm using Qt5 updated from the repository at version 5.15.2

When I have time I can make guide for getting started for these things

@3unjee
Copy link
Member

3unjee commented Mar 2, 2021

OK thanks for your feedback.

Since you guys are showing interest, I guess I should install Manjaro and fix these myself.

@3unjee
Copy link
Member

3unjee commented Mar 2, 2021

Okay I just tested Manjaro XFCE and Gnome in VirtualBox and I keep getting crashes and black screens for some reason.

In theory we need to patch the 3rdparty/install.sh script and replace apt-get with pacman for proper configuration. Also @FabioLolix, Qt 5.15.2 is not yet supported by Sky kit, maximum is Qt 5.14.

I'm not going to spend too much time on this personally since I have other things to improve and the binary packages are already available (https://aur.archlinux.org/packages/motionbox-bin).

But I'll gladly accept PR(s).

@3unjee
Copy link
Member

3unjee commented Jan 1, 2023

The latest standalone package should support Manjaro just fine: https://omega.gg/MotionBox/get

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

No branches or pull requests

3 participants