[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GEMPAK #XAM-913449]: GEM 5.10.2 'undefined ref' compile error on FreeBSD 6.0



Neil,

Your make.out shows that the linking failed in NMAP2 when trying to link against
the xml2 library which your system configures to build with references to the 
external
pthread library.

To link programs which use the xml2 library, you will need to add to your 
Makeinc.freebsd
file the line:
XMLDEP = -lpthread

This is already in several config files (such as Makeinc.linux) which you can 
see,
however our freebsd 4.11 system does not use this in its configuration, hence I
do not have it in the Makeinc.freebsd here.

You should be able to continue your "make all install programs_nc programs_gf"
without having to start a clean build, as this configuration change just adds
an additional symbol to the link line for those programs using XML without
changing any build configuration.

Steve Chiswell
Unidata User Support




> FreeBSD 6.0 Stable
> GEMPAK 5.10.2
> 
> - 'make' doesn't complete on this FreeBSD host.
> 
> - tailend of make.out:
> 
> /unidata/GEMPAK5.10.2/os/freebsd/lib/libjasper.a(jas_stream.o)(.text+0x2da):
> In function `jas_stream_tmpfile':
> /unidata/GEMPAK5.10.2/extlibs/JasPer/v1.701.0/src/libjasper/base/jas_stream.c:368:
> warning: warning: tmpnam() possibly used unsafely; consider using mkstemp()
> /unidata/GEMPAK5.10.2/os/freebsd/lib/libxml2.a(threads.o)(.text+0x1bf):
> In function `xmlRMutexLock':
> /unidata/GEMPAK5.10.2/extlibs/xml2/libxml2-2.6.26/threads.c:349:
> undefined reference to `pthread_equal'
> *** Error code 1
> 
> Attached: config/Makeinc.common, config/Makeinc.freebsd, make.out
> -NEil
> 
> --
> Neil R. Smith, Comp. Sys. Mngr.               address@hidden
> Dept. Atmospheric Sci., Texas A&M Univ.       979/845-6272
> 
> 
> ###################################################################
> ###################################################################
> #
> #       Makefile for GEMPAK6
> #               Unidata 11/99 Chiz - configured for UPC distribution
> #
> ####################################################################
> ####################################################################
> ####################################################################
> #   The following shell environment variables *MUST* be defined before
> #   invoking this Makefile:
> #
> #   $NAWIPS  - points to the toplevel of the NAWIPS directory tree.
> #   $GEMPAKHOME  - points to the toplevel of the gempak part
> #              of the NAWIPS tree.  Usually directly under $NAWIPS.
> #
> #   $NA_OS   - Used in $(NAWIPS)/config/Makeinc.common to decide which
> #              OS specific Makeinc.* to include.  It also cooresponds
> #              to the directories in the NAWIPS tree where the executables
> #              and libraries are installed.
> #
> ####################################################################
> GEMPAKHOME       = $(NAWIPS)/gempak
> SHELL            = /bin/sh
> FC               = f77
> CC               = cc
> AR               = ar
> ARFLAGS          = rv
> #RANLIB           = ranlib
> RM               = rm -f
> INSTALL          = install -s
> AUXINSTALL       = install
> LN               = ln -s
> STRIP            = strip
> CP               = cp
> COMPILE.c        = $(CC) $(CFLAGS) -c
> COMPILE.f        = $(FC) $(FFLAGS) -c
> LINK.c           = $(PURIFY) $(CC) $(CFLAGS) $(LDFLAGS)
> LINK.f           = $(PURIFY) $(FC) $(FFLAGS) $(LDFLAGS)
> 
> LDM_FLAGS        =
> 
> OS_ROOT          = $(NAWIPS)/os/$(NA_OS)
> OS_BIN           = $(OS_ROOT)/bin
> OS_INC           = $(OS_ROOT)/include
> OS_LIB           = $(OS_ROOT)/lib
> 
> #GEMOLB           = $(NAWIPS)/lib/$(NA_OS)
> #GEMEXE           = $(NAWIPS)/bin/$(NA_OS)
> GEMOLB           = $(OS_LIB)
> GEMEXE           = $(OS_BIN)
> 
> INCDIR           = $(GEMPAK)/include
> GEMINC           = -I$(INCDIR) -I$(OS_INC)
> SCRIPTS_EXE      = $(NAWIPS)/bin/scripts
> 
> APPL             = $(GEMOLB)/appl.a
> DEVICE           = $(GEMOLB)/device.a
> GEMLIB           = $(GEMOLB)/gemlib.a
> CGEMLIB          = $(GEMOLB)/cgemlib.a
> NXMLIB           = $(GEMOLB)/Nxmlib.a
> BRIDGE           = $(GEMOLB)/bridge.a
> LDMLOG           = $(GEMOLB)/ldmlog.a
> GPLT             = $(GEMOLB)/gplt.a
> GPLT_NC          = $(GEMOLB)/ginitp_alt.o $(GEMOLB)/gendp_alt.o
> GPLTDEV          = $(GEMOLB)/gpltdev.a
> SYSLIB           = $(GEMOLB)/syslib.a
> 
> GN               = $(GEMOLB)/gn.a
> XW               = $(GEMOLB)/xw.a
> GF               = $(GEMOLB)/gf.a
> GIF              = $(GEMOLB)/gif.a
> PS               = $(GEMOLB)/ps.a
> NC               = $(GEMOLB)/nc.a
> FAX              = $(GEMOLB)/fax.a
> RBK              = $(GEMOLB)/rbk.a
> TIFF             = $(GEMOLB)/tiff.a
> VG               = $(GEMOLB)/vg.a
> XWP              = $(GEMOLB)/xwp.a
> UTF              = $(GEMOLB)/utf.a
> 
> X11LIB           = -lX11
> GUILIBS          = $(MOTIFLIBS) $(X11LIBDIR) -lXt -lX11
> #NETCDFHOME       = $(NAWIPS)/netcdf/$(NA_OS)
> #NETCDFINC        = $(NETCDFHOME)/include
> #NETCDF           = $(NETCDFHOME)/lib/libnetcdf.a
> NETCDFINC         = $(OS_INC)
> NETCDF            = $(GEMOLB)/libnetcdf.a
> 
> ZLIB             = $(GEMOLB)/libz.a
> ZLIBINC          = $(OS_INC)
> PNGLIB           = $(GEMOLB)/libpng.a
> PNGINC           = $(OS_INC)
> 
> #RSLINC           = /scratch/chiz/rsl/include
> #RSLLIB           = -L/scratch/chiz/rsl/lib -lrsl
> RSLINC           = $(NAWIPS)/extlibs/rsl/include
> RSLLIB           = $(GEMOLB)/rsl.a
> 
> LIBJASPER     = $(GEMOLB)/libjasper.a
> 
> LIBBZ2                = $(GEMOLB)/libbz2.a
> 
> LIBAODT               = $(GEMOLB)/libaodt.a
> LIBGPC                = $(GEMOLB)/libgpc.a
> LIBNCEPBUFR   = $(GEMOLB)/libncepBUFR.a
> 
> BUFRFLAGS        = -O
> 
> HAVEMOTIF        = yes
> 
> CONFIGURE_OPTS   = 'CC=$(CC)' 'CFLAGS=-I$(OS_INC)' 'FC=$(FC)' 
> 'LD_LIBRARY_PATH=$(OS_LIB)'
> 
> include $(NAWIPS)/config/Makeinc.$(NA_OS)
> 
> OPSYS = FreeBSD
> 
> CC = cc
> FC = f77
> 
> MOTIFINC  = -I/usr/X11R6/include
> MOTIFLIBS = /usr/X11R6/lib/libXm.a -lXmu -lSM -lICE -lXp -lXext
> #
> # use these if old freebsd version uses lesstif instead of openmotif
> #OPENMOTIFROOT = $(NAWIPS)/openmotif/$(NA_OS)
> #MOTIFINC  = -I$(OPENMOTIFROOT)/include
> #MOTIFLIBS = $(OPENMOTIFROOT)/lib/libXm.a -lXmu -lSM -lICE -lXp -lXext
> 
> XWINCDIR  = -I/usr/X11R6/include
> 
> COPT = -DUNDERSCORE -D$(OPSYS) $(GEMINC) $(MOTIFINC) $(XWINCDIR) -O # -g
> FOPT =  -fno-second-underscore $(GEMINC) $(GEMINC)/$(OPSYS) # -g
> FOPT_NOGLOB = -fno-globals -Wno-globals
> NCII = "-I../libsrc"
> NCOPT = "CPPFLAGS=-DNDEBUG -Df2cFortran" "FFLAGS=-O -Wno-globals" "CFLAGS=-O 
> $(NCII)" "CXX= "
> JASPEROPT = '--disable-libjpeg'
> XML2OPT = 'CC=$(CC)' '--with-iconv'
> PKG-CONFIG-OPT='CFLAGS=-pthread'
> 
> CFLAGS = $(COPT)
> FFLAGS = $(FOPT)
> LDM_FLAGS =
> 
> 
> X11LIBDIR = -L/usr/X11R6/lib
> 
> BUFRFLAGS = -O -D_POSIX_SOURCE  -DNO_MSG_IPC
> 
> SYSLIBS =
> 
> ARSLEEP = sleep 1 ;
> 
> 


Ticket Details
===================
Ticket ID: XAM-913449
Department: Support GEMPAK
Priority: Normal
Status: Closed