Compiling and installing Gecode on M1Pro Mac

42 views
Skip to first unread message

dam14s

unread,
Jan 23, 2023, 9:47:28 AM1/23/23
to Gecode
Hello everyone,

I recently got an M1Pro Mac and I encountered several difficulties when trying to install and compile Gecode. 

First the issue seemed to be because the default g++ compiler my computer used was Apple's CLANG version, and I couldn't get the configure script to recognize that.

I downloaded the GNU g++ compiler with home-brew and set it up so that calling g++ would call the GNU version and not the Apple CLANG version. After that I was able to compile Gecode (I think, it didn't give any error messages). When running the make install command to install the library files in the right places, it kept saying for every file "can't unlink already-existing object" and the make ended with two errors : one in the "doinstallheaders" and one in the "installlib".

I then tried as suggested in the documentation to add the path to my gecode folder in my library path variable, but g++ still can't seem to find gecode when I am compiling a small test program.

Did anyone have this issue before and found a way to solve it? Or does anyone have an idea that could help me?

Thank you for your help,

Damien

dam14s

unread,
Jan 24, 2023, 9:41:54 AM1/24/23
to Gecode
When inspecting the configure script logs, I notice that the configure scripts doesn't build shared libraries even when given the flag --enable-shared. Maybe this is causing the issue?

dam14s

unread,
Jan 24, 2023, 10:25:45 AM1/24/23
to Gecode
Update : 

I managed to make it work by using the --enable-framework target with the configure script. In case this is helpful to someone else ;)

Reply all
Reply to author
Forward
0 new messages