Support Board
Date/Time: Tue, 22 Apr 2025 08:23:48 +0000
Problem: Remote Build in SierraChart_ARM64.exe is creating x64 (Intel) DLLs
View Count: 466
[2025-01-03 21:59:38] |
ForgivingComputers.com - Posts: 1042 |
The ARM version of Sierra Chart appears to create a compatible DLL: the file has _ARM in the name. However, it does not appear in the Add Custom Study window. Upon removing the _ARM part of the file name, it does appear and functions in SierraChart_64.exe. Please fix the remote compiler to support the ARM 64 architecture. |
[2025-01-03 22:05:07] |
Sierra_Chart Engineering - Posts: 19303 |
We cannot add support for ARM in the remote compiler. We just have to prevent it from being used altogether which we will do.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2025-01-03 22:30:07] |
ForgivingComputers.com - Posts: 1042 |
I assume you mean you don't want to do this, as I see no reason it cannot be done with software. It is a "nice to have". I assume there is not much call for building ARM custom studies. However, since you do offer an ARM version of Sierra Chart, you are limiting its functionality in comparison to the main product. This is not a selling point if you want to offer users a choice. I know there are other ways to build ARM DLLs, but none of them are easy. Could you modify the build with Visual C++ to support the ARM version? |
[2025-01-03 23:27:57] |
Sierra_Chart Engineering - Posts: 19303 |
Do you know how this would be done? On the remote build server we use MinGW . Yes this can be done, but the necessary packages for this has to be installed on the system it is being built on: Could you modify the build with Visual C++ to support the ARM version? Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2025-01-04 07:05:10] |
User719512 - Posts: 309 |
I believe it's not just the target architecture; it's also the host architecture that needs to be known. If you look in C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat you can see several lines that set this:... if /I "%1"=="x64" ( set __VCVARSALL_TARGET_ARCH=x64 set __VCVARSALL_HOST_ARCH=x64 set __local_ARG_FOUND=1 ) ... if /I "%1"=="x64_arm64" ( set __VCVARSALL_TARGET_ARCH=arm64 set __VCVARSALL_HOST_ARCH=x64 set __local_ARG_FOUND=1 ) if /I "%1"=="arm64" ( set __VCVARSALL_TARGET_ARCH=arm64 set __VCVARSALL_HOST_ARCH=arm64 set __local_ARG_FOUND=1 ) ... If you are building on a Mac in parallels, I am not certain which option you'd want from the many (probably "arm64"), but on my AMD x64 Windows machine, I can build an ARM binary with: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat
which can also be called like:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x64_arm64
And then instead of doing what Sierra build does when it generates/creates/uses D:\SierraChart\ACS_Source\VisualCCompile.Bat: cl /Zc:wchar_t /GS /GL /W3 /O2 /Zc:inline /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /Oy /Gd /Gy /Oi /GR- /GF /Ot /fp:precise /MT /std:c++17 /LD /EHa /WX- /nologo "D:\SierraChart\ACS_Source\GDIExample.cpp" /link "Gdi32.lib" "User32.lib" /DLL /DYNAMICBASE /INCREMENTAL:NO /OPT:REF /OPT:ICF /MACHINE:X64 /OUT:"D:\SierraChart\Data\GDIExample_64.dll" Do this instead: cl /Zc:wchar_t /GS /GL /W3 /O2 /Zc:inline /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /Oy /Gd /Gy /Oi /GR- /GF /Ot /fp:precise /MT /std:c++17 /LD /EHa /WX- /nologo "D:\SierraChart\ACS_Source\GDIExample.cpp" /link "Gdi32.lib" "User32.lib" /DLL /DYNAMICBASE /INCREMENTAL:NO /OPT:REF /OPT:ICF /MACHINE:ARM64 /OUT:"D:\SierraChart\Data\GDIExample_ARM64.dll" For the local build from within Sierra, Sierra would know what host is running based on whether SierraChart.exe (?), or SierraChart_64.exe, or SierraChart_ARM64.exe is the Sierra process and could build accordingly. Another option is to build locally outside of Sierra with the command line, or Visual Studio. |
[2025-01-04 12:08:28] |
seandunaway - Posts: 348 |
last i looked, mingw has some unofficial arm64 targets but they haven't made it upstream yet if you switched to llvm you get all the cross-compile targets built in it's a clean portable install and compile commands would look like clang++ -target aarch64-pc-windows-msvc -O2 -shared file.cpp -lgdi32
clang++ -target x86_64-pc-windows-msvc -O2 -shared file.cpp -lgdi32 llvm also has clang-cl which takes cl.exe's same command line arguments (e.g. /MACHINE:ARM64 /O2 /DLL /LINK "Gdi32.lib") is the remote build server windows or linux? if it's windows, using cl.exe against the official windows sdk instead of mingw would be ideal if it's linux, what's the distro, architecture and exact version? i'd be willing to spin up a vm and document the exact commands to get it all working proper. would you want to use the distro's package manager for system wide setup and updating, or portable installs of all the dependencies in a single folder? Date Time Of Last Edit: 2025-01-04 12:35:56
|
[2025-01-04 23:08:06] |
Sierra_Chart Engineering - Posts: 19303 |
The build server is Linux. Ubuntu 22.04.5 LTS. The server uses Intel 64-bit CPUs. would you want to use the distro's package manager for system wide setup and updating Yes.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2025-01-04 23:32:37
|
[2025-01-05 04:45:47] |
seandunaway - Posts: 348 |
cross-compiling x64 and arm64 dlls from ubuntu 22 using llvm $ uname -a
Linux localhost 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 22.04.5 LTS Release: 22.04 Codename: jammy $ whoami root install official llvm public key $ curl -L https://apt.llvm.org/llvm-snapshot.gpg.key > /etc/apt/trusted.gpg.d/apt.llvm.org.asc
add official llvm ubuntu repository (windows sdk complains ubuntu 22's default llvm version is too old to compile) $ add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main'
install llvm $ apt install --no-install-recommends clang-19 clang-tools-19 lld-19 unzip
install official windows sdk from microsoft to /opt/winsysroot *alternatively you can copy the windows sdk from your visual studio install. however, this is nice because it creates symlinks to deal with linux filesystems being case sensitive while windows isn't (e.g. Windows.h vs windows.h). sierrachart headers are using some non-standard header casings $ curl -L https://github.com/Jake-Shadle/xwin/releases/download/0.6.5/xwin-0.6.5-x86_64-unknown-linux-musl.tar.gz | tar -zxvf -
$ xwin-0.6.5-x86_64-unknown-linux-musl/xwin --accept-license --temp --sdk-version 10.0.22621 --arch aarch64,x86_64 splat --preserve-ms-arch-notation --use-winsysroot-style --output /opt/winsysroot Manifest [0s] 16.12 MiB/16.12 MiB 📥 downloaded CRT.headers [0s] 13.93 MiB/13.93 MiB 📦 splatted CRT.libs.x86_64.desktop [0s] 201.98 MiB/201.98 MiB 📦 splatted CRT.libs.x86_64.store [0s] 82.91 MiB/82.91 MiB 📦 splatted CRT.libs.aarch64.desktop [0s] 190.34 MiB/190.34 MiB 📦 splatted CRT.libs.aarch64.store [0s] 200.51 MiB/200.51 MiB 📦 splatted SDK.headers.all.none [0s] 90.08 MiB/90.08 MiB 📦 splatted SDK.headers.all.store [0s] 225.15 MiB/225.15 MiB 📦 splatted SDK.headers.x86_64.none [0s] 45.36 KiB/45.36 KiB 📦 splatted SDK.headers.aarch64.none [0s] 105.04 KiB/105.04 KiB 📦 splatted SDK.libs.x86_64 [0s] 73.45 MiB/73.45 MiB 📦 splatted SDK.libs.aarch64 [0s] 141.52 MiB/141.52 MiB 📦 splatted SDK.libs.store.all [0s] 117.84 MiB/117.84 MiB 📦 splatted SDK.ucrt.all [0s] 241.38 MiB/241.38 MiB 📦 splatted symlinks [3s] 4641/4641 $ rm -r xwin-0.6.5-x86_64-unknown-linux-musl $ cd /opt/winsysroot/Windows\ Kits/10 && ln -s include Include && ln -s lib Lib && cd - review: we've installed llvm system wide and windows sdk to /opt/winsysroot $ clang++-19 --version
Ubuntu clang version 19.1.6 (++20241217105927+657e03f8625c-1~exp1~20241217105943.71) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm-19/bin $ du -hs /opt/winsysroot/ 1.1G /opt/winsysroot/ grab sierrachart headers $ curl -L https://download2.sierrachart.com//downloads/ZipFiles/SierraChart2730.zip > SierraChart2730.zip
$ unzip SierraChart2730.zip "ACS_Source/*" && rm SierraChart2730.zip && cd ACS_Source and finally.. compile for x64 $ clang-cl-19 --target=x86_64-pc-windows-msvc -fuse-ld=lld /winsysroot /opt/winsysroot /LD /FeGDIExample_64.dll GDIExample.cpp
$ file GDIExample_64.dll GDIExample_64.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows compile for arm64 $ clang-cl-19 --target=aarch64-pc-windows-msvc -fuse-ld=lld /winsysroot /opt/winsysroot /LD /FeGDIExample_arm64.dll GDIExample.cpp
$ file GDIExample_arm64.dll GDIExample_arm64.dll: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows clang-cl-19 -help and lld-link-19 -help for additional arguments for optimizations, warnings, debug builds and such (e.g. /O2 /W4 and /link /noimplib) if you run into any issues i'm happy to help any way i can Date Time Of Last Edit: 2025-01-05 17:10:49
|
[2025-01-16 15:26:35] |
Sierra_Chart Engineering - Posts: 19303 |
Thank you. We will review.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: