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

Restore support macOS prior 10.15 #1878

Merged
merged 2 commits into from
Mar 1, 2025
Merged

Conversation

phprus
Copy link
Contributor

@phprus phprus commented Feb 23, 2025

Possible fix for #1877

@radarhere, check this PR, please.

Summary by CodeRabbit

  • Tests
    • Introduced a new CI configuration to validate compatibility on macOS 10.10, enhancing reliability on older macOS versions.
  • Chores
    • Improved build processes with enhanced flag validation checks for Apple platforms, contributing to more consistent and stable compilations.
    • Added conditional checks for additional compiler flags to refine configurations based on the Apple platform.

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Copy link

coderabbitai bot commented Feb 23, 2025

Walkthrough

This pull request introduces a new GitHub Actions job for building and testing on macOS using Clang with a specific deployment target. Additionally, it enhances Apple platform support in the build configuration by conditionally checking for the availability of specific compiler flags and updating related variables in both the main CMake configuration and the configure script.

Changes

File(s) Change Summary
.github/workflows/cmake.yml Added a new CI job “macOS Clang (Target 10.10)” that runs on macos-13 using clang/clang++, sets the deployment target to 10.10 via CMake arguments, and applies linker flag -ld_classic. Positioned before the existing “macOS Clang ASAN” job.
CMakeLists.txt, configure Introduced conditional handling for the Apple compiler flags -Werror=unguarded-availability and -Werror=unguarded-availability-new. In CMakeLists.txt, the flags are checked and added to a temporary variable for Apple platforms. In configure, a temporary source file is compiled with the flags; on success, they are added to ADDITIONAL_CHECK_FLAGS for later use.

Sequence Diagram(s)

sequenceDiagram
  participant GitHub as GitHub Actions
  participant Job as "macOS Clang (Target 10.10) Job"
  GitHub->>Job: Trigger CI workflow
  Job->>Job: Set environment (macos-13, clang/clang++, CMake deployment target 10.10, linker flag -ld_classic)
  Job-->>GitHub: Return test/build results
Loading
sequenceDiagram
  participant Config as Configure Script
  participant Temp as Temporary Source File (test.c)
  participant Compiler as C Compiler
  Config->>Temp: Create minimal test.c file
  Config->>Compiler: Compile test.c with flag -Werror=unguarded-availability
  Compiler-->>Config: Return compilation outcome
  Config->>Config: Update ADDITIONAL_CHECK_FLAGS if compilation succeeds
  Config->>Temp: Create minimal test.c file
  Config->>Compiler: Compile test.c with flag -Werror=unguarded-availability-new
  Compiler-->>Config: Return compilation outcome
  Config->>Config: Update ADDITIONAL_CHECK_FLAGS if compilation succeeds
Loading

Suggested labels

Continuous Integration

Suggested reviewers

  • Dead2
  • nmoinvaz

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9baebc and 52e5243.

