Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build fails when using json-c 0.17 #2144

Closed
jfx2006 opened this issue Nov 8, 2023 · 1 comment · Fixed by #2145
Closed

Windows build fails when using json-c 0.17 #2144

jfx2006 opened this issue Nov 8, 2023 · 1 comment · Fixed by #2145
Assignees

Comments

@jfx2006
Copy link
Contributor

jfx2006 commented Nov 8, 2023

Description

Building using json-c 0.17 using clang-cl w/ MSVC libraries fails with:

C:\src\install\include\json-c\json_inttypes.h(34,17): error C2628: 'SSIZE_T' followed by '__int64' is illegal (did you forget a ';'?) [C:\src\rnp-v0.17.0\rnp-v0.17.0\build\src\lib\librnp-obj.vcxproj]

Steps to Reproduce

  1. Build/install json-c 0.17 with cmake
  2. Set up RNP v0.17 to build with vcpkg for other dependencies (downgrade botan to 2.19.2)
  3. Run cmake to configure (msvc), & build

Expected Behavior

Successful build

Actual Behavior

Build fails with above error.
Further info when building with Thunderbird's build setup:

In file included from /builds/worker/checkouts/gecko/comm/third_party/rnp/src/rnp/fficli.cpp:59:
In file included from /builds/worker/checkouts/gecko/comm/third_party/rnp/src/rnp/fficli.h:37:
In file included from /builds/worker/workspace/obj-build/comm/third_party/json-c/json.h:27:
In file included from /builds/worker/checkouts/gecko/comm/third_party/json-c/json_object.h:26:
    /builds/worker/checkouts/gecko/comm/third_party/json-c/json_inttypes.h(34,17): error: 'long long type-name' is invalid
   34 | typedef SSIZE_T ssize_t;
        |                 ^
 /builds/worker/checkouts/gecko/comm/third_party/rnp/src/common/uniwin.h(38,17): note: expanded from macro 'ssize_t'
 #define ssize_t __int64
                 ^

uniwin.h's #define conflicts with json-c's (new in 0.17) typedef.

@ni4
Copy link
Contributor

ni4 commented Nov 8, 2023

Thanks for reporting! @antonsviridenko would you have a time to look into it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants