Attempt to build 3.9.4 in Ubuntu 16.04

Post here if you need help using Actiona
Post Reply
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Attempt to build 3.9.4 in Ubuntu 16.04

Post by eureka »

In Ubuntu 16.04 I had version Actiona 3.9.1 already installed and decided to upgrade but could not do so through Synaptic Package Manager.

I downloaded 3.9.4. source from this site.

https://wiki.actiona.tools/doku.php?id=en:start
and
https://wiki.actiona.tools/doku.php?id=en:compilation

After a first false build ... Project ERROR: opencv development package not found ...
I had to install libopencv-dev package which installed further 43 dependency packages.

I could then run command ...

Code: Select all

qmake -r && make
and the build completed nearly to completion but with these last few lines ..

Code: Select all

/usr/bin/ld: cannot open output file ../actiona: Is a directory
collect2: error: ld returned 1 exit status
Makefile:288: recipe for target '../actiona' failed
make[1]: *** [../actiona] Error 1
make[1]: Leaving directory '~/actiona-master-394/actiona/gui'
Makefile:223: recipe for target 'sub-gui-make_first-ordered' failed
make: *** [sub-gui-make_first-ordered] Error 2
Within the 3.9.4 src directory I see a build sub-directory created ...

Code: Select all

> build-actiona-Desktop-Debug
and there is actiona sitting in there as an executable app.
But if I click on this executable I just see a pop blank MainWindow.

Can you see any missing step in build process?

I have Qt Creator installed and when I try to run actiona.pro in there I also see blank
MainWindow.
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by eureka »

Solved.

I made another attempt and this time I see actiona and actexec executables in the actiona folder.

I don't know why the first build attempt failed. But I'm now in business with 3.9.4 launching.
User avatar
Jmgr
Admin
Posts: 1651
Joined: 07 Dec 2005, 15:45
Contact:

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by Jmgr »

Hi, not sure why it failed the first time, especially if you have installed all the dependencies with

Code: Select all

sudo apt-get install git-core build-essential qtbase5-dev libqt5x11extras5-dev libqt5xmlpatterns5-dev qtscript5-dev qttools5-dev qtmultimedia5-dev qttools5-dev-tools libnotify-dev libopencv-core-dev libopencv-imgproc-dev libxtst-dev libboost-dev
But if it works now, great.
"My software never has bugs. It just develops random features."
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by eureka »

Some nine months after my first build I am now trying to build Actiona version 3.10 in Ubuntu 16.04.
I have version 3.9.1 working but it has a few bugs.

Followed instructions here https://wiki.actiona.tools/doku.php?id=en:compilation
I seem to have all the Ubuntu dependencies installed but when I run the command

Code: Select all

qmake -r && make
I see multiple errors such as here ..

Code: Select all

In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:771:5: error: ‘QString::QString(const char*)’ is private
     QString(const char *ch);
     ^
version.cpp:328:11: error: within this context
    return "^([0-9]+)\\.([0-9]+)$";
           ^
Do I need to update Qt5 since there are multiple references to ‘QString::QString(const char*)’ is private ?

The report ends with ...

Code: Select all

Makefile:51: recipe for target 'sub-tools-make_first-ordered' failed
make: *** [sub-tools-make_first-ordered] Error 2
[Later edit]
I have just tried building Actiona 3.9.4 and that works. But not 3.10.0 apparently.
User avatar
Jmgr
Admin
Posts: 1651
Joined: 07 Dec 2005, 15:45
Contact:

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by Jmgr »

I think the issue here is that Qt is probably too old. What is the result of

Code: Select all

qmake -v
?
"My software never has bugs. It just develops random features."
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by eureka »

Code: Select all

qmake -v
QMake version 3.0
Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu
And here is a fuller build report ...

Code: Select all

