Closed mara004 closed 3 years ago
I wonder whether other people have the same problem with building from source or whether it's my fault (e. g. missing package, gcc too old, ...). Or might this even be a platform/compiler-specific issue? Apparently the code must have worked somehow to create the Windows binaries for 2019.8.16 Early Access ... I'd be grateful for any help.
I can't really help you with your issue. However, I'd like to point you out to a related project by 4lex4, in case you haven't seen it yet: Building scantailor and its dependencies. There are detailed instructions for building STA from source there. Good luck.
@Piolie Thanks for your comment. I've already read through the building instructions, of course (that is, at least, the Linux part) and I think I followed all the steps which are described there. Unless I am much mistaken, the main purpose of this libs-build repository is building the dependencies of ScanTailor, but that's rather irrelevant for me as I can simply use the packages my distribution provides. Building all the dependencies from the sources as well would probably take very long, in particular on a slow armhf device. Have you tried building from the sources yet?
Possible reasons which I could imagine for the build failure are: a) I'm on gcc/g++ 6.3 and the documentation recommends gcc/g++ 7, but I currently don't see a way to upgrade it b) slightly older boost version than what is listed in the Ubuntu packages, but >= 1.60, so it should still work c) Qt could be a potential problem (missing package?)
I think the next thing I'll try is to build from the current git master instead of the (pre-)release tarball ...
What I could try is simply comment the trouble-causing lines out, but I don't think it's a good idea to do that without knowing what I do. The code is usually there for a reason.
I also tried make with the -k option (keep going even if a file fails to build), but it stopped and failed at the same file nevertheless.
I have never built anything from source. Like, in my life :(. But just in case you missed it, the Linux section explains how to get the dependencies and also how to build STA. Although that part is just three lines.
Referring to your c) point. In the releases section it says: For Linux users: install Qt5 Svg devel package before building this version. Maybe check that?
One more thing. I suggest you do try with the latest master. There have been more than a hundred commits since 2019.8.16_EA, some of which I consider important. I'm eager to get an official release soon.
PS: I find it very interesting that you are trying to run STA in a Raspberry Pi. Hope you succeed and report back your results. Sorry I cannot help you any more.
I already have the libqt5svg5 package (both library and header files), but that was a good idea. Yeah, I'll try to build from master. STA probably won't work very well on a Raspberry (32-bit, only 512 MiB RAM), but the main reason why I want to build from source is to test my new German translation properly, before submitting a PR. I was already able to compile only the translation binaries and test them with my Windows 8 install (from the official pre-release executable) of STA, but some things went wrong there (e. g. translation for guides help not displayed) and I wanted to investigate that. I could of course also try to build on Windows, but I've never done that before and it sounds like a lot more work than on Linux, because you have to download and compile all dependencies first. I still think a) might be the cause of the problem, because I get a lot of compiler warnings like "... will change in GCC 7.1" Many thanks for your interest and suggestions :)
Today, I compiled STA on KDE Neon 20.04 and it worked without problems. So apparently, I either really had too outdated dependencies on the Rapsberry Pi or these are armhf platform-specific issues. Since there is basically no point at using STA on a Rapsberry anyway, I am closing this now.
I tried to build ScanTailor Advanced from the latest pre-release source tarball (2019.8.16_EA) on Debian GNU/Linux 9 ("Stretch") on an armhf device (Raspberry Pi 2B), but compiling fails at file
./src/foundation/PropertySet.cpp
:/home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp: In copy constructor ‘PropertySet::PropertySet(const PropertySet&)’: /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:20: error: expected unqualified-id before ‘[’ token for (const auto& [type, prop] : other.m_props) { ^ /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:20: error: expected ‘;’ before ‘[’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:21: error: ‘type’ was not declared in this scope for (const auto& [type, prop] : other.m_props) { ^~~~ /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:27: error: ‘prop’ was not declared in this scope for (const auto& [type, prop] : other.m_props) { ^~~~ /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp: In lambda function: /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:33: error: expected ‘{’ before ‘:’ token for (const auto& [type, prop] : other.m_props) { ^ /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp: In copy constructor ‘PropertySet::PropertySet(const PropertySet&)’: /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:33: error: expected ‘;’ before ‘:’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:33: error: expected primary-expression before ‘:’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:33: error: expected ‘)’ before ‘:’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:30:33: error: expected primary-expression before ‘:’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp: In member function ‘QDomElement PropertySet::toXml(QDomDocument&, const QString&) const’: /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:20: error: expected unqualified-id before ‘[’ token for (const auto& [type, prop] : m_props) { ^ /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:20: error: expected ‘;’ before ‘[’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:21: error: ‘type’ was not declared in this scope for (const auto& [type, prop] : m_props) { ^~~~ /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:27: error: ‘prop’ was not declared in this scope for (const auto& [type, prop] : m_props) { ^~~~ /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp: In lambda function: /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:33: error: expected ‘{’ before ‘:’ token for (const auto& [type, prop] : m_props) { ^ /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp: In member function ‘QDomElement PropertySet::toXml(QDomDocument&, const QString&) const’: /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:33: error: expected ‘;’ before ‘:’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:33: error: expected primary-expression before ‘:’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:33: error: expected ‘)’ before ‘:’ token /home/pi/build/scantailor-advanced-2019.8.16_EA/src/foundation/PropertySet.cpp:48:33: error: expected primary-expression before ‘:’ token src/foundation/CMakeFiles/foundation.dir/build.make:114: die Regel für Ziel „src/foundation/CMakeFiles/foundation.dir/PropertySet.cpp.o“ scheiterte make[2]: *** [src/foundation/CMakeFiles/foundation.dir/PropertySet.cpp.o] Fehler 1 make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet... CMakeFiles/Makefile2:225: die Regel für Ziel „src/foundation/CMakeFiles/foundation.dir/all“ scheiterte make[1]: *** [src/foundation/CMakeFiles/foundation.dir/all] Fehler 2 Makefile:162: die Regel für Ziel „all“ scheiterte make: *** [all] Fehler 2
Full make/cmake build log: sta_buildlog.txtVersions of tools and dependencies:
Operating System: Debian GNU/Linux 9 ("Stretch") Kernel: Linux 4.19.66-v7+ Architecture: 32-bit arm hard-float (armhf)
UPDATE: Invalid