Trouble compiling a qt program

For discussions about programming, and for programming questions and advice


Moderator: Forum moderators

Post Reply
User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Trouble compiling a qt program

Post by dorothee »

Hello,

I am trying to compile and install a source package which was created with qt. I am on precise puppy (french Pipoca)

With qt-4.8.2.sfs, I used qmake command but it didn't work (qwidgets error). I think I am not far to succeed, but until now, I was not able to compile it.

Is there someone who could help me, or compile this package for me (I can make an sfs after)?

You can find qt-4.8.2.sfs and this package Eulexis_off_line-1.1.tar.gz (ancient greek parsing) at this address :

https://drive.google.com/drive/folders/ ... sp=sharing

There are also, in this folder, various sfs for parsing Latin, which work well, if you are interested with them :

collatinus_10.2-2_i386-1.sfs
qt-4.8.2_sfs4.sfs
felix-latin_2.0-7_i386-1.sfs (application pour chercher dans les dictionnaires)
French-latin dictionary Gaffiot: felix-latin-data_2.0-7_all-1.sfs
The fonction dictionary is not working whith the Collatinus interface, but it is possible to search the dictionary with felix-latin (menu Documents).

Thank you !

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Compiling with qt

Post by puppy_apprentice »

There is info how to do this in QtCreator:
https://github.com/PhVerkerk/Eulexis_of ... -737616080
https://github.com/PhVerkerk/Eulexis_of ... ulexis.pro

Here is some info how to use Eulexis as local web application with PHP:
https://github.com/biblissima/outils.biblissima.fr

User avatar
OscarTalks
Posts: 623
Joined: Tue Jul 14, 2020 10:11 pm
Location: London UK
Has thanked: 2 times
Been thanked: 247 times

Re: Compiling with qt

Post by OscarTalks »

Hello dorothee,

When the error says 'qwidgets', this makes me think that maybe the source package needs Qt5 and not Qt4
What is the name and version number of the source package?

User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Compiling with qt

Post by dorothee »

Hello again,

thank you very much for yours answers and your help.

After reading your tips, I found another qt5 at this adress:

https://drive.google.com/drive/folders/ ... KL-NptspoG
(5.2.1 version, because the other one didnt work for me, on precise)

but, unfortunately, if the error "widgets" disapeared, it gave me another error message (see the picture).

Another interesting way, given by puppy_apprentice is to use Eulexis as local web application with PHP. I don't know anything about PHP, but I downloaded php-7.3.29.tar.xz (debian) from here
https://www.php.net/downloads.php

in order to compile and install it. After this, the command for setting a local web application seemed to be simple.

But, unfortunately (again), I am these days on a very old laptop, with very few ram, and I did not succeed to compile it.

So I think that I am going to wait someone to make a deb package (it was the case for collatinus), to download and use it.

Or, if someone could succeed for me to compile Eulexis with qt, that would be great ! Or compile PHP...

I don't want to give up, but with my material, it seems to be difficult. Mais je n'ai pas dit mon dernier mot...

Merci, à bientôt !

Eulexis_erreur_qt5.jpg
Eulexis_erreur_qt5.jpg (97.03 KiB) Viewed 703 times

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

User avatar
norgo
Posts: 283
Joined: Mon Jul 13, 2020 6:39 pm
Location: Germany
Has thanked: 6 times
Been thanked: 111 times
Contact:

Re: Trouble compiling a qt program

Post by norgo »

@dorothee

Qmake is creating the Makefile.
After that you have to run the make command.
I can't detect the make command in your posted terminal screenshot.

1st step qmake, 2nd step make, 3rd step make install

try it once again

User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trouble compiling a qt program

Post by dorothee »

norgo, thank you for your message.

I did what you suggest, but it goes on giving errors. Althought "make" already gave error messages, I wrote "make install" in order to see what would occur. It gave the same errors (see the picture).

But the problem with qt seems to be over, as the command qmake-qt5 create a makefile.

I am know with a compiling problem...

Attachments
erreur_qt5.jpg
erreur_qt5.jpg (173.29 KiB) Viewed 678 times

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

scsijon
Posts: 202
Joined: Fri Jul 24, 2020 10:11 am
Has thanked: 6 times
Been thanked: 18 times

Re: Trouble compiling a qt program

Post by scsijon »

Dorothee, where did you get your source from?

This is the right spot in case your working from elsewhere >
https://github.com/biblissima/outils.biblissima.fr
they can answer questions and will help with problems as reading the errors you are getting, it looks like there are coding problems in your source.

The older version at https://github.com/biblissima/eulexis has been archived for a year now and should not be used.

User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Compiling with qt

Post by puppy_apprentice »

dorothee wrote: Wed Jul 07, 2021 3:11 am

Or compile PHP...

You don't have to compile PHP, there are already bin packages for this. You have to use Hiawatha or any Web Server application. Maybe our Forum Master rockedge helps you set the server with PHP. Maybe someone will make tutorial in How-to section?

