From owner-freebsd-hackers Fri Jun 14 09:06:42 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA25045 for hackers-outgoing; Fri, 14 Jun 1996 09:06:42 -0700 (PDT) Received: from tombstone.sunrem.com (tombstone.sunrem.com [206.81.134.54]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA25039 for ; Fri, 14 Jun 1996 09:06:39 -0700 (PDT) Received: (from brandon@localhost) by tombstone.sunrem.com (8.6.12/8.6.12) id KAA15422; Fri, 14 Jun 1996 10:06:24 -0600 Date: Fri, 14 Jun 1996 10:06:23 -0600 (MDT) From: Brandon Gillespie To: Richard Toren cc: freebsd-hackers@freebsd.org Subject: Re: Compiling 'UPS' in FreeBSD.. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk With the following patch ups-3.14-beta compiles in FreeBSD 2.1-R, up to the linking point, at which it gets a few undefined symbols. I've done a little bit of tracking, but to the best of my knowledge these functions ARE compiled in... (sigh), I'll get back on this tomorrow but if any adventurous individuals wish to help I would appreciate it :) -- the death: Linking ups with gcc -O2 ... ao_aout.o: Undefined symbol `_scan_ao_symtab' referenced from text segment ao_aout.o: Undefined symbol `_do_ao_postscan_stuff' referenced from text segment ao_aout.o: Undefined symbol `_core_dread' referenced from text segment ao_aout.o: Undefined symbol `_core_dread' referenced from text segment ao_aout.o: Undefined symbol `_core_readstr' referenced from text segment *** Error code 1 Stop. -- the patch: diff -rc ups-3.14-beta.old/Makefile ups-3.14-beta/Makefile *** ups-3.14-beta.old/Makefile Mon Jun 5 04:13:42 1995 --- ups-3.14-beta/Makefile Fri Jun 14 09:51:28 1996 *************** *** 5,14 **** # You may want to edit some of the following variables. # Where to install the X11 binary ! X11BIN = /usr/local/X11 # Where to install the SunView binary ! SUNVIEWBIN = /usr/local/Sunview # Where to put the manual page MANDIR = /usr/local/man/man1 --- 5,14 ---- # You may want to edit some of the following variables. # Where to install the X11 binary ! X11BIN = /usr/local/X11R6 # Where to install the SunView binary ! #SUNVIEWBIN = /usr/local/Sunview # Where to put the manual page MANDIR = /usr/local/man/man1 *************** *** 19,33 **** # The directory where X include files live. # Comment out or change this line if you don't want # /usr/openwin/include searched ! X11INCLUDE=-I/usr/openwin/include # The arguments to cc needed to link against the Xlib library. # Change this to an explicit path (e.g. /usr/X11/lib/libX11.a) # if your Xlib lives in a place that won't be found by -lX11. ! X11LIB = -lX11 # Extra flags to pass to the build of the Wn library. ! X11WNFLAGS=INCLUDEDIRS=${X11INCLUDE} # If you want you can pass make variable assignments to the # subdirectory makefiles by uncommenting and editing the --- 19,33 ---- # The directory where X include files live. # Comment out or change this line if you don't want # /usr/openwin/include searched ! X11INCLUDE=-I/usr/X11R6/include # The arguments to cc needed to link against the Xlib library. # Change this to an explicit path (e.g. /usr/X11/lib/libX11.a) # if your Xlib lives in a place that won't be found by -lX11. ! X11LIB = "-L/usr/X11R6/lib -lX11" # Extra flags to pass to the build of the Wn library. ! #X11WNFLAGS=INCLUDEDIRS=${X11INCLUDE} # If you want you can pass make variable assignments to the # subdirectory makefiles by uncommenting and editing the *************** *** 53,64 **** MAKE = make # for makes that don't do this automatically ! CC = cc ! CFLAGS = -g # Use these flags by default ! RANLIB = : ! SVR4_LINKFLAGS=-R/usr/openwin/lib -L/usr/openwin/lib LINKFLAGS = ${SVR4_LINKFLAGS} # Flags for SunOS 4.1.3 --- 53,64 ---- MAKE = make # for makes that don't do this automatically ! CC = gcc ! CFLAGS = -O2 # Use these flags by default ! RANLIB = ranlib ! #SVR4_LINKFLAGS=-R/usr/openwin/lib -L/usr/openwin/lib LINKFLAGS = ${SVR4_LINKFLAGS} # Flags for SunOS 4.1.3 diff -rc ups-3.14-beta.old/ups/ao_aout.c ups-3.14-beta/ups/ao_aout.c *** ups-3.14-beta.old/ups/ao_aout.c Wed May 24 12:22:49 1995 --- ups-3.14-beta/ups/ao_aout.c Fri Jun 14 09:50:01 1996 *************** *** 31,37 **** --- 31,41 ---- #include #include #ifndef OS_BSDI + #ifndef __FreeBSD__ #include + #else + #include + #endif #endif #ifndef OS_SUNOS diff -rc ups-3.14-beta.old/ups/ao_symparse.c ups-3.14-beta/ups/ao_symparse.c *** ups-3.14-beta.old/ups/ao_symparse.c Sun Jun 4 14:17:09 1995 --- ups-3.14-beta/ups/ao_symparse.c Fri Jun 14 09:35:36 1996 *************** *** 1569,1575 **** ++s; break; case 'J': ! dimtype = DT_UNKNOWN; ++s; break; default: --- 1569,1575 ---- ++s; break; case 'J': ! dimtype = fbsd_DT_UNKNOWN; ++s; break; default: *************** *** 1578,1584 **** } *p_dimtype = dimtype; ! *p_val = (dimtype == DT_UNKNOWN) ? 0 : parse_subrange_signed_num(&s); *p_s = s; } --- 1578,1584 ---- } *p_dimtype = dimtype; ! *p_val = (dimtype == fbsd_DT_UNKNOWN) ? 0 : parse_subrange_signed_num(&s); *p_s = s; } diff -rc ups-3.14-beta.old/ups/ci_init.c ups-3.14-beta/ups/ci_init.c *** ups-3.14-beta.old/ups/ci_init.c Sun Jun 4 14:46:31 1995 --- ups-3.14-beta/ups/ci_init.c Fri Jun 14 09:36:15 1996 *************** *** 156,162 **** initialiser->in_list = first; } ! if (dim->di_htype == DT_UNKNOWN) { dim->di_high = count - 1; dim->di_htype = DT_CONSTANT; } --- 156,162 ---- initialiser->in_list = first; } ! if (dim->di_htype == fbsd_DT_UNKNOWN) { dim->di_high = count - 1; dim->di_htype = DT_CONSTANT; } diff -rc ups-3.14-beta.old/ups/ci_util.c ups-3.14-beta/ups/ci_util.c *** ups-3.14-beta.old/ups/ci_util.c Sun Jun 4 14:47:29 1995 --- ups-3.14-beta/ups/ci_util.c Fri Jun 14 09:36:38 1996 *************** *** 452,458 **** type->ty_base = base; type->ty_dim = NEW(dim_t); type->ty_dim->di_ltype = DT_CONSTANT; ! type->ty_dim->di_htype = (expr != NULL) ? DT_CONSTANT : DT_UNKNOWN; type->ty_dim->di_low = 0; type->ty_dim->di_type = ci_code_to_type(TY_INT); if (expr != NULL) { --- 452,458 ---- type->ty_base = base; type->ty_dim = NEW(dim_t); type->ty_dim->di_ltype = DT_CONSTANT; ! type->ty_dim->di_htype = (expr != NULL) ? DT_CONSTANT : fbsd_DT_UNKNOWN; type->ty_dim->di_low = 0; type->ty_dim->di_type = ci_code_to_type(TY_INT); if (expr != NULL) { diff -rc ups-3.14-beta.old/ups/symtab.h ups-3.14-beta/ups/symtab.h *** ups-3.14-beta.old/ups/symtab.h Sun Jun 4 14:25:36 1995 --- ups-3.14-beta/ups/symtab.h Fri Jun 14 09:59:55 1996 *************** *** 156,162 **** DT_CONSTANT, /* Compile-time bounds */ DT_FPREL, /* Runtime bound, stored at fp+offset */ DT_APREL, /* Runtime bound, stored at ap+offset */ ! DT_UNKNOWN /* Runtime bound, not known */ } Dimtype; /* Array size description. For C, the type of the range must be int --- 156,164 ---- DT_CONSTANT, /* Compile-time bounds */ DT_FPREL, /* Runtime bound, stored at fp+offset */ DT_APREL, /* Runtime bound, stored at ap+offset */ ! fbsd_DT_UNKNOWN /* Runtime bound, not known */ ! /* FreeBSD defines DT_UNKNOWN in sys/dirent.h as ! something else all together, BJG */ } Dimtype; /* Array size description. For C, the type of the range must be int diff -rc ups-3.14-beta.old/ups/va_type.c ups-3.14-beta/ups/va_type.c *** ups-3.14-beta.old/ups/va_type.c Sun Jun 4 14:29:11 1995 --- ups-3.14-beta/ups/va_type.c Fri Jun 14 09:36:53 1996 *************** *** 241,247 **** addr = ap + offset; break; ! case DT_UNKNOWN: *p_val_known = FALSE; return; --- 241,247 ---- addr = ap + offset; break; ! case fbsd_DT_UNKNOWN: *p_val_known = FALSE; return;