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

Error making on macOS 12.3.1 #76

Open
anatolio-deb opened this issue May 21, 2022 · 2 comments
Open

Error making on macOS 12.3.1 #76

anatolio-deb opened this issue May 21, 2022 · 2 comments

Comments

@anatolio-deb
Copy link

anatolio-deb commented May 21, 2022

Running make -f Makefile.osx :

cc -c  -Wall -Wextra -Wstrict-prototypes -Wshadow -Wpointer-arith -Wformat-security -Winit-self -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Wredundant-decls -Werror -O3 -funsigned-char -Iinclude/ -DUSE_STACK_SIZE=102400 -oobj/extern_md5.o src/extern_md5.c
src/extern_md5.c:250:16: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
                        if (!((data - (const md5_byte_t *)0) & 3)) {
                                    ^ ~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [obj/extern_md5.o] Error 1

GCC version:

gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I'm a newbie in C, but could it somehow relate to Apple M1 chip or a gcc version?

@exanter
Copy link

exanter commented May 21, 2023

Trying to get it compiled currently, on Mac (intel). I hacked a few things, got it to compile. Feel free to hit me up, I'll tell you how, will maybe do a PR when I have more time.

@Starnt-xyz
Copy link

Trying to get it compiled currently, on Mac (intel). I hacked a few things, got it to compile. Feel free to hit me up, I'll tell you how, will maybe do a PR when I have more time.

hello could you help me too? having the same error on my intel mac

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

3 participants