[GCC-XML] EXTERNAL: Issues with backslashes in gcc reported search path in Windows

Davidson, Josh josh.davidson at lmco.com
Thu Feb 9 18:27:13 EST 2012


Didn't realize you guys already had a function to do exactly this:

c:\TEMP\gccxml\GCC_XML\GXFront>diff gxConfiguration.cxx.old gxConfiguration.cxx
1579a1580,1582
>
>             gxSystemTools::ConvertToUnixSlashes(s);
>
1804a1808,1809
>             gxSystemTools::ConvertToUnixSlashes(s);
>
1809c1814
<
---
>
2030a2036,2037
>             gxSystemTools::ConvertToUnixSlashes(s);
>

-----Original Message-----
From: gccxml-bounces at gccxml.org [mailto:gccxml-bounces at gccxml.org] On Behalf Of Davidson, Josh
Sent: Thursday, February 09, 2012 12:58 PM
To: gccxml at gccxml.org
Subject: EXTERNAL: [GCC-XML] Issues with backslashes in gcc reported search path in Windows

I ran into an issue where different distributions of MinGW report their include search paths differently with respect to how directory separators are used.  Below, you can see the output of one MinGW distribution and corresponding gccxml build that mostly works followed by another that is completely broken.  In the first example, MinGW mostly uses all forward slashes.  There are a couple paths that have backslashes, which MinGW fail on.  In the second example, all of the paths have backslashes, so gccxml doesn't pick up any of the system headers.

Is there a way to work around this?  I don't want to pass in the system includes via -I because that can change from machine to machine.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!COMPILER A GCC CONFIG!!!!!!!!!!!!!!!!!!!!

C:\Users\davidsj2\repos\SimCommon\src\C++\boost>"c:\MinGW-simics\bin\gcc.exe" -v BoostHeaders.hpp Using built-in specs.
COLLECT_GCC=c:\MinGW-simics\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw-simics/bin/../libexec/gcc/x86_64-w64-mingw32/4.5.3/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../build/gcc/src/configure --target=x86_64-w64-mingw32 --prefix=/c/buildbot/mingw-w64/mingw32/mingw-x86-x86_64/build/build/root --with-sysroot=/c/buildbot/mingw-w64/mingw32/mingw-x86-x86_64/build/build/root --enable-languages=all,obj-c++ --enable-fully-dynamic-string --disable-multilib Thread model: win32 gcc version 4.5.3 20110207 (prerelease) (GCC) COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 c:/mingw-simics/bin/../libexec/gcc/x86_64-w64-mingw32/4.5.3/cc1plus.exe -quiet -v -iprefix c:\mingw-simics\bin\../lib/gcc/x86_64-w64-mingw32/4.5.3/ BoostHeaders.hpp -quiet -dumpbase BoostHeaders.hpp -mtune=generic -march=x86-64 -auxbase BoostHeaders -version -o C:\Users\davidsj2\AppData\Local\Temp\ccYFaCr3.s --output-pch=BoostHeaders.hpp.gch GNU C++ (GCC) version 4.5.3 20110207 (prerelease) (x86_64-w64-mingw32)
        compiled by GNU C version 4.4.5 20101001 (release) [svn/rev.164871 - mingw-w64/oz], GMP version 5.0.1, MPFR version 2.4.2, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "c:/buildbot/mingw-w64/mingw32/mingw-x86-x86_64/build/build/rootc:/buildbot/mingw-w64/mingw32/mingw-x86-x86_64/build/build/root/include"
ignoring duplicate directory "c:/mingw-simics/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.5.3/include"
ignoring duplicate directory "c:/mingw-simics/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.5.3/include-fixed"
ignoring nonexistent directory "c:/buildbot/mingw-w64/mingw32/mingw-x86-x86_64/build/build/root/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 c:\mingw-simics\bin\../lib/gcc/x86_64-w64-mingw32/4.5.3/include
 c:\mingw-simics\bin\../lib/gcc/x86_64-w64-mingw32/4.5.3/include-fixed
 c:/mingw-simics/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.3
 c:/mingw-simics/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.3/x86_64-w64-mingw32
 c:/mingw-simics/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.3/backward
 c:/mingw-simics/lib/gcc/../../x86_64-w64-mingw32/include
