Alexey-T / CudaText_up

Bash script to download CudaText sources (all packages) and compile them. Requires Lazarus 2.0+.
MIT License
15 stars 10 forks source link

Error when compiling on ARM64 for QT5 #25

Closed DUOLabs333 closed 6 months ago

DUOLabs333 commented 8 months ago
/home/system/Downloads/CudaText_up/src/CudaText/app/formmain.pas(3549,3) Error: (3026) Wrong number of parameters specified for call to "QTimer_singleShot"
/usr/lib/lazarus/lcl/units/aarch64-linux/qt5/qt5.ppu:qt56.pas(2535,11) Error: (5088) Found declaration: QTimer_singleShot(LongInt;QObjectH;PChar); CDecl;
/usr/lib/lazarus/lcl/units/aarch64-linux/qt5/qt5.ppu:qt56.pas(2536,11) Error: (5088) Found declaration: QTimer_singleShot(LongInt;QtTimerType;QObjectH;PChar); CDecl;

Maybe my lazarus version (2.2.1) is too old?

Alexey-T commented 8 months ago

Maybe Laz is old. Use 3.2.

anyway, comment this line

  {$ifdef LCLQT5}
  //if you use Lazarus 2.x, this line cannot be compiled, so comment it
  QTimer_singleShot(10, @_QtDelayTimeOut);
  {$endif} 

it is check that runtime Qt5 lib is correct. if it is not, on calling SaveAs dialog, app will crash.

DUOLabs333 commented 8 months ago

Commenting out that line got me to linking. Unfortunately, I get the same error I got before: undefined reference to __libc_csu_init. This is likely due to fpc not finding crtbegin.o, even though it's already installed on my system.

Alexey-T commented 8 months ago

What FPC version? try to use the last release. If not ok, try the 'trunk' (last in git). Use the fpcUpDeluxe and set there the 'trunk' option to use last git version.

DUOLabs333 commented 8 months ago

Ok, so it turns out that on Arch Linux ARM, Lazarus is outdated by more than 2 years (though fpc is up to date).

Alexey-T commented 8 months ago

fpcUpDeluxe will ignore that sad fact, it can install any last version.

DUOLabs333 commented 8 months ago

Hmmm, it turns out that compiling lazbuild fails with the same error.

DUOLabs333 commented 8 months ago

It turns out the fix for fpc is in 3.2.4, which means I have to recompile that too. Is it possible for cudatext_up to point to a custom fpc directory, like with lazbuild?

Alexey-T commented 8 months ago

it don't support FPC path yet. try to fork it:

DUOLabs333 commented 8 months ago

Interestingly, if I change the compiler parameter to my locally compiled version, I get Can't find unit system used by emmet_package for each of the packages used.

Alexey-T commented 8 months ago

it means that fpc.cfg file is not fully configured. 'cannot find unit system' error means it. I guess here. not sure!

DUOLabs333 commented 6 months ago

I'll try again soon and see if I can get it working this time.

DUOLabs333 commented 6 months ago

Is there a way to set fpcdeluxe to do a shallow clone (ie, clone --depth 1)?

DUOLabs333 commented 6 months ago

Ok, I got it compiled using fpcupdeluxe!