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

Hello, has anyone compiled the latest version of the library for Mac Os ? #161

Open
psapoznik opened this issue Jun 11, 2023 · 5 comments
Open

Comments

@psapoznik
Copy link

I try to compile it and I get the following error:

mutils_time.c:26:8: error: call to undeclared function 'gettimeofday'

@muquit
Copy link
Owner

muquit commented Jun 11, 2023

At this time, please edit libs/libmutils/Makefile and add -DTIME_WITH_SYS_TIME=1 at the end of DEFS line. Then,

make clean
make

I will update the configure when get some time.

Thanks

@psapoznik
Copy link
Author

psapoznik commented Jun 11, 2023

Hello, thanks for replying, now I get this error:

main.c:964:21: error: call to undeclared function 'show_mime_types'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
show_mime_types();
^
main.c:964:21: note: did you mean 'get_mime_type'?
./mailsend.h:332:14: note: 'get_mime_type' declared here
char *get_mime_type(char *path);
^
1 error generated.
make: *** [main.o] Error 1

@muquit
Copy link
Owner

muquit commented Jun 11, 2023

You are compiling without OpenSSL, the most SMTP servers require authentication, so the program will not be that useful if compiled without OpenSSL.

Anyway, this function was mistakenly inside HAVE_OPENSSL define. Edit mailsend.h and take the function show_mime_tyhpes() out of HAVE_OPENSSL block, like

#ifdef HAVE_OPENSSL
void        print_cert_info(SSL *ssl);
#endif /* HAVE_OPENSSL */
void        show_mime_types(void);

Thanks.

@psapoznik
Copy link
Author

Hello , is that when I try to compile openSSL in static mode on Mac ,

./config --prefix=/path/ssl110istatic -static

I get the following error:

ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [link_app.] Error 1
make[1]: *** [openssl] Error 2
make: *** [build_apps] Error 1

@muquit
Copy link
Owner

muquit commented Jun 12, 2023

Please link with dynamic OpenSSL libs. Static linking in MacOS is not feasible. -static is used only for kernel in MacOS. man ld for details.

Thanks.

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