[odb-users] compiling odb library

Phillip Shelton phillip.shelton at cardno.com.au
Wed Mar 16 18:22:08 EDT 2022


Hi,
Thank you for your continued attention to my problem.

So I reran the first command with the addition of --verbose=3

>C:\compilers\hello>b hello\ config.cxx=g++.exe --verbose=3
>git --exec-path=c:\compilers\build2\bin -C C:\compilers\hello\hello status --porcelain
>git --exec-path=c:\compilers\build2\bin -C C:\compilers\hello\hello cat-file commit HEAD
>g++.exe -v
>g++.exe -print-multiarch
>g++.exe -dumpmachine
>g++.exe -x c++ -E -
>bin hello at C:\compilers\hello\hello\
>  target     x86_64-w64-mingw32
>ar --version
>bin.ar hello at C:\compilers\hello\hello\
>  ar         ar at c:\compilers\mingw64\bin\ar.exe
>  id         gnu
>  version    2.37.0
>  major      2
>  minor      37
>  patch      0
>  signature  GNU ar (Binutils for MinGW-W64 x86_64, built by Brecht Sanders) 2.37
>  checksum   8b18fcf21c014384bee439d72372acdd72d46a303f085093f9b8d9c73ae48fd9
>windres --version
>bin.rc hello at C:\compilers\hello\hello\
>  rc         windres at c:\compilers\mingw64\bin\windres.exe
>  id         gnu
>  signature  GNU windres (Binutils for MinGW-W64 x86_64, built by Brecht Sanders) 2.37
>  checksum   9849d35468adb4b53e9f6c57dc458a13cdab51c447a945ab6c34b6a2cc68137e
>g++.exe -std=c++23 -print-search-dirs
>terminate called after throwing an instance of 'butl::invalid_basic_path<char>'
>  what():  invalid filesystem path

And it seems to bear out your concern with -print-search-dirs.  

C:\compilers\hello>g++.exe -std=c++23 -print-search-dirs
install: c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/
programs: =c:/compilers/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../libexec/gcc/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/
libraries: =c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;/mingw/lib/x86_64-w64-mingw32/11.2.0/;/mingw/lib/../lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../;/mingw/lib/

C:\compilers\hello>g++.exe -std=c++2a -print-search-dirs
install: c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/
programs: =c:/compilers/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../libexec/gcc/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/
libraries: =c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;/mingw/lib/x86_64-w64-mingw32/11.2.0/;/mingw/lib/../lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../;/mingw/lib/

Okay, it doesn't seem to matter if I use c++2a or c++23.  That was one of my concerns after seeing the result of the --verbose=3 output. But I am not sure that I should be seeing ;/mingw/lib/ in either of them.  That sounds like it would be trying to find a root directory called mingw in whatever drive was current for the build. Which I know I don't have.

And,

>C:\compilers\hello>g++.exe -std=c++2a -x c++ -v -E - <empty
>The system cannot find the file specified.

I assumed you meant the comment only file I created yesterday.

