Welcome, Guest
Username: Password: Remember me
CodeTyphon Linux OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

Error using CT under Arch 10 years 8 months ago #4349

  • Konstantinos Tampouris
  • Konstantinos Tampouris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 2
OS version: Arch Linux, both 32bit and 64bit
GUI platform: QT4
CT versions affected: at least v4.30 - v4.41

Description:

1) Create an empty form, then add a button. The button is automatically selected in Object Inspector.
2) Select "Events" tab and click next to the "OnClick" event.

=> The message "/usr/lib/codetyphon/lcl/controls.pp(38,36) Error: unit not found: types" is displayed.

3) Insist on creating a OnClick procedure.

=> The message "/usr/lib/codetyphon/lcl/lclclasses.pp(32,10) Error: unit not found: Classes" is displayed.

4) Click on the label of another event, then on the "OnClick" label.

=> The message "EAccessViolation: Access violation" is displayed.

5) Create OnClick procedures manually.
6) Click the down arrow next to the OnClick event.

=> No procedures are displayed in the list.

7) Paths are correct in the configuration, and compiling/building work without problems.

Please Log in or Create an account to join the conversation.

Error using CT under Arch 10 years 8 months ago #4350

  • Manos S. Pappas
  • Manos S. Pappas's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 69
  • Thank you received: 1
If the user tries to install CodeTyphon using Qt4, the Lazarus IDE behaves exactly like Pascode reports.
This is evident in platforms like Chakra Linux where no GNOME libraries exist and vlclplatform=1.

Compiling CodeTyphon in Arch Linux using Gtk2 does not expose this erroneous behaviour.

Trying to find out what's going on, I did this: removed CodeTyphon completely and Qt4Pas libraries.
Next, I installed Qt4Pas from Arch repositories and installed CodeTyphon again WITHOUT running "Remove and Build ALL" (option 8) from the initial install menu.
Instead, I've entered CodeTyphon Centre, selected "Use Qt4 libraries" on the Settings menu and started "Remove and Build ALL".
Lazarus was built without errors AND it does not expose the erroneous behaviour (i.e works like the Gtk2 version); however, there are some random messages about "Risking corruption" that I suspect the Qt4Pas libraries (from Arch repos).

Since Arch has moved to Qt5 (this is the default selection for new installations), the CodeTyphon Qt4Pas build script should check the installed Qt version (using qtchooser) and select Qt4 for Qt4Pas compilation. Exporting QT_SELECT=4 should (hopefully) select Qt4 as the toolkit to use.

ln_Typhon1_Build_QT4pas.sh
# =============================================================
# CodeTyphon Studio
# Copyright (c) PilotLogic Software House.
# All rights reserved.
# =============================================================

unzipqt4pas()
{

if [ ! -d $vcodetyphon/qt4pas/ ] ;
then

echo "."
echo "
"
echo " Unzip qt4pas.7z"
echo "
"
echo "."

sudo mkdir $vcodetyphon/qt4pas/
#sudo unzip -o ../allzips/src/qt4pas.7z -d $vcodetyphon/
sudo $v7zipexe x ../allzips/src/qt4pas.7z -o$vcodetyphon/ -y
sudo chmod -R 777 $vcodetyphon/qt4pas/
fi

}


buildqt4pas()
{

if [ ! -f $vcodetyphon/qt4pas/libQt4Pas.so ] ;
then

echo "."
echo "
"
echo " Try to Build QT4pas Libraries"
echo "
"
echo "."
echo "
Qt Info
"
echo "."

cd $vcodetyphon/qt4pas

$vqmake -query

echo "."
echo "
Build QT4pas
"
echo "."

$vqmake
sudo $vmake install

if [ -f $vcodetyphon/qt4pas/libQt4Pas.so ] ;
then
echo "
"
echo "[INFO]: QT4pas Libraries finish Build OK"
echo "."
else
echo "
"
echo "[ERROR]: QT4pas Libraries Don't Build...???"
echo "."
fi

sleep 3

else
echo "."
echo "[INFO] QT4pas Libraries Exists..."
echo "."
fi

}

#========================MAIN===========================
. $PWD/ln_All_Functions.sh
getvalues
export QT_SELECT=4

if [ -f $vcodetyphon/allzips/src/qt4pas.7z ] ;
then
unzipqt4pas
buildqt4pas
fi

ln_Typhon1_Build_QT4pas.sh
Best Regards,
Manos S. Pappas

Please Log in or Create an account to join the conversation.

Last edit: by Manos S. Pappas.