Rockedge tutorial for Apache:
viewtopic.php?f=149&t=374

User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trouble compiling a qt program

Post by dorothee »

Thanks puppy_apprentice (not so apprentice),

I am afraid this is a bit to heavy for me. The php packages I found did not seem to be sufficient, and I have no idea how to handle Hiawatha. But I'll keep trying...

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Trouble compiling a qt program

Post by puppy_apprentice »

I will later try to set up Eulexis with mongoose webserver or busybox httpd.

User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trouble compiling a qt program

Post by dorothee »

Great, thanks !

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Trouble compiling a qt program

Post by puppy_apprentice »

Ok. Have made this to work with busybox httpd and PHP.
I will write how-to later.

eulexis-web.jpg
eulexis-web.jpg (78.17 KiB) Viewed 846 times
User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Trouble compiling a qt program

Post by puppy_apprentice »

I. PHP
1. Install most recent PHP for your Puppy version from Puppy Package Manager (in PPM search field write PHP)
2. In /etc/httpd/php.ini change those two lines:

Code: Select all

;cgi.force_redirect = 1 to cgi.force_redirect = 0
;cgi.redirect_status_env = to cgi.redirect_status_env = "yes"

II. BusyBox httpd
1. Make httpd.conf file in /etc at put this line in it:

Code: Select all

*.php:/usr/bin/php-cgi

or use this command from console:

Code: Select all

echo *.php:/usr/bin/php-cgi >/etc/httpd.conf

III. Eulexis
1. Make directory tree eg:

Code: Select all

/root/my-applications/www/ajax/eulexis

2. Save eulexis.php from:
https://raw.githubusercontent.com/bibli ... ulexis.php
in eulexis directory
3. Download ui.tar.gz from:
http://outils.biblissima.fr/resources/eulexis/ui.tar.gz
and unpack ui directory from this archive to eulexis directory
4. Download data.tar.gz from:
http://outils.biblissima.fr/resources/e ... ata.tar.gz
and unpack data directory from this archive to eulexis directory

IV. Launching
1. In console run this:

Code: Select all

httpd -f -h /root/my-applications/www

2. In web browser use this url:

Code: Select all

http://localhost/ajax/eulexis/ui/index.html

3. To close httpd server use Ctrl+C in console where you started httpd server

User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trouble compiling a qt program

Post by dorothee »

Hello,

thank you for your post. It's great. Unfortunately, I have some trouble to download PHP from the PPM, even after updating. I finished to give up, and found two pets which can help me with PHP.

There are LAMP-6.16-5.1.35-5.2.9.pet and LHMP-8.0-5.3.4-5.3.10.pet I found there:
https://archive.org/download/Puppy_Lin ... Repository

LHMP especially contain hiawatha and PHP. It doesn't exactly follow your tip, but I am trying to use it. For the moment, I didn't succeed, but I'll keep trying...

One thing I didn't understand in your exemple is the place of the folder eulexis :
/root/my-applications/www/ajax/eulexis
Why www/ajax ? And I can't put a folder of 400Mo in root, my old computer would never hold it.

I don't understand also the sequence of codes with the adress which is splitted
httpd -f -h /root/my-applications/www
and after
http://localhost/ajax/eulexis/ui/index.html

I know it is an exemple, but is there a logic to be followed?

I am sorry to give you all this work. Please be free to let it as it is. For me, I am very happy to deal with PHP, which is new for me. I am sure I'll finish to find out a solution.

Merci, à bientôt !

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Trouble compiling a qt program

Post by puppy_apprentice »

dorothee wrote: Fri Jul 09, 2021 10:46 am

One thing I didn't understand in your exemple is the place of the folder eulexis :
/root/my-applications/www/ajax/eulexis
Why www/ajax ? And I can't put a folder of 400Mo in root, my old computer would never hold it.

This part:

Code: Select all

/root/my-applications/www

could be whatever, the rest:

Code: Select all

/ajax/eulexis

should be the same, it is used in some of the Eulexis files eg. eulexis.php and eulexis.js. On my screenshot is another URL because i change it in those files.

dorothee wrote: Fri Jul 09, 2021 10:46 am

I don't understand also the sequence of codes with the adress which is splitted
httpd -f -h /root/my-applications/www

-h means home, it set the root directory for web page.

dorothee wrote: Fri Jul 09, 2021 10:46 am

and after
http://localhost/ajax/eulexis/ui/index.html

localhost = /root/my-applications/www

But if you have computer connected to internet full time you can use online version:
https://outils.biblissima.fr/en/eulexis-web/

User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trouble compiling a qt program

Post by dorothee »

Dear puppy-apprentice

I am moving forward...

I did all your tips again and I succeed to see the local page of elexis.

