microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.84k stars 6.3k forks source link

[fontconfig] build failure in VS2022 #30850

Open ShakyTraveler opened 1 year ago

ShakyTraveler commented 1 year ago

Operating system

windows 10

Compiler

MSVC

Steps to reproduce the behavior

vcpkg install fltk

Failure logs

issue_body.md config-x86-windows-dbg-meson-log.txt.log

Additional context

error: building fontconfig:x86-windows failed with: BUILD_FAILED Please ensure you're using the latest port files with git pull and vcpkg update. Then check for known issues at: https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+fontconfig You can submit a new issue at: https://github.com/microsoft/vcpkg/issues/new?title=[fontconfig]+Build+error&body=Copy+issue+body+from+C%3A%2FUsers%2Fkenm%2FDocuments%2FGitHub%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md

FrankXie05 commented 1 year ago
Code:
 #include <stdatomic.h>

void memory_barrier (void) { atomic_thread_fence (memory_order_acq_rel); }
int atomic_add (atomic_int *i) { return atomic_fetch_add_explicit (i, 1, memory_order_relaxed); }
int mutex_trylock (atomic_flag *m) { return atomic_flag_test_and_set_explicit (m, memory_order_acquire); }
void mutex_unlock (atomic_flag *m) { atomic_flag_clear_explicit (m, memory_order_release); }

int main(void) { return 0;}

Compiler stdout:
 stdatomic-primitives-test.c
Note: including file: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\stdatomic.h
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_c11_stdatomic.h(36): error C2061: syntax error: identifier 'atomic_bool'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_c11_stdatomic.h(36): error C2059: syntax error: ';'
FrankXie05 commented 1 year ago

@ShakyTraveler Could you please provide the log files : config-x86-windows-dbg-out, cmake-vars-x86-windows.cmake ?

ShakyTraveler commented 1 year ago

Frank,

I apologize for my delay in responding. I have been traveling.

I searched my drive for "config-x86-windows-dbg-out.log" and "cmake-vars-x86-windows.cmake.log"

The Zip file contains 4 directories corresponding to where the files were found on my computer.

C-Users-kenm-Documents-GitHub-vcpkg-buildtrees-fontconfig == C:/Users/kenm/Documents/GitHub/vcpkg/buildtrees/fontconfig

C-Users-kenm-Documents-GitHub-vcpkg-buildtrees-gettext == C:/Users/kenm/Documents/GitHub/vcpkg/buildtrees/gettext

C-Users-kenm-Documents-GitHub-vcpkg-buildtrees-libiconv == C:/Users/kenm/Documents/GitHub/vcpkg/buildtrees/libiconv

C-Users-kenm-Documents-GitHub-vcpkg-buildtrees-pthreads == C:/Users/kenm/Documents/GitHub/vcpkg/buildtrees/pthreads

I hope this helps. Please let me know if you need any more information.

Thanks for your time and support,

Ken

vcpkg.zip

FrankXie05 commented 1 year ago

@ShakyTraveler At first, through your log, I found that the last error appeared on the include header file #include <stdatomic.h> , so I submitted a PR to fix it. Because we don't build any tests in principle.

However, after I got VS2022 later, I found through the log that even if this header #include <stdatomic.h> is included and an error occurs, it will not prevent the construction of this port.

So, I guess you looked for more logs, but I didn't find anything wrong.

Excuse me again. I need the build process, the steps to reproduce and all the logs. :)

github-actions[bot] commented 1 year ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] commented 11 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] commented 10 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

leok7v commented 6 months ago
#include <stdatomic.h>

typedef _Atomic(_Bool) a_b;

void main(void) {}

results in:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\vcruntime_c11_stdatomic.h(36,24): error C2061: syntax error: identifier 'atomic_bool'
leok7v commented 6 months ago

image

FrankXie05 commented 6 months ago

@leok7v If this is by design, maybe we should ask upstream for advice。 Related feedback: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1813688