sudo apt-get install git-core build-essential qtbase5-dev libqt5x11extras5-dev libqt5xmlpatterns5-dev qtscript5-dev qttools5-dev qtmultimedia5-dev qttools5-dev-tools libnotify-dev libopencv-core-dev libopencv-imgproc-dev libxtst-dev libboost-dev
[sudo] password for dl: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
libboost-dev is already the newest version (1.58.0.1ubuntu1).
libnotify-dev is already the newest version (0.7.6-2svn1).
libqt5xmlpatterns5-dev is already the newest version (5.5.1-2build1).
libxtst-dev is already the newest version (2:1.2.2-1).
qtmultimedia5-dev is already the newest version (5.5.1-4ubuntu2).
libqt5x11extras5-dev is already the newest version (5.5.1-3build1).
qtscript5-dev is already the newest version (5.5.1+dfsg-2build1).
qtbase5-dev is already the newest version (5.5.1+dfsg-16ubuntu7.5).
libopencv-core-dev is already the newest version (2.4.9.1+dfsg-1.5ubuntu1.1).
libopencv-imgproc-dev is already the newest version (2.4.9.1+dfsg-1.5ubuntu1.1).
qttools5-dev is already the newest version (5.5.1-3ubuntu0.1).
qttools5-dev-tools is already the newest version (5.5.1-3ubuntu0.1).
git-core is already the newest version (1:2.14.2-1~ppa0~ubuntu16.04.1).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
================================================

[Later edit] I have looked through my system and I see that I have a number of old installations of Qt (4 and 5) some installed via Ubuntu distro and some installed manually. I will now spend some time in purging old installations of Qt and then installing Qt 5.11 as fresh installation. Then I will try again to build Actiona. One problem is that the Ubuntu distro version of Qt lags behind the latest version 5.11.
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Attempt to build 3.9.4/3.10.0 in Ubuntu 16.04

Post by eureka »

I now have successfully built Actiona 3.10.0.

I installed Qt5.12.1 into /opt directory.

Then I setup QtCreator http://manpages.ubuntu.com/manpages/xen ... ser.1.html paths to select latest Qt5 installation (there are historical Qt installations).

I built Actiona using QtCreator GUI.
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by eureka »

It seems that I was premature in marking this as SOLVED.

I did succeed in building an executable (through QtCreator) but I see that some components are missing when I try to run an earlier written *.ascr script.

The System and Data components sets are not seen in Actiona GUI.

Retracing my steps I ran this command ..

Code: Select all

qmake -v
QMake version 3.1
Using Qt version 5.12.1 in /opt/Qt5.12.1/5.12.1/gcc_64/lib
I navigated to actiona (3.10.0) source

Here are the last few lines of the terminal output ..

Code: Select all

generated/mainwindow.o: In function `MainWindow::checkForUpdate(bool)':
mainwindow.cpp:(.text+0x1260): undefined reference to `Tools::Updater::checkForUpdates(QString const&, QVersionNumber const&, int, Tools::Updater::FileType, Tools::Updater::ContainerType, QString const&, int, QString const&)'
../libtools.so: undefined reference to `Tools::Version::toString() const'
../libtools.so: undefined reference to `Tools::Version::Version()'
../libtools.so: undefined reference to `Tools::Updater::success(Tools::Version const&, QDate const&, QString const&, QString const&, QString const&, int, QString const&)'
../libtools.so: undefined reference to `Tools::Version::setFromString(QString const&)'
collect2: error: ld returned 1 exit status
Makefile:421: recipe for target '../actiona' failed
make[1]: *** [../actiona] Error 1
make[1]: Leaving directory '/home/dl/Actiona-scripts/actiona/actiona/gui'
Makefile:184: recipe for target 'sub-gui-make_first-ordered' failed
make: *** [sub-gui-make_first-ordered] Error 2

Can I ask what version of qmake is required to create Actiona 3.10.0?

I have only been able to partially compile through QtCreator debug mode and that is how I created a partially working binary.
User avatar
Jmgr
Admin
Posts: 1651
Joined: 07 Dec 2005, 15:45
Contact:

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by Jmgr »

The official minimal version of Qt (and qmake) required to build Actiona is 5.4, however there is a bug that prevents compilation with more recent versions of Actiona with Qt < 5.6. You should be able to build the software using a more recent version of Qt, including 5.11 and 5.12.

The error messages that you show indicate that the Actiona executable was not created successfully:
Makefile:421: recipe for target '../actiona' failed
This could mean that you are trying to start an older version of Actiona, or a previously built one. Does it work if you start the program from within QtCreator?

I will install a VM with Ubuntu 16.04 and try to see if I can reproduce this issues.
"My software never has bugs. It just develops random features."
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by eureka »

