Cannot build jsonnet after updating (Windows, vcpkg)

19 views
Skip to first unread message

Sebastien Diot

unread,
Apr 22, 2023, 2:18:30 PM4/22/23
to Jsonnet
Hi.

I wanted to report an issue I have with my jsonnet code, which seems to be a "jsonnet bug".

Unfortunately, it seems jsonnet was just updated, so I tried to update my local
(Windows) installation first, to see if the issue was still present.

The effect was, that jsonnet doesn't seem to be able to build anymore,
and so I don't have a jsonnet executable to even test if the issue still exists.

I'm using the "vcpkg" installation (the pip installation fails, maybe it only works on Linux?)  I'm assuming eventually, I'll need to bind some C code into jsonnet,
so I thought I should use the C++ version (also, I don't use go).

This is "approximately" what I did. I tried many things, so I can't say exactly anymore....

I don't really understand how vcpkg works, so I did:

git pull
vcpkg update
vcpkg upgrade
(Not sure if I did update or upgrade first, but I did both several times)

And was hoping I could now get the updated version of jsonnet.

cd ...\vcpkg\buildtrees\jsonnet\src\v0.18.0-f828af1e2a.clean

cmake . -Bbuild
...
*** This line looked "suspicious":
The dependency target "stdlib" of target "libjsonnet_static" does not exist.
...


cmake --build build --target run_tests
...
*** And then I got this error:
C:\Code\vcpkg\buildtrees\jsonnet\src\v0.18.0-f828af1e2a.clean\core\vm.cpp(26,10): fatal error C1083: Cannot open include file: 'nlohmann/json.hpp': No such file or directory [C:\Code\vcpkg\buildtrees\jsonnet\src\v0.18.0-f828af1e2a.clean\build\core\libjsonnet_static.vcxproj]
...


So I searched for "json.hpp":

.../vcpkg$ find . -name "json.hpp"

./buildtrees/jsonnet/src/v0.18.0-f828af1e2a.clean/third_party/json/json.hpp
./buildtrees/nlohmann-json/src/v3.11.2-efdad4750e.clean/include/nlohmann/json.hpp
./buildtrees/nlohmann-json/src/v3.11.2-efdad4750e.clean/single_include/nlohmann/json.hpp
./installed/x86-windows/include/nlohmann/json.hpp
./packages/nlohmann-json_x86-windows/include/nlohmann/json.hpp

It seems to be under "json/json.hpp", not "'nlohmann/json.hpp"

Anyway, I think my jsonnet executable was here before:

...\vcpkg\buildtrees\jsonnet\src\v0.18.0-f828af1e2a.clean\build\Debug

but it got deleted in the re-build, but not recreated, so atm I don't have a working jsonnet executable anymore.

I tried opening the project in Visual Studio itself, but it won't build there either.

Is this problem reproducible for anyone else? And if so, will it get fixed?

Regards,
Sebastien Diot
Reply all
Reply to author
Forward
0 new messages