Page 1 of 1

MAC OS Mavericks Compile Problems

Posted: Mon Sep 15, 2014 7:25 pm
by ironboy125
I have read the other troubleshooting posts and this seems like a common problem but I am not technically savvy in the command window environment. I get the following error and i tried to change PATH like on another topic but that didn't work. Help please.

gcc -Wall -ansi -pedantic -ffast-math -O3 -c plotgeometry.c
plotgeometry.c:5:16: fatal error: gd.h: No such file or directory
compilation terminated.
make: *** [plotgeometry.o] Error 1

Re: MAC OS Mavericks Compile Problems

Posted: Thu Sep 25, 2014 3:59 pm
by ironboy125
I have tried all the previous advice about manipulating PATH environmental variable to no avail.

Re: MAC OS Mavericks Compile Problems

Posted: Thu Sep 25, 2014 4:35 pm
by Ville Valtavirta
Hello,

I have never compiled Serpent on MAC OS so I cannot help with the library linking, but you should be able to compile Serpent without the graphics plotter when you modify the corresponding lines in Makefile to

Code: Select all

# GD graphics library:

#LDFLAGS += -lgd

# Compile with the following option if GD library is not available:

CFLAGS += -DNO_GFX_MODE
It seems that your compile problem is associated with the GD graphics library. This way Serpent is compiled without the graphics library, which means that you cannot use the geometry and mesh plotter tools, but it should at least compile.

-Ville

Re: MAC OS Mavericks Compile Problems

Posted: Fri Nov 14, 2014 1:36 am
by sakbas
ironboy125 wrote:I have read the other troubleshooting posts and this seems like a common problem but I am not technically savvy in the command window environment. I get the following error and i tried to change PATH like on another topic but that didn't work. Help please.

gcc -Wall -ansi -pedantic -ffast-math -O3 -c plotgeometry.c
plotgeometry.c:5:16: fatal error: gd.h: No such file or directory
compilation terminated.
make: *** [plotgeometry.o] Error 1
Hello,
I have tried compile Serpent 1.1.7 and I have read same problem as you. Can you solve this problem? If you solve that please share with us.
Thanks your answer.

Re: MAC OS Mavericks Compile Problems

Posted: Mon Aug 24, 2015 4:23 pm
by staffanq
Hi, I ran in to this problem too after updating my Mac. There may be prettier ways to solve this but here's what I did:

1. Find where your libgd files are located. I installed mine using brew, so they are at /usr/local/Cellar/gd/2.1.1/
2. Add some flags in the Makefile, so in the end the top of it looks like this (using my paths as example):

# GNU Compiler:

CC = gcc
CFLAGS = "-I/usr/local/Cellar/gd/2.1.1/include"
LDFLAGS = "-L/usr/local/Cellar/gd/2.1.1/lib"

(all other CFLAGS AND LDFLAGS then need +=)

Of course replace the paths with your paths. The CFLAGS will point the install to the correct .h files and the LDFLAGS will link the correct framework.
All of this may not be necessary, and there may be other ways to do it, but at least this works for me.

Cheers//
Staffan