@Jmgr here is my latest debugging report.

I decided to start afresh. Remember that recently I installed Qt5.12.1 in my /opt directory.

Created a new folder ~/actiona-master-310

Followed the instructions here .. but skipping the installation of ..

Code: Select all

sudo apt-get install git-core build-essential qtbase5-dev libqt5x11extras5-dev libqt5xmlpatterns5-dev qtscript5-dev qttools5-dev qtmultimedia5-dev qttools5-dev-tools libnotify-dev libopencv-core-dev libopencv-imgproc-dev libxtst-dev libboost-dev
since I reason that this might overwrite my fresh installation of Qt5.12.1.

https://wiki.actiona.tools/doku.php?id=en:compilation

From within that folder run ..

Code: Select all

git clone https://github.com/Jmgr/actiona.git
This clones folder actiona

Now ..

Code: Select all

cd actiona
qmake -r && make
Compilation proceeds and refers without errors to Qt5 paths in recent new installation /opt/Qt5.12.1/Qt5.12.1

Reached this line in terminal output without obvious errors

Code: Select all

-I/opt/Qt5.12.1/5.12.1/gcc_64/mkspecs/linux-g++ -o generated/qnetworkinfo_linux.o systeminfo/linux/qnetworkinfo_linux.cpp

then follows a stream of errors typically as follows ...

Code: Select all

In file included from /usr/include/linux/wireless.h:74:0,
                 from systeminfo/linux/qnetworkinfo_linux.cpp:65:
/usr/include/linux/if.h:234:19: error: field ‘ifru_addr’ has incomplete type ‘sockaddr’
   struct sockaddr ifru_addr;
                   ^
Here are the closing lines from terminal.

Code: Select all

In file included from /usr/include/linux/wireless.h:74:0,
                 from systeminfo/linux/qnetworkinfo_linux.cpp:65:
/usr/include/linux/if.h:234:19: error: field ‘ifru_addr’ has incomplete type ‘sockaddr’
   struct sockaddr ifru_addr;
                   ^
The common reference in these errors is

Code: Select all

struct sockaddr

However actiona executable is seen in actiona folder and it can launch as version 3.10.0 but there are missing components in the left hand components panel.

System and Data component sets are missing.and there are some references as follows:

Code: Select all

note: forward declaration of ‘struct sockaddr’
It may be that there is some incompatibility with latest Qt5 installation 5.12.1?

I have not yet tried building using QtCreator again since the above errors are seen.
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by eureka »

I attempted to build 3.10.0 using QtCreator.
As explained this produces a partially built actiona executable.
During the compilation a stream of errors is seen. These are the opening lines ..

Code: Select all

ISO C++11 requires at least one argument for the “...” in a variadic macro    qhotkey_x11.cpp   146
                                                                        qhotkey_x11.cpp   170
                                                                        qhotkey.cpp   119
                                                                        qhotkey.cpp   193

unused parameter ‘noUnicodeCharacters’ [-Wunused-parameter]  keyboarddevice.cpp line 143
Then follows a long list of errors.
Attachments
QtCreator.png
QtCreator.png (249.7 KiB) Viewed 4957 times
User avatar
Jmgr
Admin
Posts: 1651
Joined: 07 Dec 2005, 15:45
Contact:

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by Jmgr »

I installed Ubuntu 16.04 on a virtual machine and the good news is that I can reproduce the problem you have with the error

Code: Select all

field ‘ifru_addr’ has incomplete type ‘sockaddr’
The bad news is that it seems to be a bug in the development headers of the Linux kernel, so not much you can do. Can you upgrade to Ubuntu 18.04? That would solve this issue.

The fact that you can partially build Actiona and run it is because there a multiple modules that contain actions. Some modules have failed building because of the aforementioned error, and some actions are not available.
"My software never has bugs. It just develops random features."
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Attempt to build 3.9.4 in Ubuntu 16.04

Post by eureka »

@Jmgr Thank you for confirming this bug. (I have not been able to reply until just now).
I had hoped to get more life out of Ubuntu 16.04 since the official end of support is April 2021.
I will use Actiona 3.9.4 on Ubuntu 16.04 in the interim.
Post Reply