Trouble Shooting
Trouble Shooting
Linux
-
-limacs (or -lspline) flag error
f77 -o adjust-map -L/data1/hidari/gwalth/Cosmos/Cosmos2/lib -L/usr/local/pgplot -L/usr/X11R6/lib -L/usr/local/lib adjust-map.o -lcosmos -limacs -lcfitsio -lX11 -lpgplot -lcpgplot /usr/bin/ld: cannot find -limacs collect2: ld returned 1 exit status make: *** [adjust-map] Error 1
The library libimacs.a exists within Cosmos2/source/clardy or the library libspline.a exists within Cosmos2/source/dierckx and is not recompiling the library(s). When the libraries are made they should be moved to the correct directory which is Cosmos2/lib. This error may occur if the COSMOS_HOME environmental variable is not set to the correct location. The recommended solution is to remove the libraries, make sure that COSMOS_HOME is set to the correct directory, and then recompile.
-
libpng error
f77 -o adjust-map -L/data1/hidari/gwalth/Cosmos/Cosmos2/lib -L/usr/local/pgplot -L/usr/X11R6/lib -L/usr/local/lib adjust-map.o -lcosmos -limacs -lcfitsio -lX11 -lpgplot -lcpgplot /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_set_text' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_set_IHDR' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_set_tRNS' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_create_write_struct' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_write_row' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_write_info' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_set_PLTE' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_write_end' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_create_info_struct' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_destroy_write_struct' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libpgplot.so: undefined reference to `png_init_io' collect2: ld returned 1 exit status make: *** [adjust-map] Error 1
The libpng.so is not being found in the expected place. Add the location of your libpng.so to the routines adjust-map, align-mask, extract, extract-2dspec and subsky in your Makefile.linux. The new line for each routine should resemble something like this:
f77 -o $@ -L$(BASE)/lib -L$(PGLIB) -L$(XLIB) -L$(FITSLIB) $@.o -lcosmos -limacs -lcfitsio -lX11 -lpgplot -lcpgplot /usr/lib/libpng.so.3
Mac OS X
-
-lpng flag error
gcc -mcpu=7450 -mtune=7450 -mpowerpc -I/Users/gwalth/Cosmos/Cosmos2/include -I/Users/gwalth/Cosmos/Cosmos2/source/clardy -DOPTUTILH="\"optutils.h\"" -DIOUTILH="\"ioutils.h\"" -DKDCUTILH="\"kdcutil.h\"" -DMASKDATH="\"maskdat.h\"" -DMGUTILH="\"mgutils.h\"" -L/Users/gwalth/Cosmos/Cosmos2/lib -L/usr/local/lib -I/usr/local/include -I/usr/local/pgplot -I/usr/local/include -lm -o adjust-map adjust-map.c -I/usr/local/pgplot -L/usr/local/pgplot -L/usr/X11R6/lib -L/sw/lib -lcpgplot -lpgplot -lpng -lz -lX11 -framework Foundation -framework AppKit -lfrtbegin -lg2c -lgcc -lsystem -laquaterm -lcosmos -limacs -lcfitsio -lcosmos -lcfitsio /usr/bin/ld: can't locate file for: -lpng collect2: ld returned 1 exit status make: *** [adjust-map] Error 1
The libpng is not being found in the expected place. Add the location of your libpng.so to the CCP variable and remove the -lpng flag in your Makefile.Mac. The new line for your CCP should resemble something like this:
CCP = ${CCC} -I$(PGINC) -L$(PGLIB) \ -L$(XLIB) -L$(SWLIB) -lcpgplot -lpgplot /sw/lib/libpng.3.dylib -lz -lX11\ -framework Foundation -framework AppKit -lfrtbegin -lg2c -lgcc\ -lsystem -lcosmos -limacs -lcfitsio