[build2] [bug] Compilation error not visible in the reported file (wrong file reported?)

Klaim - Joël Lamotte mjklaim at gmail.com
Tue Mar 13 20:10:39 UTC 2018


I am still (when I can find the time) trying to build ChaiScript with
build2 as an experiment,
my current very short attempt is available there:

https://github.com/Klaim/build2-pkg-chaiscript

(feel free to report me stuffs I do wrong there, I am sometime having
trouble with
the meaning of the buildfile syntax)
The following issue is with the current master (the first commit of the
repo).

I now see the following (trying to build with MSVC 15.6.1, just config.cxx
= cl):

PS G:\perso\experiments\actorsim> bpkg build -d .\build\vs2017\
.\chaiscript-build2\
g:\perso\experiments\actorsim\chaiscript-build2\chaiscript\include\chaiscript\language/chaiscript_prelude.hpp(15):
fatal error C1021: invalid preprocessor command 'to_string'
info: failed to update build\vs2017\dir{chaiscript-6.0.0-develop\}

1. UX: The error report is not clear about which cpp file was being built
(I get it in only in verbose 4, see below) or the target name being built
(it's not clear in the verbose output).
   Suggestion: consider adding the name of the target with an index of
build and then
      each log coming from it would be prefixed by this index (that's more
or less
      what MSBUILD does,it's helpful; I believe ninja does this too?)
      Or anything to help identify in which context (aka the target) that
specific cpp is built.

2. Looking in the header pointed to have an error, there is no preprocessor
directive, even
    less a  "to_string". Does the error is from a preprocessed version of
that file?
    In any way I don't see the relationship.

3. The file lacks an '#include <string>', which I will report right now to
chaiscript, but it's also
    not related to the issue: when added, only the line number of the error
report change
    (so it's really this file that is reported).

For now I am assuming that this is a pre-processing pass being wrong?
Also, I tried the CMake build of ChaiScript to check that I don't see the
same issue,
I got no problem (although it was building with MSVC's C++17 instead of
"latest" version).

A. Joël Lamotte

--------------------------------------
build2 version used:

PS G:\perso\experiments\actorsim> b --version
build2 0.7.0-a.0.7409058f9af24d0a
libbutl 0.7.0-a.0.b726efcfd9462255
host x86_64-microsoft-win32-msvc14.1
Copyright (c) 2014-2017 Code Synthesis Ltd
This is free software released under the MIT license.

PS G:\perso\experiments\actorsim> bpkg --version
bpkg 0.7.0-a.0.22e35bf80cea95dc
libbpkg 0.7.0-a.0.9f695c1d19e55e05
libbutl 0.7.0-a.0.b726efcfd9462255
Copyright (c) 2014-2017 Code Synthesis Ltd
This is free software released under the MIT license.


---------------------------------------
verbose 4 report:
-------
PS G:\perso\experiments\actorsim> bpkg build -d .\build\vs2017\
.\chaiscript-build2\ --verbose 4
mkdir .\build\vs2017\.bpkg\tmp\
trace: pkg_build: configuration: .\build\vs2017\
trace: pkg_build: directory .\chaiscript-build2\
trace: pkg_build: collect chaiscript/6.0.0-develop
trace: collect: add chaiscript/6.0.0-develop
trace: pkg_command: command: update
trace: pkg_command: chaiscript out_root:
.\build\vs2017\chaiscript-6.0.0-develop\
trace: pkg_command: buildspec:
update('.\build\vs2017\chaiscript-6.0.0-develop\')
C:\build2\bin\b --verbose 4
update('.\build\vs2017\chaiscript-6.0.0-develop\')
cl
cxx @G:\perso\experiments\actorsim\build\vs2017\
  cxx        cl at C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX64\x64\cl.exe
  id         msvc
  version    19.13.26128
  major      19
  minor      13
  patch      26128
  signature  Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26128
for x64
  checksum
cc1013e26648f5511e8ea12a01ca9ab36fb6c65cc9d048d2411fa01f95f5689e
  target     x86_64-microsoft-win32-msvc14.1
  runtime    msvc
  stdlib     msvcp
  c stdlib   msvc
bin @G:\perso\experiments\actorsim\build\vs2017\
  target     x86_64-microsoft-win32-msvc14.1
lib --version
bin.ar @G:\perso\experiments\actorsim\build\vs2017\
  ar         lib at C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX64\x64\lib.exe
  id         msvc
  signature  Microsoft (R) Library Manager Version 14.13.26128.0
  checksum
0acfc7e646d4639b888dfd44849f41adab7177971cfd0d974611bc24b889a710
link --version
bin.ld @G:\perso\experiments\actorsim\build\vs2017\
  ld         link at C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX64\x64\link.exe
  id         msvc
  signature  Microsoft (R) Incremental Linker Version 14.13.26128.0
  checksum
608e18b972e868919adc9d38fad46671ccb883c927e830124b13992a50725fc0
cxx chaiscript at G
:\perso\experiments\actorsim\build\vs2017\chaiscript-6.0.0-develop\
  cxx        cl at C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX64\x64\cl.exe
  id         msvc
  version    19.13.26128
  major      19
  minor      13
  patch      26128
  signature  Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26128
for x64
  checksum
cc1013e26648f5511e8ea12a01ca9ab36fb6c65cc9d048d2411fa01f95f5689e
  target     x86_64-microsoft-win32-msvc14.1
  runtime    msvc
  stdlib     msvcp
  c stdlib   msvc
  std        /std:c++latest /D__cpp_modules=201704 /experimental:module
bin chaiscript at G
:\perso\experiments\actorsim\build\vs2017\chaiscript-6.0.0-develop\
  target     x86_64-microsoft-win32-msvc14.1
lib --version
bin.ar chaiscript at G
:\perso\experiments\actorsim\build\vs2017\chaiscript-6.0.0-develop\
  ar         lib at C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX64\x64\lib.exe
  id         msvc
  signature  Microsoft (R) Library Manager Version 14.13.26128.0
  checksum
0acfc7e646d4639b888dfd44849f41adab7177971cfd0d974611bc24b889a710
link --version
bin.ld chaiscript at G
:\perso\experiments\actorsim\build\vs2017\chaiscript-6.0.0-develop\
  ld         link at C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX64\x64\link.exe
  id         msvc
  signature  Microsoft (R) Incremental Linker Version 14.13.26128.0
  checksum
608e18b972e868919adc9d38fad46671ccb883c927e830124b13992a50725fc0
cl -IG:\perso\experiments\actorsim\chaiscript-build2\chaiscript/include
/std:c++latest /D__cpp_modules=201704 /experimental:module /nologo /EHsc
/MD /P /showIncludes /C /WX /Fi:
G:\perso\experiments\actorsim\build\vs2017\chaiscript-6.0.0-develop\chaiscript\static_libs\chaiscript_stdlib.lib.obj.ii
/TP
G:\perso\experiments\actorsim\chaiscript-build2\chaiscript\static_libs\chaiscript_stdlib.cpp
g:\perso\experiments\actorsim\chaiscript-build2\chaiscript\include\chaiscript\language/chaiscript_prelude.hpp(15):
fatal error C1021: invalid preprocessor command 'to_string'
info: failed to update
G:\perso\experiments\actorsim\build\vs2017\dir{chaiscript-6.0.0-develop\}
info: scheduler statistics:

  thread_max_active      8
  thread_max_total       256
  thread_helpers         5
  thread_max_waiting     3

  task_queue_depth       32
  task_queue_full        0

  wait_queue_slots       67
  wait_queue_collisions  0

rmdir -r .\build\vs2017\.bpkg\tmp\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20180313/806ab1f3/attachment.html>


More information about the users mailing list