I would like to do 2 things, both are failing bad.
A) Attempt to compile Gmic on Mac (Failed)
B) Attempt to compile Gmic library for C - not C++ (Failed)
I spent hours trying to figure out this nonsense with dependency problems, platform compatibility problems, etc. and I am very drained with a headache. And searching the internet and these forums is making my headache worse and still not getting anywhere.
Can someone please provide a list of steps to take to install/compile this in 2019?
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!