Help to build Gadget-2 on OpenBSD machine.

From: Christer Eriksson <>
Date: Thu, 15 Dec 2011 10:08:42 +0100

Dear Gadget-2 users,

Would need help to get Gadget-2 up and running. I do not manage to get it
to build.

I am working on a project with the goal to generate a audio experience from
the interaction of cosmological objects.

To generate the raw date I bought a used SUN Sunfire V440 server.

I have installed OpenBSD as operation system and are now trying to get
Gadget-2 up and running.

I believe that I successfully installed MPICH, GSL, and FFTW.

Background my setup.

Computer, SUN, Sunfire V440 with 4 UltraSPARC IIIi, 1.593 GHz and 16 GB

OpenBSD 5.0, sparc64.

MPICH I downloaded from

"mpich2-1.5a1.tar.gz" (MPICH2-1.4.1p1 did not compile ok)

GSL I used the one supplied by OpenBSD, "gsl-1.15.tgz" from

FFTW I downloaded from


hdf5 I do not think that I need.


MPICH is installed in /home/christer/mpich2-install

with, bin etc include lib sbin share

GSL and FFTW are in /usr/local.


X11 libcharset.a


libgsl.a libiconv.a libintl.a

libasprintf.a libfftw3.a libgettextpo.a libfftw3_mpi.a
libgslcblas.a libidn.a pkgconfig


autosprintf.h fftw3.f gettext-po.h idn-free.h libcharset.h
pr29.h tld.h

fftw3-mpi.f03 fftw3.f03 gsl idn-int.h libintl.h

fftw3-mpi.h fftw3.h iconv.h idna.h localcharset.h


Well, this is how far I have managed. Building and installing MPICH, GSL
and FFTW.

In /home/christer/Gadget-2.0.7/Gadget2 I edit the Makefile

This is the first part of the Makefile.


# From the list below, please activate/deactivate the options that

# apply to your run. If you modify any of these options, make sure

# that you recompile the whole code by typing "make clean; make".


# Look at end of file for a brief guide to the compile-time options.


#--------------------------------------- Basic operation mode of code



#--------------------------------------- Things that are always recommended



#--------------------------------------- TreePM Options




#OPT += -DASMTH=1.25

#OPT += -DRCUT=4.5

#--------------------------------------- Single/Double Precision



#--------------------------------------- Time integration options






#--------------------------------------- Output






#--------------------------------------- Things for special behaviour




#OPT += -DLONG_X=60

#OPT += -DLONG_Y=5

#OPT += -DLONG_Z=0.2









#--------------------------------------- Testing and Debugging options


#--------------------------------------- Glass making

#OPT += -DMAKEGLASS=262144


# Here, select compile environment for the target machine. This may need

# adjustment, depending on your local system. Follow the examples to add

# additional target platforms, and to get things properly compiled.


#--------------------------------------- Select some defaults

CC = mpicc # sets the C-compiler

OPTIMIZE = -O2 -Wall -g # sets optimization and warning flags

MPICHLIB = -lmpich

#--------------------------------------- Select target computer









#--------------------------------------- Adjust settings for target computer

ifeq ($(SYSTYPE),"MPA")

CC = /home/christer/mpich2-install/bin/mpicc

OPTIMIZE = -O3 -Wall

GSL_INCL = -I/usr/local/include

GSL_LIBS = -L/usr/local/lib -Wl,"-R /usr/local/lib"

FFTW_INCL= -I/usr/local/include

FFTW_LIBS= -L/usr/local/lib

MPICHLIB = -L/home/christer/mpich2-install/lib


#HDF5LIB = -lhdf5 -lz


When I do "sudo make" I get:

$ sudo make


"Makefile", line 101: Missing dependency operator

"Makefile", line 111: Need an operator

"Makefile", line 114: Missing dependency operator

"Makefile", line 124: Need an operator

"Makefile", line 127: Missing dependency operator

"Makefile", line 137: Need an operator

"Makefile", line 140: Missing dependency operator

"Makefile", line 150: Need an operator

"Makefile", line 153: Missing dependency operator

"Makefile", line 163: Need an operator

"Makefile", line 166: Missing dependency operator

"Makefile", line 176: Need an operator

"Makefile", line 179: Missing dependency operator

"Makefile", line 188: Need an operator

"Makefile", line 191: Missing dependency operator

"Makefile", line 200: Need an operator

"Makefile", line 203: Missing dependency operator

"Makefile", line 206: Need an operator

"Makefile", line 228: Missing dependency operator

"Makefile", line 230: Need an operator

"Makefile", line 231: Missing dependency operator

"Makefile", line 233: Need an operator

"Makefile", line 235: Need an operator

"Makefile", line 236: Need an operator

Fatal errors encountered -- cannot continue


Any idea what I made for mistake?

All input would be most appreciated.

Best regards,


Christer Eriksson

Received on 2011-12-15 10:08:44

This archive was generated by hypermail 2.3.0 : 2022-09-01 14:03:42 CEST