Skip to content

Bump Azure x64 build to macOS-latest - #6910

Merged
knn-k merged 1 commit into
eclipse-omr:masterfrom
AdamBrousseau:azure_mac_latest
Mar 7, 2023
Merged

knn-k merged 1 commit into
eclipse-omr:masterfrom
AdamBrousseau:azure_mac_latest

Conversation

@AdamBrousseau

Copy link
Copy Markdown
Contributor

No description provided.

@AdamBrousseau

Copy link
Copy Markdown
Contributor Author

@0xdaryl @knn-k
Using MacOS-latest fails to compile

error: 'sprintf' is deprecated

@0xdaryl

0xdaryl commented Mar 1, 2023

Copy link
Copy Markdown
Contributor

Build failures should be fixed by #6907.

@knn-k

knn-k commented Mar 1, 2023

Copy link
Copy Markdown
Contributor

sprintf() was deprecated with Xcode 14.
See eclipse-openj9/openj9#16517

@knn-k

knn-k commented Mar 2, 2023

Copy link
Copy Markdown
Contributor

I tried building OMR on macOS with Xcode 14, and found there was another file that fails with sprintf().

@knn-k knn-k mentioned this pull request Mar 2, 2023
@knn-k

knn-k commented Mar 2, 2023

Copy link
Copy Markdown
Contributor

#6907 has been merged, but it seems some more work is required for sprintf().

2023-03-02T11:48:44.8196830Z /Users/runner/work/1/s/compiler/cs2/timer.h:762:7: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
2023-03-02T11:48:44.8198590Z       sprintf(pname, "%s %s", phase, name);

2023-03-02T11:48:44.8220570Z /Users/runner/work/1/s/compiler/env/TRMemory.hpp:1127:20: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
2023-03-02T11:48:44.8222620Z          offset += sprintf(line+offset, "%12llu ", (long long unsigned int)bytes);

@knn-k

knn-k commented Mar 6, 2023

Copy link
Copy Markdown
Contributor

I cannot reproduce the build errors in my previous comment. I see the warning messages with deprecated sprintf() when I build OMR libraries and test programs on my M1 Mac, but they are not errors but just warnings.

@knn-k

knn-k commented Mar 6, 2023

Copy link
Copy Markdown
Contributor

OMR_WARNINGS_AS_ERRORS is ON by default, but it is turned off on AArch64 macOS for some components. That is the reason why I could not reproduce the build error in my environment.
I opened PR #6915 as a workaround for the macOS-latest environment.

@knn-k

knn-k commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

#6915 has been merged, and I re-ran the check on x86-64 macOS.
https://github.com/eclipse/omr/pull/6910/checks?check_run_id=11808897296
Its build completed successfully. See Issue #6516 for the socket test failures in porttest.

@knn-k

knn-k commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

The copyright line in azure-pipelines.yml needs to be updated.

Signed-off-by: Adam Brousseau <adam.brousseau88@gmail.com>
@knn-k knn-k self-assigned this Mar 7, 2023
@knn-k knn-k added the ci label Mar 7, 2023
@babsingh

Copy link
Copy Markdown
Contributor

re #6910 (comment):

The Mac OS failure is not related to the socket test failures from #6516. This PR introduces a new failure which is documented in #6924.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants