How to change the clang verion when compiling AzerothCore with dashboard setup - azerothcore

I'm trying to compile AzerothCore using the dashboard setup on Debian, so I normally compile with:
./acore.sh compiler build
However, my default clang version is 7 and it no longer works with AzerothCore as I need clang-10 or higher.
So I've installed clang-11 and the following works:
clang-11 --version
But when I try to compile, it still uses clang 7 and fails.
How do I change the clang version when compiling AzerothCore?

Open the conf/config.sh file (if you don't have it, copy it from conf/dist/config.sh to conf/config.sh) and change:
CCOMPILERC="/usr/bin/clang"
CCOMPILERCXX="/usr/bin/clang++"
with:
CCOMPILERC="/usr/bin/clang-11"
CCOMPILERCXX="/usr/bin/clang++-11"

Related

Ada Extension for Visual Studio 2019

I have VS2019 and you may or may not remember I had massive troubles with GNAT 2021 working a little while ago. I have been running my Ada programs from the GCC command line using GNATMAKE and everything has been working fine.
A few days ago a friend of mine told me their is an extension to use Ada within VS 2019. So - I checked it out, downloaded and installed it. Everything seems to be working, I can make a new Ada project just like I used to in GNAT 2021. I set the path : C:\GNAT\2018\bin : as the path variable. The problem comes when I go to compile my test code. It, for some reason, cannot find the GNAT toolchain and compiler. It has read that I have GPS 2018 installed, I know this because when I hover my arrow over the code in the IDE - it shows the location.
package Ada.Text_IO
C:\GNAT\2018\lib\gcc\x86_64-pc-mingw32\7.3.1\adainclude\
I do not understand how the compiler cannot find the toolchain yet intellisense clearly can. There is hardly any documentation about the extension online at all, and all the download page has is very scant setup info, which just refers to settng the path, which I have done correctly. Here is the actual compiler error message.
Build started...
1>------ Build started: Project: test, Configuration: Debug x64 ------
1>gprconfig: can't find a toolchain for the following configuration:
1>gprconfig: language 'ada', target 'C:\GNAT\2018\bin', default runtime
1>test.gpr:12:09: no compiler for language "Ada", cannot compile "test.adb"
1>gprbuild: *** compilation phase failed
Has anyone here managed to use this extension successfully and get a program to compile? If I compile the same code using GPS 2018 it works without any errors. Any help on working out how the set the toolchain/compiler paths in VS would be really helpful.
Thank you guys.
Skyla x
EDIT
Hey thank you for the comment - I ran the command from the commandline tool within the VS2019 IDE and it asked me to select the compiler I wanted to use, which I did. i entered S to save the selection and it seemed to have displayed what you said in your comment. Do I have to C/P this anywhere?
Sorry I do not know much about config settings. I generally just plug in and go. Here is what I got.
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
* 1. GNAT for Ada in c:\gnat\2018\bin\ version 2018 (default runtime)
3. GCC-ASM for Asm in c:\gnat\2018\bin\ version 7.3.1
4. GCC-ASM for Asm in c:\gnat\2018\bin\ version 7.3.1
5. GCC-ASM for Asm2 in c:\gnat\2018\bin\ version 7.3.1
6. GCC-ASM for Asm2 in c:\gnat\2018\bin\ version 7.3.1
7. GCC-ASM for Asm_Cpp in c:\gnat\2018\bin\ version 7.3.1
8. GCC-ASM for Asm_Cpp in c:\gnat\2018\bin\ version 7.3.1
9. GCC for C in c:\gnat\2018\bin\ version 7.3.1
10. GCC for C in c:\gnat\2018\bin\ version 7.3.1
11. G++ for C++ in c:\gnat\2018\bin\ version 7.3.1
12. WINDRES for WinRes in c:\gnat\2018\bin\ version 2.28.51.20170529
Select or unselect the following compiler (or "s" to save): s
You can regenerate the same config file in batch mode
with the following command line:
gprconfig --batch --target=x86_64-pc-mingw32 --config=Ada,2018,default,c:\gnat\2018\bin\,GNAT

How to tell Visual Studio Code compiled from source where to find sqlite module?

I am building the Visual Studio Code from the source checked out from the git repository:
git clone https://github.com/microsoft/vscode
I am building using:
export NODE_OPTIONS=--max_old_space_size=2048
./scripts/npm.sh install --arch=armhf
./scripts/code.sh
I am using node 10.16.3 on a Raspberry PI 4, using Raspbian buster
There were no errors during build.
The installation downloads a precompiled version of electron on the first run.
However each time I try and run code, it starts but with an error:
[storage state.vscdb] open(): Unable to open DB due to Error: Cannot find module '../build/Release/sqlite
If I look in node_modules/vscode-sqlite3/build/Release/
I can see:
sqlite3.a
sqlite.a
It is unclear to me why electron/vscode cannot find this library. I would be greatful for any pointers on how to tell the runtime where to look for the modules.
On inspecting the build scripts and after many painful experiments, I've found and solved the 2 problems leading to this error.
The fact that .a static libraries are left behind hinted that some settings in the binding.gyp, config.gpy and/or makefiles are wrong, as Native Node Modules are normally dynamic libraries with an .node extension. One conditional line in the binding.gyp file under vscode-sqlite3 seems to the the culprit:
...
["target_arch=='arm'", {"type": "static_library"}]
...
Disable that line (by removing it or changing 'arm' to something else) and then run:
node-gyp configure
to regenerate the config.gpy file(s) under the build directory. Then build the module with:
node-gyp build
A sqlite.node will be generated in build/Release.
Unfortunately, the latest electron ABI version rarely matches that of the Node.js version. In my configuration, the electron ABI version is 72 (v6.0.12) but the latest stable Node version is for ABI 64. Therefore we have to do an electron-rebuild to update the sqlite.node to match the electron version.
To do this, you would have to first install electron-rebuild (yarn add electron-rebuild) then run electron-rebuild by giving supplying explicitly the version number of the electron binary that vscode downloaded:
electron-rebuild -v 6.0.12 -m /home/dev/vscode -o vscode-sqlite3
Of course you would have to state the version number of your particular version of electron you are building for.
(Please look up electron-rebuild --help for the meaning of the options. It takes a while to rebuild the binary module...)
The resulting sqlite.node can then be moved into the build/Release/. directory under the vscode project directory. Voila, we have a working latest version VS-Code for Raspbian!

g++ is used by qmake and gcc is configured by the kit

"/usr/bin/g++" is used by qmake, but "/usr/bin/gcc" is configured in the kit.
please update your kit of choose a mkspec for qmake that matches your target environment better.
couldn't find any way how to change the complier used by qmake to match the one configured by the kit.
one Tools > Options > Build & Run > kit . there is no way to change the qmake complier back to gcc. and the problem is there is only gcc and clang auto detected by qt 5.9
Tools->Options->build & run->compiler has the settings you need to fix that,
or add new kit, this my kit settings
The problem was that i installed Two versions of Qt and i think there config or something overlapped so the g++ option didn't appear until i remove both versions and installed Qt 5.9.1 again the g++ option appeared and now i don't have the issue any more .

Building SQLITE for the Nodewebkit (Using express.js)

I am having problems compiling SQLite for use with Nodewebkit. After research, it seems that I am having wrong versions of the programs. So I have:
- Node
- NW
- SQLite
Apparently there must be certain version of each of the mentioned programs to make it work.
What versions of the programs I must have, so I can run this command:
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.12.3
This link suggests I should have NW version 0.8.x. But I cant find it for download. Or maybe that is not the problem at all...
I build on Mac using node-webkit v0.12.3 using the following commands:
sudo npm install nw-gyp -g
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.12.3
First, make sure you installed nw-gyp globally. Then, run the command either in the directory containing node-webkit executables (nwjs), or in a subfolder of that folder.
Running the command should then create a node_modules folder in the same directory as the binaries, containing the sqlite3 module.

How to create QT version for arm-linux-generic-elf-32

In my debian linux (with i386 processor).i installed QT creator thats works fine.Also i installed G++ cross compiler to run over another system which is having Debian linux with ARM processor.
Now in QT creator "Tools->Options->Build&Run-->Compilers" i added G++ compiler thats also using "Add" option that also fine.
Now in QT creator "Tools->Options->Build&Run-->Kits" i added new Kit with Name as "G++" , device type as "Desktop" , compiler as "G++ (above step added compiler)" thats also fine.
The problem here is in QT version option.In my QT version option having "QT 5.5.0 GCC 64bit" only. If i select that option it is showing the error because G++ compiler is "arm-linux-generic-elf-32 bit".
It is showing the error like , "The compiler G++ (arm-linux-generic-elf-32 bit) cannot produce code for the QT version QT 5.5.0 GCC 64bit (x86-linux-generic-elf-64bit)" .
For me the executable file only enough, no need to run on target directly.
Guide me how to add QT version for arm-linux-generic-elf-32bit
I had similar problem. Finally I found my mistake:
In menu:
QTCreator/Extras/Einstelungen/Compiler
(I guess it is QTCreator/Tools/Setting/Compiler in English.)
I clicked button Hinzufuegen ("Add") and then Benutzerdefiniert ("User defined") and that was wrong. It is to be: CCG!!!!!!!!!!!!!!!!!!!
Afterwards I had to set up also so called ABI to "arm-linux-generic-elf-32 bit"
Then I had a problem with Qt Versionen - it made its own and I could not delete it. So in "Kits" I inserted the new Qt Version.
It works somehow now...
Sort of crazy...
Select your custom kit, change Qt version to None. This is Windows screenshot, but it's same on Linux. If you have Qt version which config corresponds to your kit's compiller you can choose it instead None

Resources