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

MacOS ARM64 build warning: 'OS_CODE' macro redefined #4585

Closed
JackyWoo opened this issue Jun 15, 2024 · 5 comments · Fixed by #4587
Closed

MacOS ARM64 build warning: 'OS_CODE' macro redefined #4585

JackyWoo opened this issue Jun 15, 2024 · 5 comments · Fixed by #4587
Assignees
Labels

Comments

@JackyWoo
Copy link
Contributor

JackyWoo commented Jun 15, 2024

Describe the bug

Env: MacOS 14.4.1 ARM64 clang 18

Build project with cmake.

In file included from /Users/wujianchao5/project/jd/poco/Foundation/src/adler32.c:8:
/Users/wujianchao5/project/jd/poco/Foundation/src/zutil.h:170:11: warning: 'OS_CODE' macro redefined [-Wmacro-redefined]
  170 | #  define OS_CODE 19
      |           ^
/Users/wujianchao5/project/jd/poco/Foundation/src/zutil.h:141:11: note: previous definition is here
  141 | #  define OS_CODE  7
      |           ^
1 warning generated.
@JackyWoo JackyWoo added the bug label Jun 15, 2024
@JackyWoo JackyWoo changed the title MacOS ARM64 build error: 'OS_CODE' macro redefined MacOS ARM64 build warning: 'OS_CODE' macro redefined Jun 15, 2024
@andrewauclair
Copy link
Contributor

zutil.h is part of zlib which is a 3rd Party library Poco uses. Looks like this code has changed slightly in the latest code, maybe it doesn't cause the issue. Line 40 changed from #if defined(MACOS) || defined(TARGET_OS_MAC) to #if defined(MACOS).

@matejk
Copy link
Contributor

matejk commented Jun 17, 2024

Automated compile and testrun actions on GitHub (M1 MacOS) complete just fine just fine.

https://github.com/pocoproject/poco/actions/runs/9463808045/job/26069810114

I also just tested again the code from branch 1.13.3 on my M1 MacBook Pro and did not see any issues that you report.

@matejk
Copy link
Contributor

matejk commented Jun 17, 2024

Where did you install clang 18 from?

Latest XCode 15.4 installs clang 15.

@matejk
Copy link
Contributor

matejk commented Jun 18, 2024

@JackyWoo, would you try compiling the code from PR #4587?

@JackyWoo
Copy link
Contributor Author

@matejk buid success, thanks.

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

Successfully merging a pull request may close this issue.

3 participants