Error when doing make

From: Alice C. <alice_ch00_at_yahoo.ca>
Date: Wed, 12 Sep 2018 16:34:16 -0400

>> Hi everyone, it seems that make errors happen quite a bit when compiling =
>> Gadget2; unfortunately I have another error that doesn=E2=80=99t seem to =
>> be posted yet:
>>
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see =
>> invocation)
>> make: *** [Gadget2] Error 1
>>
>>
>> My Makefile is the following:=20
>>
>>
>> #---------------------------------------------------------------------- =
>> =20
>> # =46rom the list below, please activate/deactivate the options that =
>> =20
>> # apply to your run. If you modify any of these options, make sure =
>> =20
>> # that you recompile the whole code by typing "make clean; make". =
>> =20
>> # =
>> =20
>> # Look at end of file for a brief guide to the compile-time options. =
>> =20
>> #---------------------------------------------------------------------- =
>> =20
>>
>>
>> #--------------------------------------- Basic operation mode of code =
>> =20
>> OPT +=3D -DPERIODIC
>> #OPT +=3D -DUNEQUALSOFTENINGS =
>> =20
>>
>>
>> #--------------------------------------- Things that are always =
>> recommended =20
>> OPT +=3D -DPEANOHILBERT
>> OPT +=3D -DWALLCLOCK
>>
>>
>> #--------------------------------------- TreePM Options =
>> =20
>> OPT +=3D -DPMGRID=3D128
>> #OPT +=3D -DPLACEHIGHRESREGION=3D3 =
>> =20
>> #OPT +=3D -DENLARGEREGION=3D1.2 =
>> =20
>> #OPT +=3D -DASMTH=3D1.25 =
>> =20
>> #OPT +=3D -DRCUT=3D4.5 =
>> =20
>>
>>
>> #--------------------------------------- Single/Double Precision =
>> =20
>> OPT +=3D -DDOUBLEPRECISION
>> OPT +=3D -DDOUBLEPRECISION_FFTW
>>
>>
>> #--------------------------------------- Time integration options =
>> =20
>> OPT +=3D -DSYNCHRONIZATION
>> #OPT +=3D -DFLEXSTEPS =
>> =20
>> #OPT +=3D -DPSEUDOSYMMETRIC =
>> =20
>> #OPT +=3D -DNOSTOP_WHEN_BELOW_MINTIMESTEP =
>> =20
>> #OPT +=3D -DNOPMSTEPADJUSTMENT =
>> =20
>>
>>
>> #--------------------------------------- Output =
>> =20
>> #OPT +=3D -DHAVE_HDF5 =
>> =20
>> #OPT +=3D -DOUTPUTPOTENTIAL =
>> =20
>> #OPT +=3D -DOUTPUTACCELERATION =
>> =20
>> #OPT +=3D -DOUTPUTCHANGEOFENTROPY =
>> =20
>> #OPT +=3D -DOUTPUTTIMESTEP =
>> =20
>>
>>
>> #--------------------------------------- Things for special behaviour =
>> =20
>> #OPT +=3D -DNOGRAVITY =
>> =20
>> #OPT +=3D -DNOTREERND =
>> =20
>> #OPT +=3D -DNOTYPEPREFIX_FFTW =
>> =20
>> #OPT +=3D -DLONG_X=3D60 =
>> =20
>> #OPT +=3D -DLONG_Y=3D5 =
>> =20
>> #OPT +=3D -DLONG_Z=3D0.2 =
>> =20
>> #OPT +=3D -DTWODIMS =
>> =20
>> #OPT +=3D -DSPH_BND_PARTICLES =
>> =20
>> #OPT +=3D -DNOVISCOSITYLIMITER =
>> =20
>> #OPT +=3D -DCOMPUTE_POTENTIAL_ENERGY =
>> =20
>> #OPT +=3D -DLONGIDS =
>> =20
>> #OPT +=3D -DISOTHERM_EQS =
>> =20
>> #OPT +=3D -DADAPTIVE_GRAVSOFT_FORGAS =
>> =20
>> #OPT +=3D -DSELECTIVE_NO_GRAVITY=3D2+4+8+16 =
>> =20
>>
>> #--------------------------------------- Testing and Debugging options =
>> =20
>> #OPT +=3D -DFORCETEST=3D0.1 =
>> =20
>>
>>
>> #--------------------------------------- Glass making =
>> =20
>> #OPT +=3D -DMAKEGLASS=3D262144 =
>> =20
>>
>>
>> #---------------------------------------------------------------------- =
>> =20
>> # Here, select compile environment for the target machine. This may need =
>> =20
>> # adjustment, depending on your local system. Follow the examples to add =
>> =20
>> # additional target platforms, and to get things properly compiled. =
>> =20
>> #---------------------------------------------------------------------- =
>> =20
>>
>> #--------------------------------------- Select some defaults =
>> =20
>>
>> CC =3D mpicc # sets the C-compiler =
>> =20
>> OPTIMIZE =3D -O2 -Wall -g # sets optimization and warning flags =
>> =20
>> MPICHLIB =3D #-lmpich =
>> =20
>>
>>
>> #--------------------------------------- Select target computer =
>> =20
>>
>> SYSTYPE=3D"cathys-MacBook-Air"
>> #SYSTYPE=3D"MPA" =
>> =20
>> #SYSTYPE=3D"Mako" =
>> =20
>> #SYSTYPE=3D"Regatta" =
>> =20
>> #SYSTYPE=3D"RZG_LinuxCluster" =
>> =20
>> #SYSTYPE=3D"RZG_LinuxCluster-gcc" =
>> =20
>> #SYSTYPE=3D"OpteronMPA" =
>> =20
>> #SYSTYPE=3D"OPA-Cluster32" =
>> =20
>> #SYSTYPE=3D"OPA-Cluster64" =
>> =20
>>
>> #--------------------------------------- Adjust settings for target =
>> computer =20
>>
>> ifeq ($(SYSTYPE),"cathys-MacBook-Air")
>> CC =3D mpicc
>> OPTIMIZE =3D -O3 -Wall
>> GSL_INCL =3D -I/usr/local/include
>> GSL_LIBS =3D -L/usr/local/lib
>> FFTW_INCL=3D -I/usr/local/include
>> FFTW_LIBS=3D -L/usr/local/lib
>> MPICHLIB =3D -L/usr/local/lib
>> #HDF5INCL =3D /src/hdf5-1.8.4/hdf5/include =
>> =20
>> #HDF5LIB =3D /src/hdf5-1.8.4/hdf5/lib =
>> =20
>> #HDF5LIB =3D -lhdf5 -lz =
>> =20
>> endif
>>
>>
>> ifeq ($(SYSTYPE),"OpteronMPA")
>> CC =3D mpicc
>> OPTIMIZE =3D -O3 -Wall -m64
>> GSL_INCL =3D -L/usr/local/include
>> GSL_LIBS =3D -L/usr/local/lib
>> FFTW_INCL=3D
>> FFTW_LIBS=3D
>> MPICHLIB =3D
>> HDF5INCL =3D #-I/opt/hdf5/include =
>> =20
>> HDF5LIB =3D #-L/opt/hdf5/lib -lhdf5 -lz -Wl,"-R /opt/hdf5/lib" =
>> =20
>> endif
>>
>> ifeq ($(SYSTYPE),"OPA-Cluster32")
>> CC =3D mpicc
>> OPTIMIZE =3D -O3 -Wall
>> GSL_INCL =3D -I/afs/rzg/bc-b/vrs/opteron32/include
>> GSL_LIBS =3D -L/afs/rzg/bc-b/vrs/opteron32/lib -Wl,"-R =
>> /afs/rzg/bc-b/vrs/opteron\
>> 32/lib"
>> FFTW_INCL=3D -I/afs/rzg/bc-b/vrs/opteron32/include
>> FFTW_LIBS=3D -L/afs/rzg/bc-b/vrs/opteron32/lib
>> MPICHLIB =3D
>> HDF5INCL =3D
>> HDF5LIB =3D #-lhdf5 -lz =
>> =20
>> endif
>>
>>
>> ifeq ($(SYSTYPE),"OPA-Cluster64")
>> CC =3D mpicc
>> OPTIMIZE =3D -O3 -Wall -m64
>> GSL_INCL =3D -I/afs/rzg/bc-b/vrs/opteron64/include
>> GSL_LIBS =3D -L/afs/rzg/bc-b/vrs/opteron64/lib -Wl,"-R =
>> /afs/rzg/bc-b/vrs/opteron\
>> 64/lib"
>> FFTW_INCL=3D -I/afs/rzg/bc-b/vrs/opteron64/include
>> FFTW_LIBS=3D -L/afs/rzg/bc-b/vrs/opteron64/lib
>> MPICHLIB =3D
>> HDF5INCL =3D
>> HDF5LIB =3D #-lhdf5 -lz =
>> =20
>> endif
>>
>>
>> ifeq ($(SYSTYPE),"Mako")
>> CC =3D mpicc # sets the C-compiler =
>> =20
>> OPTIMIZE =3D -O3 -march=3Dathlon-mp -mfpmath=3Dsse
>> GSL_INCL =3D
>> GSL_LIBS =3D
>> FFTW_INCL=3D
>> FFTW_LIBS=3D
>> MPICHLIB =3D
>> HDF5INCL =3D
>> HDF5LIB =3D # -lhdf5 -lz=20
>> endif
>>
>> ifeq ($(SYSTYPE),"Regatta")
>> CC =3D mpcc_r
>> OPTIMIZE =3D -O5 -qstrict -qipa -q64
>> GSL_INCL =3D -I/afs/rzg/u/vrs/gsl_psi64/include
>> GSL_LIBS =3D -L/afs/rzg/u/vrs/gsl_psi64/lib
>> FFTW_INCL=3D -I/afs/rzg/u/vrs/fftw_psi64/include
>> FFTW_LIBS=3D -L/afs/rzg/u/vrs/fftw_psi64/lib -q64 -qipa
>> MPICHLIB =3D
>> HDF5INCL =3D #-I/afs/rzg/u/vrs/hdf5_psi64/include =
>> =20
>> HDF5LIB =3D #-L/afs/rzg/u/vrs/hdf5_psi64/lib -lhdf5 -lz =
>> =20
>> endif
>>
>>
>> ifeq ($(SYSTYPE),"RZG_LinuxCluster")
>> CC =3D mpicci
>> OPTIMIZE =3D -O3 -ip # Note: Don't use the "-rcd" optimization of =
>> Intel's com\
>> piler! (causes code crashes) =
>> =20
>> GSL_INCL =3D -I/afs/rzg/u/vrs/gsl_linux/include
>> GSL_LIBS =3D -L/afs/rzg/u/vrs/gsl_linux/lib -Wl,"-R =
>> /afs/rzg/u/vrs/gsl_linux/lib\
>> "
>> FFTW_INCL=3D -I/afs/rzg/u/vrs/fftw_linux/include
>> FFTW_LIBS=3D -L/afs/rzg/u/vrs/fftw_linux/lib
>> HDF5INCL =3D #-I/afs/rzg/u/vrs/hdf5_linux/include =
>> =20
>> HDF5LIB =3D #-L/afs/rzg/u/vrs/hdf5_linux/lib -lhdf5 -lz -Wl,"-R =
>> /afs/rzg/u/vrs/\
>> hdf5_linux/lib" =
>> =20
>> endif
>>
>> ifeq ($(SYSTYPE),"RZG_LinuxCluster-gcc")
>> CC =3D mpiccg
>> OPTIMIZE =3D -Wall -g -O3 -march=3Dpentium4
>> GSL_INCL =3D -I/afs/rzg/u/vrs/gsl_linux_gcc3.2/include
>> GSL_LIBS =3D -L/afs/rzg/u/vrs/gsl_linux_gcc3.2/lib -Wl,"-R =
>> /afs/rzg/u/vrs/gsl_li\
>> nux_gcc3.2/lib"
>> FFTW_INCL=3D -I/afs/rzg/u/vrs/fftw_linux_gcc3.2/include
>> FFTW_LIBS=3D -L/afs/rzg/u/vrs/fftw_linux_gcc3.2/lib
>> HDF5INCL =3D #-I/afs/rzg/u/vrs/hdf5_linux/include =
>> =20
>> HDF5LIB =3D #-L/afs/rzg/u/vrs/hdf5_linux/lib -lhdf5 -lz -Wl,"-R =
>> /afs/rzg/u/vrs\
>> /hdf5_linux/lib" =
>> =20
>> endif
>>
>>
>> ifneq (HAVE_HDF5,$(findstring HAVE_HDF5,$(OPT)))
>> HDF5INCL =3D
>> HDF5LIB =3D
>> endif
>>
>> OPTIONS =3D $(OPTIMIZE) $(OPT)
>>
>> EXEC =3D Gadget2
>>
>> OBJS =3D main.o run.o predict.o begrun.o endrun.o global.o \
>> timestep.o init.o restart.o io.o \
>> accel.o read_ic.o ngb.o \
>> system.o allocate.o density.o \
>> gravtree.o hydra.o driftfac.o \
>> domain.o allvars.o potential.o \
>> forcetree.o peano.o gravtree_forcetest.o \
>> pm_periodic.o pm_nonperiodic.o longrange.o
>>
>> INCL =3D allvars.h proto.h tags.h Makefile
>>
>>
>> CFLAGS =3D $(OPTIONS) $(GSL_INCL) $(FFTW_INCL) $(HDF5INCL)
>>
>> ifeq (NOTYPEPREFIX_FFTW,$(findstring NOTYPEPREFIX_FFTW,$(OPT))) # =
>> fftw installed with type prefix? =
>> =20
>> FFTW_LIB =3D $(FFTW_LIBS) -lrfftw_mpi -lfftw_mpi -lrfftw -lfftw
>> else
>> ifeq (DOUBLEPRECISION_FFTW,$(findstring DOUBLEPRECISION_FFTW,$(OPT)))
>> FFTW_LIB =3D $(FFTW_LIBS) -ldrfftw_mpi -ldfftw_mpi -ldrfftw -ldfftw
>> else
>> FFTW_LIB =3D $(FFTW_LIBS) -lsrfftw_mpi -lsfftw_mpi -lsrfftw -lsfftw
>> endif
>> endif
>>
>>
>> LIBS =3D -g $(GSL_LIBS) -lgsl -lgslcblas -lm
>>
>> $(EXEC): $(OBJS)
>> $(CC) $(OBJS) $(LIBS) -o $(EXEC) =20
>>
>> $(OBJS): $(INCL)
>>
>>
>> clean:
>> rm -f $(OBJS) $(EXEC)
>>
>>
>> The system is MacOS Sierra, GNU (gsl-2.5), fftw-2.1.5, and mpich =
>> (installed using brew) are all installed. Typically this error seems to =
>> be a problem with the Xcode, but Xcode is also installed and gcc and =
>> gfortran compilers all work on the system; I tried xcode-select -p and =
>> the line /Library/Developer/CommandLineTools pops up just fine.
>> If anyone can provide any insight into the error:
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see =
>> invocation)
>> make: *** [Gadget2] Error 1
>>
>>
>> while trying to =E2=80=9Cmake=E2=80=9D in the Gadget2 directory, that =
>> would be much appreciated.
>> Thank you guys so much in advance.
>>
>>
Received on 2018-09-12 22:38:28

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:32 CET