End of search list.
GNU C++ (GCC) version 4.5.3 20110207 (prerelease) (x86_64-w64-mingw32)
        compiled by GNU C version 4.4.5 20101001 (release) [svn/rev.164871 - mingw-w64/oz], GMP version 5.0.1, MPFR version 2.4.2, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 3fd3e1a57a1ebaa3e31328561e04d6bd

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!COMPILER A GCCXML CONFIG!!!!!!!!!!!!!!!!!!!!

C:\Users\davidsj2\repos\SimCommon\src\C++\boost>"c:\MinGW-simics\bin\gccxml.exe" -v BoostHeaders.hpp ignoring nonexistent directory "c:mingw-simicsbin../lib/gcc/x86_64-w64-mingw32/4.5.3/include"
ignoring nonexistent directory "c:mingw-simicsbin../lib/gcc/x86_64-w64-mingw32/4.5.3/include-fixed"
#include wrapper search starts here:
 c:/MinGW-simics/share/gccxml-0.9/GCC/4.5
#include "..." search starts here:
#include <...> search starts here:
 c:/mingw-simics/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.3
 c:/mingw-simics/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.3/x86_64-w64-mingw32
 c:/mingw-simics/lib/gcc/../../x86_64-w64-mingw32/include/c++/4.5.3/backward
 c:/mingw-simics/lib/gcc/../../x86_64-w64-mingw32/include
End of search list.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!COMPILER B GCC CONFIG!!!!!!!!!!!!!!!!!!!!

C:\Users\davidsj2\repos\SimCommon\src\C++\boost>"c:/MinGW/bin/gcc.exe" -v BoostHeaders.hpp Using built-in specs.
COLLECT_GCC=c:/MinGW/bin/gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/4.6.3/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: /home/drangon/work/mingw-w64-dgn/source/gcc/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-nls --enable-languages=c,c++,objc,obj-c++ --with-gmp=/home/drangon/work/mingw-w64-dgn/build/for_target --enable-twoprocess --disable-libstdcxx-pch --disable-win32-registry --prefix=/home/drangon/work/mingw-w64-dgn/target --with-sysroot=/home/drangon/work/mingw-w64-dgn/target
Thread model: win32
gcc version 4.6.3 20120127 (prerelease) (GCC) COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 c:/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/4.6.3/cc1plus.exe -quiet -v -iprefix c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/ BoostHeaders.hpp -quiet -dumpbase BoostHeaders.hpp -mtune=generic -march=x86-64 -auxbase BoostHeaders -version -o C:\Users\davidsj2\AppData\Local\Temp\cciw6Dae.s --output-pch=BoostHeaders.hpp.gch GNU C++ (GCC) version 4.6.3 20120127 (prerelease) (x86_64-w64-mingw32)
        compiled by GNU C version 4.6.3 20120127 (prerelease), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/x86_64-w64-mingw32"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/backward"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.6.3/include"
ignoring nonexistent directory "/home/drangon/work/mingw-w64-dgn/target/home/drangon/work/mingw-w64-dgn/target/lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.6.3/include-fixed"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/home/drangon/work/mingw-w64-dgn/target/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3
 c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/x86_64-w64-mingw32
 c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/backward
 c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/include
 c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/include-fixed
 c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C++ (GCC) version 4.6.3 20120127 (prerelease) (x86_64-w64-mingw32)
        compiled by GNU C version 4.6.3 20120127 (prerelease), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 5928114aaac0e37010a3909c738d0355


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!COMPILER B GCCXML CONFIG!!!!!!!!!!!!!!!!!!!!

C:\Users\davidsj2\repos\SimCommon\src\C++\boost>"c:/MinGW/bin/gccxml.exe" -v BoostHeaders.hpp ignoring nonexistent directory "c:mingwbin../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3"
ignoring nonexistent directory "c:mingwbin../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/x86_64-w64-mingw32"
ignoring nonexistent directory "c:mingwbin../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/backward"
ignoring nonexistent directory "c:mingwbin../lib/gcc/x86_64-w64-mingw32/4.6.3/include"
ignoring nonexistent directory "c:mingwbin../lib/gcc/x86_64-w64-mingw32/4.6.3/include-fixed"
ignoring nonexistent directory "c:mingwbin../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/include"
#include wrapper search starts here:
 c:/MinGW/share/gccxml-0.9/GCC/4.6
#include "..." search starts here:
#include <...> search starts here:
End of search list.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.gccxml.org/mailman/listinfo/gccxml



More information about the gccxml mailing list