I am not very helpful for such descriptions.
My way is to install MacPorts and install than gmic from MacPorts. Additionally install XQuartz, best before MacPorts.
If that is done, you can directly make latest gmic from the git cloned folder "(cd ~/work/src/gmic/src/; make -B cli “SUBLIBS=-lX11” "!
I think after installing MacPorts with all dependency, you can build (make) gmic library too.
I would think that llvm and clang should be unnecessary since they are already installed with xcode, and they take ages to install. (Also, it had me install Java?)
I will write back in some hours I guess…
(PS. My opinion of MacPorts has become very low right now. Convoluted documentation, and it was painful to figure out the patch nonsense)
I believe Xcode and MacPorts run separately, unless you can link libraries across opts, which I am not sure is possible. (I haven’t compiled anything on a Mac for almost 2 decades. )
This is from a quick internet search. If you want to figure out the dependencies and build configs etc., see here: macports/science/gmic at master · Schamschula/macports · GitHub. Looks like a Dr Schamschula is maintaining the MacPorts port of gmic, and I think the libgmic and libcgmic is built with gmic.
Maybe it’s time to wonder why most of the opensource projects maintainers I know have difficulties compiling / running their projects on Mac OS ? Ask GIMP developers, they encounter the same kind of issues.
Maybe it’s not a problem with the projects, but more with the OS itself ?
I was merely trying to test some trivial functions before sending it over to linux.
I work in simple C and directly with the GPU for all my image drawing/manipulation. I was interested to review if there are a couple algorithms in gmic/cimg that our studio can use. But when I see a list of 341 dependencies, most all of which are cringey, it is a bad omen, regardless of OS.
I’m really sorry for you it doesn’t work. But the truth is having to install 341 dependencies to compile G’MIC is a thing that happens only with MacOSX. You don’t have this problem on a more sane environment for developers.
Perhaps this is an important thing to put in the documentation.
“Gmic on the mac is currently a disaster. It is not fit for production use, and as of 2019, the install will not go smoothly.”
To me, I read the current website thinking that Mac was truly supported. - which it isn’t. A direct clear communication like that is important, otherwise people like me will waste days of time.
What about the C API that is mentioned on the front page? Does this exist in a production state on linux? If so, where is it?
The documentation is not correct. Is there a working set of installation steps written anywhere?
(PS There are indeed hundreds of dependencies for gmic on linux as well)
…and the compile errors for the tutorial with foo.cpp on linux are the same compile errors I get on the mac - what looks to me like dependency problems.
I am not aware which problems you might have. Still I am a Mac user since years and had compiled gmic and all other app of the package, not without problems, however any system makes problems!
Since you don’t have the need for the compiling and building environment why do write such a nonsense. Better write " I’d like to try gmic (cli) on Mac, how can I do that!
Unpack it, and add the folder gmic-cli to your path.
This should work !
Concerning your problems, I think your system it corrupt.
First step to overcome, create another user account (with admin rights) and use that instead.
Second step delete /opt/local, reinstall XQuartz and reinstall MacPorts.
It’s true, MacPorts installs a lot of incomprehensible ports, still even about 400 will not last to long since most of the ports are already in compiled form. Of course you should not try your special way from source, follow the instructions of the quick way! From source is starting from Adam & Eve to find the source of some personal specialities!
As I mentioned, I work in C and was intending to analyze a couple of the algorithms in gmic, and assess things as they are.
On the mac, the installation via both homebrew and macports failed. I don’t know what you mean that “they are already compiled and don’t take long” - for example, the heavy ones, llvm and clang, and all of the 341 are downloaded and compiled when calling the macports install gmic command, and this takes hours. - not to mention that I would not want these installed on our computers, and that they require individual patching on the latest Mac OS with new hardware. It has been clearly communicated that using the Mac is not supported, and I have moved on.
On linux, there are dependency and/or linking problems for both C++ and C. The information in the documentation about both installing and using the library even for linux is incorrect and I was not able to compile the example code.
Ok, I misunderstood you. Excuse my rude expression.
Still, I don’t understand why you try to compile gmic, which is, even under C or C++, only a different way to call gmic scripts or command pipes. I think you should better use the CImg header file. In the case of CImg there is the problem of dependencies completely in the hand of the programmer.
That you have even with linux problems is quite interesting, possibly some specialities on your computer? I ask me how @Carmelo_DrRaw is managing the mentioned disaster on Mac. Or, what is with my machine not having similar problems?
Concerning MacPorts “compiled binaries”: If you install MAcPort there are at least two possibilities, either from source or binary, I have called it the quick way. I have now followed several OS versions, hardware don’t matter so much, in fact I had sometimes to reinstall MacPort. Still it was for me a more versatile tool compared to homebrew.
Ok, you have moved on. In fact I have already made my way from Unix to Windows to linux and finally to MacOS. And there were enough reasons to “move on”! Good luck for new experiences!