First of all, I installed LAMP-6.16-5.1.35-5.2.9.pet you can find here:
https://archive.org/download/Puppy_Linu ... Repository

There are some differences between our configurations :
1) there is no

Code: Select all

/httpd

folder in

Code: Select all

/etc

, the php.ini file is directly in

Code: Select all

 /etc

2) php.cgi is in

Code: Select all

/usr/local/bin/php-cgi

and not in

Code: Select all

 /usr/bin

The adress of the folder is :

Code: Select all

/mnt/sdb1/linux/www/ajax/eulexis/ui/index.html

(I left "ajax", I don't know if I need it, but as Ajax was a greek hero, I left it)

I typed :

Code: Select all

httpd -f -h /mnt/sdb1/linux/www

The adress I typed on the browser :

Code: Select all

http://localhost/ajax/eulexis/ui/index.html

I succeed to open the index page, but until know, it does not do the work, as you can see in the picture. I entered a word, and ask it to parse it, but I got an error message.

I discovered that it was missing a mount of libraries in the folder

Code: Select all

/usr/lib/php/extensions

which did not exist. I create the folder and picked up on internet, one by one, all the missing libraries. But unfortunately, until now, it gives me the error (for all the libraries) :

Code: Select all

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/thelibrary.so

I made a large search on internet in order to fix it, but I didn't find out. Is there a compiling problem? I saw that PHP version is 5.2.9.

Any idea?

Thanks !

PS: I maybe should try again with LHMP-8.0-5.3.4-5.3.10.pet, because PHP version is 5.3.10 (a bit newer)

Attachments
erreur_libs.jpg
erreur_libs.jpg (303.82 KiB) Viewed 718 times
erreur_site.jpg
erreur_site.jpg (117.44 KiB) Viewed 718 times

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Trouble compiling a qt program

Post by puppy_apprentice »

LAMP package contains own server - Apache. You should use this server. Try this page:
https://www.redhat.com/sysadmin/lamp-server
to get more info about LAMP
and this tutorial have some info:
viewtopic.php?f=149&t=374
I never used Apache server. For my own purpose i use lighter one like busybox httpd, mongoose or Abyss.

But if you want to use httpd (it is part of busybox toolkit) you have to follow my tips. Even if you don't have any of those files in those folders mentioned by me you should make them.
For httpd you need:
1. httpd.conf in /etc with:

Code: Select all

*.php:/usr/bin/php-cgi

you have to write proper path to php-cgi, so try in console:

Code: Select all

which php-cgi

2. php.ini in /etc/httpd (you have to copy php.ini to httpd folder) and make changes mentioned in my earlier post)

I don't think so that Eulexis need PHP extensions. eulexis.php is mostly reading data from files in data folder.

And ajax part of URL is important because it is in 669 line of eulexis.php and /ui/js/eulexis.js in line 111. If you erase ajax from those lines you will don't need it later in your directory tree.

BTW. Ajax is "Asynchronous JavaScript and XML":
https://en.wikipedia.org/wiki/Ajax_%28programming%29

You can check if PHP is working with your server properly by using this simple PHP page:

Code: Select all

<?php
echo phpinfo();
?>

save it as phpinfo.php and put in:

Code: Select all

/mnt/sdb1/linux/www

and in the browser use:

Code: Select all

http://localhost/phpinfo.php
User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trouble compiling a qt program

Post by dorothee »

Hello puppy_apprentice,

despite all your marvellous work, I am giving up.

I dont have sufficient competence to go on. I read on the tutorial of

https://github.com/biblissima/outils.bi ... hors-ligne

that PHP is necessary to use eulexis off-line.

And when I try to use eulexis off-line, there a PHP error which appear. This is definitely the problem in this case.

I will wait for a eulexis deb package, someone will finish to make one, as it was the case for collatinus.

Meanwhile, I'll use eulexis on-line, as I am used to do.

Thanks a lot, I learned a lot whith your posts.

PS: I made a simple http server with python, but I found out the same problem.

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

User avatar
puppy_apprentice
Posts: 692
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Trouble compiling a qt program

Post by puppy_apprentice »

Try to request for Eulexis package there:
viewforum.php?f=92
or on Ubuntu/Debian forum.

Maybe it is time to switch to never Puppy Distro? Or request for PHP package for Puppy/Ubuntu Precise?

User avatar
dorothee
Posts: 28
Joined: Tue Sep 01, 2020 8:06 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Trouble compiling a qt program

Post by dorothee »

It is a good idea to request a package. I 'll may be do it.

I should use a more recent puppy, you are right. But I'd like to remasterize it in order to fit with my use, and also because I like to use puppy in live-cd. This needs time an also a more recent computer. When I'll dispose both, I'll certainly do it.

Thanks.

Sony VAIO - Xenial 32 bit / BookwormPup64 10.0.7
Processeur: 2x Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Memory: 1015Mo

Post Reply

Return to “Programming”