Recent

Author Topic: An exception occurred while compiling Unidac using Aarch64  (Read 490 times)

zhougang2046

  • Newbie
  • Posts: 4
An exception occurred while compiling Unidac using Aarch64
« on: September 16, 2024, 02:07:24 pm »
Hello everyone,
 I encountered an exception while cross compiling the Unidac application for Aarch64 on Windows。
fpc & lazarus version:3.3.1 & 3.4
If using native controls, aarch64 can compile successfully, but when using a uniquery , compilation errors occur.
What other parameters need to be set for the compilation environment?
Thanks.

zhougang2046

  • Newbie
  • Posts: 4
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #1 on: September 16, 2024, 02:12:25 pm »
Hello everyone,
 I encountered an exception while cross compiling the Unidac application for Aarch64 on Windows。
fpc & lazarus version:3.3.1 & 3.4
If using native controls, aarch64 can compile successfully, but when using a uniquery , compilation errors occur.
What other parameters need to be set for the compilation environment?
Thanks.

zhougang2046

  • Newbie
  • Posts: 4
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #2 on: September 16, 2024, 02:15:02 pm »
Hello everyone,
 I encountered an exception while cross compiling the Unidac application for Aarch64 on Windows。
fpc & lazarus version:3.3.1 & 3.4
If using native controls, aarch64 can compile successfully, but when using a uniquery , compilation errors occur.
What other parameters need to be set for the compilation environment?
Thanks.

TRon

  • Hero Member
  • *****
  • Posts: 3234
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #3 on: September 16, 2024, 02:27:51 pm »
It is preferable to report compiler exceptions in the bugtracker no matter what the reason for the exception is.

Is your trunk version based on a recent version ? or is it older ?
All software is open source (as long as you can read assembler)

dbannon

  • Hero Member
  • *****
  • Posts: 3061
    • tomboy-ng, a rewrite of the classic Tomboy
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #4 on: September 16, 2024, 02:39:26 pm »
I am not sure exactly what your target system is there ?

OS = Linux
Widget = Win32

Are you sure you need the trunk version of FPC ?  The fixes version is very stable and trunk varies day by day.  Unless there is a specific feature in trunk you need you might be better off using fixes.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

TRon

  • Hero Member
  • *****
  • Posts: 3234
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #5 on: September 16, 2024, 03:04:16 pm »
@dbannon:
Perhaps my interpretation is wrong but from what i gathered TS is developing on windows and trying to cross-compile (to aarch).
All software is open source (as long as you can read assembler)

Zvoni

  • Hero Member
  • *****
  • Posts: 2690
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #6 on: September 16, 2024, 03:30:23 pm »
@dbannon:
Perhaps my interpretation is wrong but from what i gathered TS is developing on windows and trying to cross-compile (to aarch).
My interpretation, too.
Would have expected a "Build-Mode Linux" or something, specifying THERE the correct LCL-Widgetset (GtkX, QTx)
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Laksen

  • Hero Member
  • *****
  • Posts: 776
    • J-Software
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #7 on: September 16, 2024, 05:07:49 pm »
What other parameters need to be set for the compilation environment?

Can you try 2 different experiments?

1. Turn off optimization when building your project (Compilation and Linking -> Optimization level to 0)
2. Disable Debug (Debugging -> Remove all checkmarks here)

dbannon

  • Hero Member
  • *****
  • Posts: 3061
    • tomboy-ng, a rewrite of the classic Tomboy
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #8 on: September 17, 2024, 02:49:12 am »
@dbannon:
Perhaps my interpretation is wrong but from what i gathered TS is developing on windows and trying to cross-compile (to aarch).

Yes, its not clear but if you look at the image posted above the OP has TargetOS=Linux and widgetset=win32. That does not, to me, make a lot of sense. (but when I cross compile, I do it from the command line so don't see what Lazarus displays...)

And my other comment still seems relevant, does the same problem show in FPC-Fixes ? Using trunk does confuse the issue, are we looking a problem in the project or a (temporary) problem in the compiler ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zhougang2046

  • Newbie
  • Posts: 4
Re: An exception occurred while compiling Unidac using Aarch64
« Reply #9 on: September 17, 2024, 09:22:34 am »
Thank you all!
I have found a solution, the website is https://www.cnblogs.com/qiufeng2014/p/18001664
After modifying according to this plan, the compilation worked properly.

 

TinyPortal © 2005-2018