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

Unable to build on Monterey #1548

Closed
vaccinemedia opened this issue Dec 23, 2024 · 8 comments
Closed

Unable to build on Monterey #1548

vaccinemedia opened this issue Dec 23, 2024 · 8 comments
Assignees
Labels

Comments

@vaccinemedia
Copy link

I've installed the build dependencies using Homebrew and attempted to build on Monterey due to the releases requiring MacOS 13 or above and the build failed. Builds of version 5.x used to work (despite the releases requiring MacOS 13 and above) so I'm wondering if this is a bug i.e. builds should work on Monterey OR if builds will not work on Monterey and this is a hard limit for using Amiberry?

Also as a side note, is it no longer possible to build strictly for Intel or Apple Silicon using the platform= flag? I'm asking because I want to see what the difference is to the SysInfo speed when using Intel with Rosetta and JIT vs Apple Silicon native without JIT

@midwan midwan self-assigned this Dec 23, 2024
@midwan
Copy link
Collaborator

midwan commented Dec 23, 2024

@vaccinemedia
What kind of error(s)? If you can provide specifics, maybe we can figure out what's wrong. It should build I think, there's no hard dependency on any specific OS version in the code.

There are no more platform-specific options like they used to be in the Makefile. But for your test, it doesn't matter: no MacOS version has JIT, only Linux x86_64 does (for v7.0).

@vaccinemedia
Copy link
Author

@midwan there's a lot of deprecated warnings to do with sprint and then finally at 89% complete it just stops. Here's the last few lines of the command line output:

/Users/grahambrown/Downloads/amiberry-7.0.0-RC1/src/osdep/gui/PanelDisplay.cpp:1125:2: warning: '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. [-Wdeprecated-declarations] _stprintf(buffer, _T("%.6f"), selectcr->rate); ^ /Users/grahambrown/Downloads/amiberry-7.0.0-RC1/src/include/uae/string.h:28:19: note: expanded from macro '_stprintf' #define _stprintf sprintf ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("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.") ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ 8 warnings and 1 error generated. gmake[2]: *** [CMakeFiles/Amiberry.dir/build.make:4881: CMakeFiles/Amiberry.dir/src/osdep/gui/PanelDisplay.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:204: CMakeFiles/Amiberry.dir/all] Error 2 gmake: *** [Makefile:156: all] Error 2

@midwan
Copy link
Collaborator

midwan commented Dec 23, 2024

The deprecated warnings are not the issue, it builds even with those (they should be addressed at some point, but that requires changing code that is still in upstream WinUAE, so later). There is 1 error somewhere, as reported in that last line, but it's not included in your snipped above.

It is probably further up the log?

@vaccinemedia
Copy link
Author

Here's the full log from the previous percentage mark containing the error:

[ 92%] Building CXX object CMakeFiles/Amiberry.dir/src/osdep/gui/PanelDisplay.cpp.o In file included from /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:1: In file included from /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan.hpp:96: /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/widgets/container.hpp:144:22: warning: 'remove' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void remove(Widget* widget); ^ /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/widget.hpp:1150:22: note: overridden virtual function is here virtual void remove(Widget* widget); ^ In file included from /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:1: In file included from /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan.hpp:96: /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/widgets/container.hpp:151:22: warning: 'clear' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void clear(); ^ /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/widget.hpp:1161:22: note: overridden virtual function is here virtual void clear(); ^ In file included from /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:1: In file included from /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan.hpp:96: /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/widgets/container.hpp:161:25: warning: 'findWidgetById' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual Widget* findWidgetById(const std::string &id); ^ /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/widget.hpp:1174:25: note: overridden virtual function is here virtual Widget* findWidgetById(const std::string& id); ^ In file included from /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:4: In file included from /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/sdl.hpp:64: /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/sdl/sdlinput.hpp:98:22: warning: '_pollInput' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void _pollInput() { } ^ /Users/grahambrown/Downloads/amiberry/external/libguisan/include/guisan/input.hpp:122:22: note: overridden virtual function is here virtual void _pollInput() = 0; ^ /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:177:19: error: no member named 'round' in namespace 'std' rate = std::round(rate * 1e6) / 1e6; ~~~~~^ /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:190:6: warning: '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. [-Wdeprecated-declarations] _stprintf(buffer, _T("%.6f"), cr->rate); ^ /Users/grahambrown/Downloads/amiberry/src/include/uae/string.h:28:19: note: expanded from macro '_stprintf' #define _stprintf sprintf ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("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.") ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:328:5: warning: '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. [-Wdeprecated-declarations] _stprintf(buffer, _T("%.6f"), cr->rate); ^ /Users/grahambrown/Downloads/amiberry/src/include/uae/string.h:28:19: note: expanded from macro '_stprintf' #define _stprintf sprintf ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("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.") ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:1107:5: warning: '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. [-Wdeprecated-declarations] _stprintf(buffer, _T(":%d"), i); ^ /Users/grahambrown/Downloads/amiberry/src/include/uae/string.h:28:19: note: expanded from macro '_stprintf' #define _stprintf sprintf ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("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.") ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ /Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:1125:2: warning: '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. [-Wdeprecated-declarations] _stprintf(buffer, _T("%.6f"), selectcr->rate); ^ /Users/grahambrown/Downloads/amiberry/src/include/uae/string.h:28:19: note: expanded from macro '_stprintf' #define _stprintf sprintf ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("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.") ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ 8 warnings and 1 error generated. gmake[2]: *** [CMakeFiles/Amiberry.dir/build.make:4881: CMakeFiles/Amiberry.dir/src/osdep/gui/PanelDisplay.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:204: CMakeFiles/Amiberry.dir/all] Error 2 gmake: *** [Makefile:156: all] Error 2

@midwan
Copy link
Collaborator

midwan commented Dec 23, 2024

This is the error:

/Users/grahambrown/Downloads/amiberry/src/osdep/gui/PanelDisplay.cpp:177:19: error: no member named 'round' in namespace 'std' rate = std::round(rate * 1e6) / 1e6; ~~~~~^ 

I'll see if there's a workaround

midwan added a commit that referenced this issue Dec 23, 2024
Added missing cmath include.
Minor refactoring in PanelDisplay.
@midwan
Copy link
Collaborator

midwan commented Dec 23, 2024

@vaccinemedia
See if it builds now, after the latest commit in master - I think adding the #include <cmath> line might have fixed it.

@midwan midwan added the bug label Dec 23, 2024
@vaccinemedia
Copy link
Author

vaccinemedia commented Dec 23, 2024

@midwan success! Thank you for the speedy fix. Awesome!

Screenshot 2024-12-23 at 22 31 01

@midwan
Copy link
Collaborator

midwan commented Dec 23, 2024

Great stuff! Enjoy!

@midwan midwan closed this as completed Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants