-
Notifications
You must be signed in to change notification settings - Fork 22
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 support #147
base: main
Are you sure you want to change the base?
macOS support #147
Conversation
Hi! I have some questions (mostly out of curiosity, it's been a while since the last time I used a mac) and suggestions, I'll write them along the relevant lines Thanks again and regards Guillermo |
CXX_BASE_FLAGS += -I$(BREW_PREFIX)/include | ||
LINK_FLAGS += -L$(BREW_PREFIX)/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this is mostly important for libpopt? or is it also necessary for c/c++ standard libraries?
I'm asking, because soon enough, I'll get rid of popt, and the project will have zero external dependencies (besides std lib)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed only for libpopt
. When the libpopt
dependency is removed those lines can be safely erased.
README.md
Outdated
on `macOS`, you may need to run `export CC=gcc` before running make in order to use gcc instead of clang. Here is an example for gcc-14 installed with homebrew: | ||
|
||
``` | ||
export CC=/opt/homebrew/Cellar/gcc/14.2.0_1/bin/gcc-14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to export CC as well? I don't think it's being used in the makefile directly.
also, are there issues with clang? in linux it is supported as a compiler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, only CXX is needed.
About the compiler: yes, because Apple's clang is more restrictive as there are some libraries that need to be imported differently (if I recall correctly it's about the import order). GCC does not have that problem and before changing the codebase I preferred to use a different compiler.
#if defined(__APPLE__) || defined(__FreeBSD__) | ||
#include <stdlib.h> | ||
#else | ||
#include <malloc.h> | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say we can replace malloc with stdlib in the linux version as well
#if defined(__APPLE__) || defined(__FreeBSD__) | |
#include <stdlib.h> | |
#else | |
#include <malloc.h> | |
#endif | |
#include <stdlib.h> |
Co-authored-by: ggutierrez <[email protected]>
Dear rDock members, we are developing an unofficial rDock plugin for
Horus
at the Barcelona Supercomputing Center. You can learn more aboutHorus
in the official webpage.Horus
natively supports Linux and macOS and we wanted to distribute the plugin for both platforms. In order to do so, I had to compile rDock on macOS manually. For it to work I had to slightly modify some parts of the code and the makefiles.During my tests, I did not see any change in the results outputs and the application is working flawlessly. I hope that this macOS support allows rDock to run on more platforms!