8000 On Apple M3, meson setup incorrectly identify as x86_64 · Issue #392 · gtkwave/gtkwave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

On Apple M3, meson setup incorrectly identify as x86_64 #392

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

Open
alansuphd opened this issue Nov 30, 2024 · 5 comments
Open

On Apple M3, meson setup incorrectly identify as x86_64 #392

alansuphd opened this issue Nov 30, 2024 · 5 comments

Comments

@alansuphd
Copy link

I am using a MacBook Pro with Apple M3 chip. Following the compiling instructions in README.md, after all needed tools and packages are installed, then download from git the gtkwave, then at meson setup, it finds:

Host machine cpu family: x86_64
Host machine cpu: x86_64

Nonetheless, I tried to proceed with meson compile. At step [253/257] Linking target contrib/rtlbrowse/rtlbrowse, error messages started with

FAILED: contrib/rtlbrowse/rtlbrowse

then after hundreds of lines of error messages, the compilation stops with below messages and appears to be the problem by mistaking Apple M3 as x86_64:

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[256/257] Compiling C++ object contrib/xml2stems/xml2stems.p/xml2stems.cc.o
../contrib/xml2stems/xml2stems.cc:169:37: 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]
169 | sprintf(genname, "%s:G%d", nam, geninst++);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:274:1: note: 'sprintf' has been explicitly marked deprecated here
274 | __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/MacOSX.sdk/usr/include/sys/cdefs.h:218:48: note: expanded from macro '__deprecated_msg'
218 | #define __deprecated_msg(_msg) attribute((deprecated(_msg)))
| ^
1 warning generated.
ninja: build stopped: subcommand failed.

@tbybell
Copy link
Collaborator
tbybell commented Nov 30, 2024

There are about 250+ sprintf code declarations in the codebase. For the time being, turn off that warning. The code has gone through a security audit for these kinds of buffer overflows and should know what it is doing.

@alansuphd
Copy link
Author

I have the same problem. Any suggestions?

@rfuest
Copy link
Collaborator
rfuest commented Jan 9, 2025

My guess would be that meson is running using Rosetta 2 in x86_64 mode. Perhaps you did change the config of your terminal in the past to run your shell this way? I don't own a Mac and can't give you detailed advice, but there seems to be an arch command to show the current architecture the shell is using or to start a new shell with a different architecture.

If you are sure that meson is invoked in ARM mode it would be helpful if you upload the full meson log (build/meson-logs/meson-log.txt) to debug the issue further.

@umazhar
Copy link
umazhar commented Jan 27, 2025

Any suggestions? I have the same issue.

@rfuest
Copy link
Collaborator
rfuest commented Jan 27, 2025

Did you try the suggestions in my previous comment?

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

No branches or pull requests

4 participants
0