>C:\compilers\hello>g++.exe -std=c++2a -x c++ -v -E - <dummy
>Using built-in specs.
>COLLECT_GCC=g++.exe
>OFFLOAD_TARGET_NAMES=nvptx-none
>Target: x86_64-w64-mingw32
>Configured with: ../configure --prefix=/R/winlibs64_stage/inst_gcc-11.2.0/share/gcc --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --enable-offload-targets=nvptx-none --with-pkgversion='MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders' --with-tune=generic --enable-checking=release --enable-threads=posix --disable-sjlj-exceptions --disable-libunwind-exceptions --disable-serial-configure --disable-bootstrap --enable-host-shared --enable-plugin --disable-default-ssp --disable-rpath --enable-libstdcxx-pch --enable-libstdcxx-time=yes --disable-libstdcxx-debug --disable-version-specific-runtime-libs --with-stabs --disable-symvers --enable-languages=c,c++,fortran,lto,objc,obj-c++,d,jit --disable-gold --disable-nls --disable-stage1-checking --disable-win32-registry --disable-multilib --enable-ld --enable-libquadmath --enable-libada --enable-libssp --enable-libstdcxx --enable-lto --enable-fully-dynamic-string --enable-libgomp --enable-graphite --enable-mingw-wildcard --with-mpc=/d/Prog/winlibs64_stage/custombuilt --with-mpfr=/d/Prog/winlibs64_stage/custombuilt --with-gmp=/d/Prog/winlibs64_stage/custombuilt --with-isl=/d/Prog/winlibs64_stage/custombuilt --enable-install-libiberty --enable-__cxa_atexit --without-included-gettext --with-diagnostics-color=auto --enable-clocale=generic --with-libiconv --with-system-zlib --with-build-sysroot=/R/winlibs64_stage/gcc-11.2.0/build_mingw/mingw-w64 CFLAGS=-I/d/Prog/winlibs64_stage/custombuilt/include/libdl-win32
>Thread model: posix
>Supported LTO compression algorithms: zlib zstd
>gcc version 11.2.0 (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders)
>COLLECT_GCC_OPTIONS='-std=c++20' '-v' '-E' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
> c:/compilers/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/cc1plus.exe -E -quiet -v -iprefix c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/ -D_REENTRANT - -mtune=generic -march=x86-64 -std=c++20 -dumpbase -
>ignoring duplicate directory "c:/compilers/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include/c++/11.2.0"
>ignoring duplicate directory "c:/compilers/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include/c++/11.2.0/x86_64-w64-mingw32"
>ignoring duplicate directory "c:/compilers/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include/c++/11.2.0/backward"
>ignoring duplicate directory "c:/compilers/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include"
>ignoring nonexistent directory "R:/winlibs64_stage/inst_gcc-11.2.0/share/gcc/include"
>ignoring nonexistent directory "/R/winlibs64_stage/inst_gcc-11.2.0/share/gcc/include"
>ignoring duplicate directory "c:/compilers/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"
>ignoring duplicate directory "c:/compilers/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"
>ignoring nonexistent directory "/mingw/include"
>#include "..." search starts here:
>#include <...> search starts here:
> c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include/c++/11.2.0
> c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include/c++/11.2.0/x86_64-w64-mingw32
> c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include/c++/11.2.0/backward
> c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/include
> c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include
> c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed
> c:\compilers\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include
>End of search list.
>cc1plus.exe: warning:  is shorter than expected
># 0 "<stdin>"
># 0 "<built-in>"
># 0 "<command-line>"
># 1 "<stdin>"
>COMPILER_PATH=c:/compilers/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../libexec/gcc/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/
>LIBRARY_PATH=c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;c:/compilers/mingw64/bin/../lib/gcc/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;c:/compilers/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../
>COLLECT_GCC_OPTIONS='-std=c++20' '-v' '-E' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

I am glad to see that compiler is prepared to ignore the non-existent directories. 

I must admit I am not sure what I am look for here.

Phillip Shelton
Senior Transport Modeller
Cardno

Phone +61 7 3877 6991  
Address Level 11, 515 St Paul's Terrace, Fortitude Valley, 4006 Queensland Australia
Postal Locked Bag 4006, Fortitude Valley 4006
Email phillip.shelton at cardno.com.au  Web www.cardno.com

Cardno operates a quality management system that has been certified to ISO 9001.

This email and its attachments may contain confidential and/or privileged information for the sole use of the intended recipient(s). All electronically supplied data must be checked against an applicable hardcopy version which shall be the only document for which Cardno warrants accuracy. If you are not the intended recipient, any use, distribution or copying of the information contained in this email and its attachments is strictly prohibited. If you have received this email in error, please email the sender by replying to this message and immediately delete and destroy any copies of this email and any attachments. The views or opinions expressed are the author's own and may not reflect the views or opinions of Cardno.

-----Original Message-----
From: Boris Kolpackov <boris at codesynthesis.com> 
Sent: Wednesday, 16 March 2022 9:44 PM
To: Phillip Shelton <phillip.shelton at cardno.com.au>
Cc: odb-users at codesynthesis.com
Subject: Re: [odb-users] compiling odb library

Phillip Shelton <phillip.shelton at cardno.com.au> writes:

> > C:\compilers\hello>b hello\ config.cxx=g++.exe terminate called 
> > after throwing an instance of 'butl::invalid_basic_path<char>'
> >   what():  invalid filesystem path
> 
> It failed with the same error.

Ok, that's good, I feel like we are getting close. Could you re-run the above command with --verbose=3:

> b hello\ config.cxx=g++.exe --verbose=3


Also, could you run the following two commands (I suspect the output from one of them is the culprit):

> g++.exe -std=c++2a -print-search-dirs

> g++.exe -std=c++2a -x c++ -v -E - <empty



More information about the odb-users mailing list