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] Build fails from master branch: error: use of undeclared identifier '__m128i', error: call to undeclared library function 'memset' #218

Open
barracuda156 opened this issue Jan 17, 2024 · 3 comments

Comments

@barracuda156
Copy link

I have tried CMake build from the master now on macOS Sonoma. There are several failures:

:info:build [ 66%] Building C object udis86/CMakeFiles/udis.dir/__/libudis86/itab.c.o
:info:build cd /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/build/udis86 && /opt/local/bin/clang-mp-17  -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/build -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/build/libudis86 -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/wxHexEditor-f439d8f3bfbccbf7f7ec587b548a7d7421978b2f/udis86/libudis86 -pipe -Os -DNDEBUG -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -std=gnu11 -MD -MT udis86/CMakeFiles/udis.dir/__/libudis86/itab.c.o -MF CMakeFiles/udis.dir/__/libudis86/itab.c.o.d -o CMakeFiles/udis.dir/__/libudis86/itab.c.o -c /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/build/libudis86/itab.c
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/wxHexEditor-f439d8f3bfbccbf7f7ec587b548a7d7421978b2f/mhash/lib/whirlpool.c:59:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/wxHexEditor-f439d8f3bfbccbf7f7ec587b548a7d7421978b2f/mhash/lib/libdefs.h:1:2: warning: '__LIBDEFS_H' is used as a header guard here, followed by #define of a different macro [-Wheader-guard]
:info:build     1 | #if !defined(__LIBDEFS_H)
:info:build       |  ^~
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/wxHexEditor-f439d8f3bfbccbf7f7ec587b548a7d7421978b2f/mhash/lib/libdefs.h:2:9: note: 'LIBDEFS_H' is defined here; did you mean '__LIBDEFS_H'?
:info:build     2 | #define LIBDEFS_H
:info:build       |         ^~~~~~~~~
:info:build       |         __LIBDEFS_H
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/wxHexEditor-f439d8f3bfbccbf7f7ec587b548a7d7421978b2f/udis86/libudis86/udis86.c:47:3: error: call to undeclared library function 'memset' with type 'void *(void *, int, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
:info:build    47 |   memset((void*)u, 0, sizeof(struct ud));
:info:build       |   ^
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/wxHexEditor-f439d8f3bfbccbf7f7ec587b548a7d7421978b2f/udis86/libudis86/udis86.c:47:3: note: include the header <string.h> or explicitly provide a declaration for 'memset'
:info:build 1 error generated.

That happens because including string.h fails.

Then there is this:

/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_sysutils_wxHexEditor/wxHexEditor/work/wxHexEditor-f439d8f3bfbccbf7f7ec587b548a7d7421978b2f/src/HexDialogs.cpp:1314:35: error: use of undeclared identifier '__m128i'
 1314 |         static const int REG_SZ = sizeof(__m128i);
      |                                          ^
1 error generated.
@barracuda156
Copy link
Author

@EUA Any update?

On a side note, I have finally added a port for wxHexEditor: https://ports.macports.org/port/wxHexEditor/details

@franko
Copy link

franko commented Jun 27, 2024

I proposed a fix there: #224

@barracuda156
Copy link
Author

I proposed a fix there: #224

LGTM, should also fix PowerPC build.

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

2 participants