Sysprogs forums › Forums › VisualGDB › Cannot use a relative Gcc path
- This topic has 6 replies, 2 voices, and was last updated 7 years, 2 months ago by
support.
-
AuthorPosts
-
April 13, 2018 at 14:24 #20697
krs
ParticipantI get a gcc not found error when I press MakeFile Settings -> SycronizeSysRoot from VisualGDB.
This works:
<?xml version=”1.0″?>
<CustomToolchain xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<Toolchain>
<UnixSystem>false</UnixSystem>
<AdditionalPathDirectories>
<string>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\</string>
</AdditionalPathDirectories>
<RequireCtrlBreak>false</RequireCtrlBreak>
<SourceDirMapping>
<Directories />
<PathStyle>Unknown</PathStyle>
</SourceDirMapping>
<Name>x86_64-nilrt-linux</Name>
<UniqueID>com.sysprogs.imported.x86_64-nilrt-linux</UniqueID>
<Location>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr</Location>
<GCC>d:\IMS\GWTT\Software\NonEmbedded\VisualStudio\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-gcc.exe</GCC>
<GXX>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-g++.exe</GXX>
<GDB>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-gdb.exe</GDB>
<AR>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-ar.exe</AR>
<OBJCOPY>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-objcopy.exe</OBJCOPY>
<Make>$(VISUALGDB_DIR)\make.exe</Make>
<UseCygwinBash>false</UseCygwinBash>
</Toolchain>
<Type>Linux</Type>
<Version>
<Revision>0</Revision>
</Version>
<Name>x86_64-nilrt-linux</Name>
<IsShared>false</IsShared>
</CustomToolchain>This does not work:
<?xml version=”1.0″?>
<CustomToolchain xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<Toolchain>
<UnixSystem>false</UnixSystem>
<AdditionalPathDirectories>
<string>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\</string>
</AdditionalPathDirectories>
<RequireCtrlBreak>false</RequireCtrlBreak>
<SourceDirMapping>
<Directories />
<PathStyle>Unknown</PathStyle>
</SourceDirMapping>
<Name>x86_64-nilrt-linux</Name>
<UniqueID>com.sysprogs.imported.x86_64-nilrt-linux</UniqueID>
<Location>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr</Location>
<GCC>d:\IMS\GWTT\Software\NonEmbedded\VisualStudio\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-gcc.exe</GCC>
<GXX>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-g++.exe</GXX>
<GDB>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-gdb.exe</GDB>
<AR>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-ar.exe</AR>
<OBJCOPY>$(ProjectDir)\../../../\Dependencies\x64LinuxCompiler\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-objcopy.exe</OBJCOPY>
<Make>$(VISUALGDB_DIR)\make.exe</Make>
<UseCygwinBash>false</UseCygwinBash>
</Toolchain>
<Type>Linux</Type>
<Version>
<Revision>0</Revision>
</Version>
<Name>x86_64-nilrt-linux</Name>
<IsShared>false</IsShared>
</CustomToolchain>April 15, 2018 at 04:52 #20700support
KeymasterHi,
Sorry, this is actually by design – VisualGDB manages toolchains independently from projects (e.g. creates and maintains MSBuild property files, IntelliSense setup files, etc), so that multiple projects can reuse the same settings. As a result, it needs to know the absolute toolchain location without knowing the project location.
Specifying $(ProjectDir) in the toolchain XML file will get this syntax copied to MSBuild files, so most of the build will likely work, although all advanced functionality (like sysroot synchronization, or IntelliSense file caching) may break as VisualGDB expects the location to be project-independent.
Please note that the project/settings files won’t hardcode any toolchain directories – instead they contain the toolchain ID and version, so you can easily share them between multiple computers with different toolchain directories. If this doesn’t help, please let us know what you are trying to achieve and we will try to suggest a configuration that will work.
April 17, 2018 at 13:27 #20709krs
ParticipantI have the following folder structure:
i686-nilrtsdk-mingw32 – with CustomToolchain.xml in \USR folder
project1
project2
project3All projects use the same toolchain file. (same toolchain ID in .vcxproj)
If I understood you correctly I cannot use a VS Macro or User Variable because it is project independent.
So… could I use inside CustomToolchain.xml paths relative to the CustomToolchain.xml file itself?-
This reply was modified 7 years, 2 months ago by
krs.
April 19, 2018 at 09:08 #20721krs
ParticipantCan I use $(TOOLCHAIN_ROOT) instead of absolute path?
April 20, 2018 at 18:17 #20742support
KeymasterHi,
Sorry for the delay. We have added experimental support for relative paths in CustomToolchain.xml (using the $(ToolchainDir) syntax) to this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2185.msi
Let us know if it works for you (you will need to delete the CustomToolchain.xml file and re-import it in order to get the correct path syntax).
April 23, 2018 at 07:55 #20757krs
ParticipantI have installed the provided build. created a new CustomToolchain.xml but the paths inside are not recognized:
<?xml version=”1.0″?>
<CustomToolchain xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<Toolchain>
<UnixSystem>false</UnixSystem>
<AdditionalPathDirectories>
<string>$(ToolchainDir)\</string>
</AdditionalPathDirectories>
<RequireCtrlBreak>false</RequireCtrlBreak>
<SourceDirMapping>
<Directories />
<PathStyle>Unknown</PathStyle>
</SourceDirMapping>
<Name>x86_64-nilrt-linux</Name>
<UniqueID>com.sysprogs.imported.x86_64-nilrt-linux</UniqueID>
<Location>.</Location>
<GCC> $(ToolchainDir)\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-gcc.exe</GCC>
<GXX> $(ToolchainDir)\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-g++.exe</GXX>
<GDB> $(ToolchainDir)\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-gdb.exe</GDB>
<AR> $(ToolchainDir)\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-ar.exe</AR>
<OBJCOPY> $(ToolchainDir)\bin\x86_64-nilrt-linux\x86_64-nilrt-linux-objcopy.exe</OBJCOPY>
<Make>$(VISUALGDB_DIR)\make.exe</Make>
<UseCygwinBash>false</UseCygwinBash>
</Toolchain>
<Type>Linux</Type>
<Version>
<Revision>0</Revision>
</Version>
<Name>x86_64-nilrt-linux</Name>
<IsShared>false</IsShared>
</CustomToolchain>April 23, 2018 at 17:39 #20760support
KeymasterHi,
This could happen if we missed some scenario. Please let us know what exactly do you mean by “paths not recognized”. If you get a specific error message while trying to build or debug a project, please ensure you quote the entire error text and also let us know what exactly triggers it.
-
This reply was modified 7 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.