MAC OS Mavericks Compile Problems

Compiler issues (Intel compiler, mpicc, etc.), data libraries and everything needed to get Serpent running is discussed here
Post Reply
ironboy125
Posts: 2
Joined: Mon Sep 15, 2014 7:13 pm
Security question 1: No
Security question 2: 92

MAC OS Mavericks Compile Problems

Post by ironboy125 » Mon Sep 15, 2014 7:25 pm

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

ironboy125
Posts: 2
Joined: Mon Sep 15, 2014 7:13 pm
Security question 1: No
Security question 2: 92

Re: MAC OS Mavericks Compile Problems

Post by ironboy125 » Thu Sep 25, 2014 3:59 pm

I have tried all the previous advice about manipulating PATH environmental variable to no avail.

Ville Valtavirta
Posts: 417
Joined: Fri Sep 07, 2012 1:43 pm
Security question 1: No
Security question 2: 92

Re: MAC OS Mavericks Compile Problems

Post by Ville Valtavirta » Thu Sep 25, 2014 4:35 pm

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

sakbas
Posts: 3
Joined: Sat Sep 06, 2014 7:49 pm
Security question 1: No
Security question 2: 92

Re: MAC OS Mavericks Compile Problems

Post by sakbas » Fri Nov 14, 2014 1:36 am

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.

staffanq
Posts: 2
Joined: Mon Jun 03, 2013 8:23 pm
Security question 1: No
Security question 2: 92

Re: MAC OS Mavericks Compile Problems

Post by staffanq » Mon Aug 24, 2015 4:23 pm

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

Post Reply