📒 Files selected for processing (2)
  • CMakeLists.txt (2 hunks)
  • configure (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • CMakeLists.txt
🔇 Additional comments (7)
configure (7)

635-635: Added new variable for availability checking flags

This change introduces the ADDITIONAL_CHECK_FLAGS variable to hold compiler flags for API availability checking on Apple platforms.


637-647: Good implementation of compiler support check for -Werror=unguarded-availability

This addition correctly checks if the compiler supports the -Werror=unguarded-availability flag and adds it to ADDITIONAL_CHECK_FLAGS when available. This flag is important for macOS/iOS development as it helps catch usage of APIs without proper availability checks, essential for supporting older macOS versions.


649-659: Added check for -Werror=unguarded-availability-new flag

Similar to the previous check, this addition verifies compiler support for the -Werror=unguarded-availability-new flag. This complements the availability checking and is necessary for comprehensive API availability verification on Apple platforms.


717-717: Updated fseeko check to use availability flags

The fseeko function check now includes the ADDITIONAL_CHECK_FLAGS, ensuring the function is checked with proper API availability guards on Apple platforms.


738-738: Updated posix_memalign check to use availability flags

The posix_memalign function check now includes the ADDITIONAL_CHECK_FLAGS, ensuring proper availability checking on Apple platforms.


757-757: Updated aligned_alloc check to use availability flags

The aligned_alloc function check now includes the ADDITIONAL_CHECK_FLAGS, ensuring proper availability checking on Apple platforms.


772-772: Updated strerror check to use availability flags

The strerror function check now includes the ADDITIONAL_CHECK_FLAGS, ensuring proper availability checking on Apple platforms.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
CMakeLists.txt (1)

439-445: Apple-Specific Compiler Flag Check for macOS Support

This block conditionally checks whether the compiler accepts the flag -Wunguarded-availability-new on Apple platforms and, if so, sets CMAKE_REQUIRED_FLAGS to include it along with -Werror. This approach helps ensure that on systems where the flag is supported—typically newer compiler versions—the build process will catch any unguarded API availability issues. In the context of restoring support for macOS prior to 10.15, it might be useful to add an inline comment explicitly stating that this conditional logic is aimed at avoiding issues on older macOS deployments.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d4af45 and d26ffb2.

📒 Files selected for processing (3)
  • .github/workflows/cmake.yml (1 hunks)
  • CMakeLists.txt (1 hunks)
  • configure (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (96)
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC (ARM64)
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC (ARM64)
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC (ARM64)
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC (ARM64)
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC (ARM64)
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows ClangCl Win32
  • GitHub Check: EL9 Clang S390X DFLTCC MSAN
  • GitHub Check: macOS GCC (ARM64)
  • GitHub Check: macOS GCC
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: macOS GCC Symbol Prefix & Compat
  • GitHub Check: Ubuntu GCC AARCH64 No ARMv8 UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 ASAN
  • GitHub Check: macOS Clang Symbol Prefix
🔇 Additional comments (3)
configure (1)

721-731: LGTM! Good addition for macOS compatibility.

The added check for -Wunguarded-availability-new compiler flag helps ensure compatibility with older macOS versions by catching usage of APIs that might not be available. Adding -Werror ensures that any availability warnings are treated as errors, which is particularly important for functions like aligned_alloc that were introduced in macOS 10.15.

.github/workflows/cmake.yml (1)

580-586: LGTM! Well-configured job for testing macOS 10.10 compatibility.

The new job is well-configured for testing compatibility with older macOS versions:

  • Uses macOS-13 runner for latest toolchain
  • Sets deployment target to macOS 10.10
  • Uses -ld_classic to avoid compatibility issues with the new linker in Xcode 15
CMakeLists.txt (1)

450-451: Resetting Compiler Flags to Maintain a Clean Environment

The explicit reset of CMAKE_REQUIRED_FLAGS immediately after the Apple-specific block ensures that the temporary flags used for the check do not leak into subsequent compiler checks. This is a sound practice to avoid side effects in later parts of the CMake configuration.

Copy link

codecov bot commented Feb 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.37%. Comparing base (9d4af45) to head (52e5243).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1878   +/-   ##
========================================
  Coverage    82.37%   82.37%           
========================================
  Files          141      141           
  Lines        12556    12556           
  Branches      2894     2894           
========================================
  Hits         10343    10343           
- Misses        1237     1242    +5     
+ Partials       976      971    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@radarhere
Copy link
Contributor

Thanks very much. Pillow's users have tested this and confirmed that it works.

@phprus
Copy link
Contributor Author

phprus commented Feb 24, 2025

@radarhere, recheck this PR, please, because I update it.

CMakeLists.txt Outdated
Comment on lines 380 to 390
if(APPLE)
check_c_compiler_flag(-Werror=unguarded-availability-new HAVE_W_ERROR_UNGUARDED_AVAILABILITY_NEW)
if(HAVE_W_ERROR_UNGUARDED_AVAILABILITY_NEW)
set(ADDITIONAL_CHECK_FLAGS "-Werror=unguarded-availability-new")
endif()
endif()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For 10.10 and later, the flag should be -Werror=unguarded-availability, as the -Werror=unguarded-availability-new flag only supports 10.13 and later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

configure Outdated
Comment on lines 635 to 660
# Check for -Werror=unguarded-availability-new compiler support
echo "" > test.c
cat > $test.c <<EOF
int main() { return 0; }
EOF
if $cc $CFLAGS -Werror=unguarded-availability-new -c $test.c >> configure.log 2>&1; then
echo "Checking for -Werror=unguarded-availability-new... Yes." | tee -a configure.log
ADDITIONAL_CHECK_FLAGS="-Werror=unguarded-availability-new"
else
echo "Checking for -Werror=unguarded-availability-new... No." | tee -a configure.log
ADDITIONAL_CHECK_FLAGS=""
fi

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as with cmake, should check for -Werror=unguarded-availability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

…availability-new" and add it to maybe affected symbol checking

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
@radarhere
Copy link
Contributor

@radarhere, recheck this PR, please, because I update it.

Pillow's users have tested the version from 13 hours ago, and confirmed that it works.

Copy link
Member

@Dead2 Dead2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Dead2 Dead2 merged commit 8522340 into zlib-ng:develop Mar 1, 2025
152 checks passed
@iago-lito
Copy link

Hello @Dead2, I think that this patch is the one we expect to fix our CI there, although that CI lies dowstream intermediate flate2-rs consumer of zlib-ng.
Just to set our expectations and pick a strategy : what is the usual procedure before such a fix gets released?

iago-lito added a commit to iago-lito/libz-sys that referenced this pull request Mar 17, 2025
iago-lito added a commit to iago-lito/libz-sys that referenced this pull request Mar 17, 2025
@iago-lito
Copy link

@phprus The build is still failing there on develop (commit 50e9ca0). From the CI report, I can read this new configure output:

-- Performing Test HAVE_W_ERROR_UNGUARDED_AVAILABILITY
-- Performing Test HAVE_W_ERROR_UNGUARDED_AVAILABILITY - Success
-- Performing Test HAVE_W_ERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test HAVE_W_ERROR_UNGUARDED_AVAILABILITY_NEW - Success

But the failure seems the same:

src/zlib-ng/zutil_p.h:22:20:
error: call to undeclared library function 'aligned_alloc' with type 'void *(unsigned long, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Am I doing this wrong? Is that CI inappropriate to build zlib-ng? Or should we reopen?

@phprus
Copy link
Contributor Author

phprus commented Mar 17, 2025

@iago-lito
As I see, this is impossible error:

14:06:02 BIOCONDA INFO (ERR)   In file included from /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742220111201/_build_env/.cargo/git/checkouts/libz-sys-ed802c8643ac2f0e/4d071bc/src/zlib-ng/zutil.c:7:
14:06:02 BIOCONDA INFO (ERR)   /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742220111201/_build_env/.cargo/git/checkouts/libz-sys-ed802c8643ac2f0e/4d071bc/src/zlib-ng/zutil_p.h:22:20: error: call to undeclared library function 'aligned_alloc' with type 'void *(unsigned long, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
14:06:02 BIOCONDA INFO (ERR)      22 |     return (void *)aligned_alloc(64, size);  /* Defined in C11 */
14:06:02 BIOCONDA INFO (ERR)         |                    ^
14:06:02 BIOCONDA INFO (ERR)   /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742220111201/_build_env/.cargo/git/checkouts/libz-sys-ed802c8643ac2f0e/4d071bc/src/zlib-ng/zutil_p.h:22:20: note: include the header <stdlib.h> or explicitly provide a declaration for 'aligned_alloc'

Because aligned_alloc is only used if the HAVE_ALIGNED_ALLOC macro is defined.
And <stdlib.h> is included if the HAVE_ALIGNED_ALLOC macro is defined.

The full cmake output is required for diagnostics.

@iago-lito
Copy link

iago-lito commented Mar 18, 2025

Okay thank you @phprus. If the full cmake output is not available in these logs (is it not?), then I'm afraid I can't produce it for diagnostic until I get direct acces to a macOS machine. I'll keep you posted.

Do you think this belongs to another issue?

@phprus
Copy link
Contributor Author

phprus commented Mar 18, 2025

@iago-lito

I'm sorry, for unknown reason the github search didn't find the required part of the log.

As I see:

14:06:02 BIOCONDA INFO (ERR)   -- Looking for aligned_alloc
14:06:02 BIOCONDA INFO (ERR)   -- Looking for aligned_alloc - found

Thus, the HAVE_ALIGNED_ALLOC macro is defined.

If the HAVE_ALIGNED_ALLOC macro is defined, the <stdlib.h> header is included:

zlib-ng/zutil_p.h

Lines 8 to 9 in 50e9ca0

#if defined(__APPLE__) || defined(HAVE_POSIX_MEMALIGN) || defined(HAVE_ALIGNED_ALLOC)
# include <stdlib.h>

and the aligned_alloc function is used:

zlib-ng/zutil_p.h

Lines 19 to 22 in 50e9ca0

#ifdef HAVE_ALIGNED_ALLOC
/* Size must be a multiple of alignment */
size = (size + (64 - 1)) & ~(64 - 1);
return (void *)aligned_alloc(64, size); /* Defined in C11 */

Can you try building with CMAKE_VERBOSE_MAKEFILE=ON ( https://cmake.org/cmake/help/latest/variable/CMAKE_VERBOSE_MAKEFILE.html ) ?

@iago-lito
Copy link

Confusing indeeed @phprus. Here are the logs produced with this verbose option on: https://github.com/bioconda/bioconda-recipes/actions/runs/13947794014/job/39039746164?pr=54435. Does it help?

@phprus
Copy link
Contributor Author

phprus commented Mar 19, 2025

Looks like a broken environment.

When compiling zutil.c, the HAVE_ALIGNED_ALLOC macro is defined, which means the <stdlib.h> header is included.

13:56:31 BIOCONDA INFO (ERR) /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/_build_env/bin/x86_64-apple-darwin13.4.0-clang -DHAVE_ALIGNED_ALLOC -DHAVE_ATTRIBUTE_ALIGNED -DHAVE_BUILTIN_ASSUME_ALIGNED -DHAVE_BUILTIN_CTZ -DHAVE_BUILTIN_CTZLL -DHAVE_POSIX_MEMALIGN -DHAVE_SYS_SDT_H -DHAVE_VISIBILITY_HIDDEN -DHAVE_VISIBILITY_INTERNAL -DWITH_GZFILEOP -DX86_AVX2 -DX86_AVX512 -DX86_AVX512VNNI -DX86_FEATURES -DX86_HAVE_XSAVE_INTRIN -DX86_PCLMULQDQ_CRC -DX86_SSE2 -DX86_SSE42 -DX86_SSSE3 -DX86_VPCLMULQDQ_CRC -DZLIBNG_NATIVE_API -I/opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/work/target/x86_64-apple-darwin/release/build/libz-ng-sys-995b9dfdd43992fb/out/build -I/opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/_build_env/.cargo/git/checkouts/libz-sys-ed802c8643ac2f0e/eb8b707/src/zlib-ng -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-apple-macosx -mmacosx-version-min=14.5 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fstack-protector-strong -pipe -isystem /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include -fdebug-prefix-map=/opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/work=/usr/local/src/conda/dmox-0.1.3 -fdebug-prefix-map=/opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold=/usr/local/src/conda-prefix -O2 -g -DNDEBUG -std=c11 -arch x86_64 -isysroot /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=14.5 -Wall -MD -MT CMakeFiles/zlib.dir/zutil.c.o -MF CMakeFiles/zlib.dir/zutil.c.o.d -o CMakeFiles/zlib.dir/zutil.c.o -c /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/_build_env/.cargo/git/checkouts/libz-sys-ed802c8643ac2f0e/eb8b707/src/zlib-ng/zutil.c

But the compiler does not see the definition of the aligned_alloc function from <stdlib.h> header.

13:56:31 BIOCONDA INFO (ERR)   In file included from /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/_build_env/.cargo/git/checkouts/libz-sys-ed802c8643ac2f0e/eb8b707/src/zlib-ng/zutil.c:7:
13:56:31 BIOCONDA INFO (ERR)   /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/_build_env/.cargo/git/checkouts/libz-sys-ed802c8643ac2f0e/eb8b707/src/zlib-ng/zutil_p.h:22:20: error: call to undeclared library function 'aligned_alloc' with type 'void *(unsigned long, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
13:56:31 BIOCONDA INFO (ERR)      22 |     return (void *)aligned_alloc(64, size);  /* Defined in C11 */
13:56:31 BIOCONDA INFO (ERR)         |                    ^
13:56:31 BIOCONDA INFO (ERR)   /opt/mambaforge/envs/bioconda/conda-bld/dmox_1742392285745/_build_env/.cargo/git/checkouts/libz-sys-ed802c8643ac2f0e/eb8b707/src/zlib-ng/zutil_p.h:22:20: note: include the header <stdlib.h> or explicitly provide a declaration for 'aligned_alloc'
13:56:31 BIOCONDA INFO (ERR)   1 error generated.

@iago-lito
Copy link

Thank you. I'm reporting this to Bioconda.

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 this pull request may close these issues.

7 participants