Error using CT under Arch 10 years 8 months ago #4413

  • Konstantinos Tampouris
  • Konstantinos Tampouris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 2
Not really.

When I reported this problem, I only had Qt4 installed (no qtchooser whatsoever), so the problem has clearly nothing to do with the presence of Qt5 or the misconfiguration of qtchooser.

Even after installing Qt5 and with qtchooser defaulting to using Qt5, Qt4Pas is always built using Qt4 because:
  • CT does not use qtchooser, so it defaults to using whichever qmake it finds (first) in PATH.
  • startkde (of course I use KDE) in Arch Linux automatically prepends "/usr/lib/qt4/bin" to PATH, because KDE still uses Qt4.

So in an updated (current) installation of Arch Linux running KDE, CT always uses the Qt4 version of qmake.

In my case, CT exibits the same problem when built for Qt(4) regardless of using vlclplatform=0 or 1 during the installation of CT.
Of course there is no problem when CT uses Gtk, as you have already pointed out.

Then I tried removing Qt4Pas files from /usr/lib and installing the qt4pas package from the Arch Linux repository. The current version of this package is 5.2.5, the same version that comes with CT.
Even after installing this package, the problem persisted both before and after everything had been rebuilt. So I cannot confirm that the bug is in Qt4Pas.

Please Log in or Create an account to join the conversation.

Error using CT under Arch 10 years 7 months ago #4421

  • Konstantinos Tampouris
  • Konstantinos Tampouris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 2
I finally found a really, really simple solution to the problem at hand:
  1. Start "Typhon IDE".
  2. Select "Tools => Rescan FPC Source Directory".

This is a per-user action and it is necessary after every building of Typhon IDE.

It is weird, though, that this is only necessary when using QT as the backend.

Please Log in or Create an account to join the conversation.

Last edit: by Konstantinos Tampouris.

Error using CT under Arch 10 years 7 months ago #4436

  • Konstantinos Tampouris
  • Konstantinos Tampouris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 2
Another solution:
  1. Start CT.
  2. Select "Typhon => IDE Settings Restore Defaults".

Actually, the difference between the "working" GTK compilation and the "not working" QT compilation of CT is that IDE Settings Restore Defaults is automatically executed when building for GTK, while this is not the case when building for QT.

When building for GTK (or executing IDE Settings Restore Defaults), the hidden .typhon* directory in the user folder contains the following 11 files:
  1. codetoolsoptions.xml
  2. ctcsettings.ini
  3. datadict.xml
  4. editoroptions.xml
  5. environmentoptions.xml
  6. h2pastool.xml
  7. inputhistory.xml
  8. lazarus.dci
  9. miscellaneousoptions.xml
  10. packagefiles.xml
  11. pl_ExtentIDEcfg.xml

When building for QT (assuming the initial installation with vlclplatform=1), the hidden .typhon* directory in the user folder contains the following 14 files:
  1. codetoolsoptions.xml
  2. compilertest.pas
  3. datadict.xml
  4. editoroptions.xml
  5. environmentoptions.xml
  6. fpcdefines.xml
  7. h2pastool.xml
  8. idemake.cfg
  9. inputhistory.xml
  10. lazarus.dci
  11. miscellaneousoptions.xml
  12. packagefiles.xml
  13. pl_ExtentIDEcfg.xml
  14. staticpackages.inc

So, the QT installation misses ctcsettings.ini and lazarus.dci, but adds compilertest.pas, fpcdefines.xml, idemake.cfg and staticpackages.inc.

Guess what... The problem with the QT version resides in the existence of fpcdefines.xml. Erase this file, so that it is automatically recreated when running the Typhon IDE, and everything will be OK.

Of course, it would be better to have IDE Settings Restore Defaults being executed automatically when building for QT, just like when building for GTK.
The following user(s) said Thank You: Manos S. Pappas

Please Log in or Create an account to join the conversation.

Error using CT under Arch 10 years 7 months ago #4437

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4508
  • Thank you received: 1100
Thanks Sir
We will add your suggestions to the next CodeTyphon version
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Error using CT under Arch 10 years 6 months ago #4500

  • Manos S. Pappas
  • Manos S. Pappas's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 69
  • Thank you received: 1
CT4.50 still requires - in Arch - the use of QT_SELECT=4 export in order to compile Lazarus for QT4 and what pascode said regarding deleting the file fpcdefines.xml from the ~/.typhon directory.
Once this is removed, everything works.
Best Regards,
Manos S. Pappas

Please Log in or Create an account to join the conversation.

Last edit: by Manos S. Pappas.
  • Page:
  • 1