December 15, 2021 at 12:02 #31892
We have a Linux VisualGDB project which is build with crosscompile on Windows successfully.
To easier integrate into our CI/CD it is requested to build the project directly on a Linux machine.
(Clone diretly to the Linux Box and build the project)
How can this get done? Digged around but did not get any idea how to do it.December 15, 2021 at 20:12 #31893
This is generally possible, although might require some adjustments and troubleshooting due to differences between Windows and Linux.
If you could let us know the build system you are using (GNU Make, CMake or MSBuild), we can point you to the right direction.
Please also let us know the email address associated with your license key (or update the forum profile accordingly), so that we could link your support profile to the forum profile.December 16, 2021 at 01:54 #31895
Thank you for the reply. Glad to hear that there is a possibility!
The project is a MSBuild project.
How should i send you further information about the license i’ve?
(I don’t want to share email or license information in the post)December 16, 2021 at 10:23 #31902
No problem. You can simply send us your license key (or email address associated with it) and a link to this post via our support form and we will link them together.December 17, 2021 at 16:53 #31903
Done. May i come back to the question and kindly ask for any hints.December 17, 2021 at 19:20 #31904
Thanks for renewing your technical support.
Locally-built MSBuild projects support generating batch files to build the projects outside Visual Studio (see this page for details). A batch file will contain a list of gcc/linker command lines referencing the response files (.rsp) that contain the actual GCC command lines. The response files are used to bypass the Windows command line length limitation.
If you would like to build the same project on Linux, we would advise following the steps below:
- Enable the generation of batch files and make sure the generated batch file works on the Windows machine.
- Create a basic tool/script that will parse the batch file and replace Windows-specific paths with their Linux equivalents (don’t forget to convert CRLF line endings to LF and the ‘REM’ comments to ‘#’)
- Once the substitutions are performed, you can try running the updated script file on Linux. It will invoke gcc/linker with the same arguments that should result in a successful build. Once you confirm that it works manually, running it from the CI system should be straight-forward.
Note that as Linux does not have a command line length limitation, you can expand the references to the .rsp files in-place, e.g.:C++1gcc @debug/file.rsp
where file.rsp containsC++1-IC:/dir test.c -o test.o
can be expanded to just:C++1gcc -I/path/on/Linux/dir test.c -o test.o
You must be logged in to reply to this topic.