An exception occurred while compiling Unidac using Aarch64 lazarus / 16-Databases ---------------------------------------------------------------------- zhougang2046 · 2024-09-16 12:07 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 · 2024-09-16 12:12 Quote from: zhougang2046 on September 16, 2024, 02:07:24 pmHello 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 · 2024-09-16 12:15 Quote from: zhougang2046 on September 16, 2024, 02:07:24 pmHello 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 · 2024-09-16 12:27 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 ? ---------------------------------------------------------------------- dbannon · 2024-09-16 12:39 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 ---------------------------------------------------------------------- TRon · 2024-09-16 13:04 @dbannon: Perhaps my interpretation is wrong but from what i gathered TS is developing on windows and trying to cross-compile (to aarch). ---------------------------------------------------------------------- Zvoni · 2024-09-16 13:30 Quote from: TRon 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). My interpretation, too. Would have expected a "Build-Mode Linux" or something, specifying THERE the correct LCL-Widgetset (GtkX, QTx) ---------------------------------------------------------------------- Laksen · 2024-09-16 15:07 Quote from: zhougang2046 on September 16, 2024, 02:07:24 pmWhat 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 · 2024-09-17 00:49 Quote from: TRon 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). 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 ---------------------------------------------------------------------- zhougang2046 · 2024-09-17 07:22 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.