Repository navigation
[#555] fix: macos compatibility - #561
Conversation
|
Raising draft because can't run macos ci locally to diagnose the issue. |
5c89e20 to
c98c41d
Compare
4faf887 to
7533410
Compare
Unecessary files were modified as a result of uncrustify formatting so I believe I should keep those formatting changes so we can keep it consistent. Additionally macos ci passes now @jesperpedersen . |
|
I ran uncrustify, so you can rebase now |
Great rebased. |
b4b15ec to
6bdfaf8
Compare
|
Try and rebase |
Done. |
|
@botirk38 How is it failing ? Its C17+ |
maybe not supported on clang macos, let me see its working locally only failing CI. I think github uses intel mac image |
|
Squash |
|
You are going up in commits... |
Is there a fix for this, sorry didn't see I am trying to diagnose the issue |
|
One PR == one commit |
I will rebase when I fix is that ok? I found out github use clang15.0.0 for macos images |
|
Solution ? |
1 min running ci on my fork, i removed maybe unused not needed. |
|
Absolutely not - you are breaking FreeBSD |
|
Create Rocky Linux 9 and FreeBSD 14.2 VMs and do testing there as well |
|
Is there a way to upgrade clang on |
|
@Mohab96 Cc: |
464440b to
65d36aa
Compare
? |
075e5af to
a8a9c22
Compare
can we use attribute(unused) its widely supported as well also GCC is a symlink to clang on macos, that is stupid, MacOS clang doesn't support [[maybe]], that's why clang builds because I symlinked clang to homebrew installation from llvm while gcc is symlinked to MacOS clang, what should be my approach @jesperpedersen. I think the best solution is something like below #ifdef HAVE_DARWIN
#define MAYBE __attribute__(unused)
#elif HAVE_BSD || HAVE_LINUX
#define MAYBE [[maybe]]
|
|
Yes, you can change it if it works better on Mac |
- Refactor macOS build workflow for better readability - Consolidate dependency installation and use environment variables - Update shell execution from /bin/sh to bash for compatibility - Improve code readability in utils.c and remove unnecessary blank lines - Enhance testsuite.sh with platform-independent functions and better error handling - Add PostgreSQL dependency checks to ensure proper test setup refactor(utils.c): remove conditional compilation for Linux and improve format specifiers for better portability and readability chore(testsuite.sh): refactor comments and formatting for improved readability and consistency in the test suite script style(testsuite.sh): format code for better readability and consistency by adjusting indentation and spacing throughout the script style(testsuite.sh): format shell script for consistent indentation and spacing to improve readability build(CMake): set CMAKE_C_FLAGS to use GNU17 standard for C compilation to ensure compatibility with modern C features fix(CMakeLists.txt): change C standard from gnu17 to gnu11 to ensure compatibility with older compilers chore(ci): format YAML file for consistency and readability by adjusting indentation and removing unnecessary spaces feat(ci): add step to check compiler version to ensure the correct version is used during the CI process chore(ci): specify compiler commands in CI workflow for clarity and consistency build(CMakeLists.txt): update CMake configuration to use C standard gnu17 and suppress C++11 extension warnings for better compatibility feat(CMakeLists.txt): remove unnecessary CFLAGS for gnu17 and C++11 extensions to simplify build configuration feat(security.c): implement ARM-specific CRC32C calculation function for improved performance on aarch64 architecture chore(utils.c): remove unused attribute [[maybe_unused]] from calculate_offset function to clean up code refactor(security.c): remove unused pgmoneta_crc32c_arm function to clean up code refactor(utils.c): add [[maybe_unused]] attribute to unused functions and improve snprintf format specifiers for better compatibility build(CMake): add compiler flags to suppress warnings for C++17 extensions on macOS to ensure compatibility with older codebases chore(ci): add LLVM to PATH in CI workflow to ensure proper build environment fix(CMakeLists.txt): update CMAKE_C_FLAGS to use gnu-11 standard for better compatibility with C++ features chore(ci): remove LLVM from PATH setup in CI workflow to streamline environment configuration style(security.c, utils.c): replace [[maybe_unused]] with __attribute__((unused)) for better compatibility with compilers chore(CMakeLists.txt): remove deprecated CMAKE_C_FLAGS for gnu-11 to clean up the build configuration chore(ci): remove compiler version check step to streamline CI workflow chore(ci): clean up CI workflow by removing GCC build steps and using xcrun to find clang This change simplifies the CI process by focusing on Clang for builds and tests, improving maintainability and reducing complexity.
Done. |
|
Merged. Thanks for your contribution ! |
fixes #555