This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

other/488: Problems Building GCC 2.95.2 on Concurrent Maxion (mips)



>Number:         488
>Category:       other
>Synopsis:       Problems Building GCC 2.95.2 on Concurrent Maxion (mips)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 24 12:16:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Cal Webster
>Release:        2.95.2
>Organization:
>Environment:
Hdwre:

	Concurrent Maxion 9100
	One MIPS CPU
	64MB Memory
	128MB Dedicated Swap Space
	4GB Wide SCSI Diff Hard Drive (2)
	525 MB QIC

OS:

	Name:		Concurrent Max/OS
	Release:	4.2MP
	Implementation:	SVR4 (w/obsolete parts)
	Version:	1.2V5

Native Development Tools:

   PKGINST:  ccs
      NAME:  Optimizing C Compilation System
  CATEGORY:  system
      ARCH:  maxion
   VERSION:  1.2
    VENDOR:  UNIX System Laboratories, Inc.

   PKGINST:  ecc
      NAME:  C Compiler
  CATEGORY:  system
      ARCH:  maxion
   VERSION:  3.0.11
    VENDOR:  Concurrent Computer Corporation

   PKGINST:  edb
      NAME:  Concurrent Debugger
  CATEGORY:  system
      ARCH:  maxion
   VERSION:  3.1.0
    VENDOR:  Edinburgh Portable Compilers Ltd.

   PKGINST:  epctools
      NAME:  Compilation Tools
  CATEGORY:  system
      ARCH:  maxion
   VERSION:  3.6.3
    VENDOR:  Concurrent Computer Corporation

   PKGINST:  f77
      NAME:  FORTRAN 77
  CATEGORY:  application
      ARCH:  maxion
   VERSION:  Version 2.6.8
    VENDOR:  Edinburgh Portable Compilers

   PKGINST:  pdtools
      NAME:  MAX/OS Unsupported Public Domain Tools
  CATEGORY:  utilities
      ARCH:  maxion
   VERSION:  1.2
   BASEDIR:  /
    VENDOR:  Concurrent Computer Corporation

	Public Domain Tools include:
		Perl 4.0.1.8
		gzip 1.2.4

   PKGINST:  softint
      NAME:  Software Packaging Tools
  CATEGORY:  system
      ARCH:  maxion
   VERSION:  1.2
    VENDOR:  UNIX System Laboratories, Inc.
 
   PKGINST:  xdev
      NAME:  X Window System Development Environment
  CATEGORY:  graphics
      ARCH:  maxion
   VERSION:  5.3
    VENDOR:  Concurrent Computer Corporation

Non-native GNU/Open Source Tools:

	CU Sudo version 1.5.3
	RCS version 5.1
	GNU Make version 3.79.1

>Description:
	I am, among other things, the lead network/systems engineer/administrator for the aircraft training systems at the Marine Corps Air Station, Cherry Point, NC. This facility is comprised of 16 flight simulator and maintenance trainer LANS 

and 4 software/maintenance support networks. There are a total of over 200 nodes with various hdwre/sftwre platforms connected via ADSL and wireless, spread-spectrum bridges. Keeping a handle on all of this obviously requires as much
automated administration and monitoring as possible. Perl helps me do this on most platforms. However, many of the real-time operating systems used do not conform to modern standards even though they may claim to be "SVR4". In particular, I'm having trouble building Perl 5 and some of the GNU tools.

	My main objective is to build Perl 5 on Concurrent's Max/OS for use with scripts I had recently developed to automate backing up and restoring various removable disks used on the system. Several attempts to build perl failed on both of our Maxion systems. There is a single-cpu development system and a dual-cpu training (production) system. The single-cpu system has a problem with a "runaway" make which ignores attempts to restrict the number of parallel processes until it runs out of resources. The dual-cpu system fails while looking for libraries during build.

	Reasoning that Perl should build easier with the GNU tools with which it was developed, I began trying to install GCC. This would also give me the advantage of simpler builds on other open-source tools and applications. I've spent the better part of a week trying to get GCC to build. Although I managed to fix most of the trivial problems, I am now beginning to run out of ideas. I have read everything I can find in the FAQ's and other documentation and have done numerous searches looking for answers.

	I have documented my attempts below in great detail. I have not included my attempts at building Perl. Those notes will go to perl5-porters@perl.org where I had a previous conversation with Dominic Dunlop [domo@computer.org]. First, You'll find a narative of my efforts, followed by pertinent details of the most recent attempts. Please forgive the size of this message, but I wanted to ensure there was enough information for anyone to offer whatever suggestions they feel may be of help. Thank you in advance!

####################
# Problem Narative #
####################

	Using the GCC "Install" page [http://gcc.gnu.org/install/index.html] as a guide, I downloaded and configured GCC for "mips". Configure could not guess the host identity or architecture. I read all of the install documentation and looked over the source tree.

	Before trying to build I decided to install GNU make, since this was recommended and because I'd had trouble with "runaway" make using the native tools. Building and installing GNU make 3.79.1 went well. I only had trivial warnings during compile. I did think it was odd that configure again claimed it could not guess host information. However, in the error message it correctly displayed all the information retrieved from "uname". GCC's failed guess was not followed by such a detailed message. Both "make" and "make check" building GNU Make had warnings and errors, but none fatal.	After installing GNU Make I re-ordered the PATH variable to point to the GNU Make. 

	Now, as suggested in the "Install" docs, I ran "make bootstrap" from a separate build dir using GNU make. Everything seemed to go well until the build got to "ranlib" when it stopped saying ranlib could not be found. The documentation for gcc seemed to indicate that "binutils" came with the installation. Alas, not ranlib. Since "ranlib" is part of the "binutils" package I downloaded the tar-ball and attempted to install it.

	Since I had GNU Make, I followed the install docs recommendation of building from a separate build dir. Again, I had to specify "mips" to configure. No problems there. It failed make, though, while working on "libiberty" saying it could not find "ranlib". Now I was getting frustrated. How was I going to build "ranlib" if it required "ranlib" to build?! The documentation for "binutils" says you don't need "ranlib" to build "binutils". Okay, then why the error? After it failed I looked closer and found that bad or missing "ar" could cause a failure.

	Althoug this system does have an "ar", I tried to build one anyway since it was related to "ranlib". It kept failing with the error "No 64 bit integer type available". This happens to be true (I think). The "longs" on this system are 32-bits, but we should be able to get around this. Anyway, I looked for other "ranlib" options and found a ranlib.sh which contained a simple "ar s $1" command. This didn't work either. The usage is different with this implementation of "ar". Even so, I could not change its flags to satisfy the system usage checks. It failed forever, regardless of which flags were used in "ranlib.sh".

	I finally gave up and inserted a "-" (dash) before the RANLIB value in the main "binutils" Makefile to prevent it from stopping the build. Now the build gets past the "ranlib" reference, but fails citing the same error I got trying to build the "ar": "No 64 bit integer type available". Looking at options in the "binutils" configure, I decided to add "--enable-64-bit-bfd". Configure says this adds "64-bit support (on hosts with narrower word sizes)". This doesn't change the error.

	I decided to forget about "binutils" and "ranlib" and just try to build GCC again. This time, I inserted the "-" (dash) to ignore "ranlib" errors. It seemed to be going okay with just a few warnings until it gets the fatal error "library not found: -lmld". I have no idea where this library is supposed to be, but this same error comes up even if I list all the library directories on the system in LD_LIBRARY_PATH.

###################
# Problem Details #
###################

Logged in to user account and "su" to "root".

Build Shell Environment:

ENV=.kshrc
HOME=/home/cwebster
HZ=100
INCLUDE_PATH=/usr/include:/opt/epc/ecc/include:/usr/ucbinclude:/usr/add-on/include
LD_LIBRARY_PATH=/usr/lib:/usr/ccs/lib:/usr/local/lib:/usr/share/lib:/usr/ucblib:/opt/epc/mips2tools3.6.3/:/usr/lib/nonshared/:/usr/lib/libp/:/usr/X/lib
LOGNAME=cwebster
MAIL=/var/mail/cwebster
MANPATH=/usr/share/man:/usr/share/x_man:/opt/man:/usr/local/man
MYMACHINE2=107a
MYPARENT1=in.telne
PATH=.:/usr/ccs/bin:/usr/ucb:/usr/local/bin:/usr/bin:/opt/bin:/opt/epc/bin:/opt/epc/ecc/bin:/opt/epc/epcf77/bin:/sbin:/usr/sbin:/etc:/usr/bin/X11
PS1=#
PWD=/usr/local/src
SHELL=/usr/bin/ksh
TERM=vt100
TERMCAP=/etc/termcap
TFADMIN=
TIMEOUT=0
TZ=EST5EDT
_=/usr/bin/su

==========================
GCC Configure Information:
==========================

../../src/gcc-2.95.2/configure mips

	All goes well - no warnings or errors

==========================


==================================================
GNU Make Configure, Build and Install Information:
==================================================
cd pub/gnu/make/

./configure

=============================
Fails - can't guess host type
=============================
If the version you run (./config.guess) is already up to date, please send the following data and any information you think might be pertinent to <config-patches@gnu.org> in order to provide the needed information to handle your system.

config.guess version = 2000-06-13

uname -m = maxion
uname -r = 4.2MP
uname -s = UNIX_SV
uname -v = 1.2V5

/usr/bin/uname -p = mips
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              =
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = maxion
UNAME_RELEASE = 4.2MP
UNAME_SYSTEM  = UNIX_SV
UNAME_VERSION = 1.2V5
configure: error: can not guess host type; you must specify one
=============================

./configure mips

Runs okay

./make

=========
Warnings:
=========

"fnmatch.c", line 412: warning: semantics of "<=" change in ANSI C; use explicit cast
"function.c", line 238: warning: semantics of "<=" change in ANSI C; use explicit cast
"function.c", line 1686: warning: semantics of "<" change in ANSI C; use explicit cast
"remake.c", line 1239: warning: improper member use: tv_nsec
"remake.c", line 1355: warning: semantics of "<" change in ANSI C; use explicit cast

"vpath.c", line 530: warning: improper member use: tv_nsec

"getloadavg.c", line 946: warning: integer overflow detected: op "<<"

=========

./make check 

==========================
Results of "./make check":
==========================
Making check in glob
make[1]: Entering directory `/usr/local/src/make-3.79.1/glob'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/usr/local/src/make-3.79.1/glob'
Making check in i18n
make[1]: Entering directory `/usr/local/src/make-3.79.1/i18n'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/usr/local/src/make-3.79.1/i18n'
make[1]: Entering directory `/usr/local/src/make-3.79.1'
/usr/local/src/make-3.79.1/./make  check-local
make[2]: Entering directory `/usr/local/src/make-3.79.1'
cd tests && perl ./run_make_tests.pl -make ../make
------------------------------------------------------------------------------
        Running tests for GNU make on UNIX_SV maxion_107a 4.2MP maxion
                           GNU Make version 3.79.1
------------------------------------------------------------------------------

Finding tests...

features/comments ....................................... ok

...omitted for brevity... (all tests "ok")

variables/flavors ....................................... ok

69 Tests Complete ... No Failures :-)

ln ./getloadavg.c loadavg.c || \
  cp ./getloadavg.c loadavg.c
cc  -g  -o loadavg -DTEST -DALIASPATH=\"/usr/local/share/locale:.\" -DLOCALEDIR=
\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DINCLUDEDIR=\"/usr/local/include\" -DHAVE_CONFIG_H -I. -I. -I./glob    loadavg.c -lelf
"loadavg.c", line 946: warning: integer overflow detected: op "<<"
The system uptime program believes the load average to be:
uptime
  11:35am  up 18:57,  4 users
The GNU load average checking code believes:
./loadavg
Error getting load average: No such device or address
make[2]: [check-loadavg] Error 1 (ignored)

==================================================================
 Regression PASSED: GNU Make 3.79.1 (mips-mips-elf) built with cc
==================================================================

make[2]: Leaving directory `/usr/local/src/make-3.79.1'
make[1]: Leaving directory `/usr/local/src/make-3.79.1'

==========================


make install

Great! It's done!

Now back to building GCC...

==================================================



==========================
GNU GCC Build Information:
==========================
cd /usr/local/obj/gcc-2.95.2

make bootstrap

Runs fine until it tries to use "ranlib", which it can't find:
make stops with this error:

ranlib libiberty.a
make: ranlib: Command not found
make: *** [libiberty.a] Error 127
*** Error code 2 (bu21)

Looking on system for "ranlib":

# find / -name ranlib -print
#

Not there - looking on Yahoo:

	"ranlib" is supposed to be part of the "binutils" pkg.
	Running make bootstrap is supposed to make the "binutils".

Looking for binutils:

Downloading "binutils" from:

	ftp://ftp.gnu.org/pub/gnu/binutils/binutils-2.9.1.tar.gz

Installing "binutils":

README recommends building in a different directory when using GNU make:

mkdir /usr/local/obj/binutils-2.9.1
cd /usr/local/obj/binutils-2.9.1

../../src/binutils-2.9.1/configure mips

Okay - that went well

make

==============================
Problems with "binutils" make:
==============================
ranlib libiberty.a
make[1]: ranlib: Command not found
make[1]: *** [libiberty.a] Error 127
make[1]: Leaving directory `/usr/local/obj/binutils-2.9.1/libiberty'
make: *** [libiberty.a] Error 2
*** Error code 2 (bu21)
==============================

This is getting rediculous! How can I build ranlib if it requires ranlib to successfuly build?!

Well, docs say you don't need ranlib to build binutils. 
Says to run this script then move binutils/ar to dir in local path (/usr/local/bin).

vi ar.sh

#!/bin/sh
MAKE=${MAKE-make}
${MAKE} $* AR=true all-libiberty
${MAKE} $* AR=true all-bfd
cd binutils
${MAKE} $* ADDL_DEPS='$(BULIBS)' ADDL_LIBS='$(BULIBS) ../bfd/*.o `cat ../libiber
ty/required-list ../libiberty/needed-list | sed -e "s,\([^ ][^ ]*\),../libiberty
/\1,g"`' ar

=================================
"ar.sh" failed with these errors:
=================================
make: *** [all-bfd] Error 2
"../bfd/bfd.h", line 135: #error: No 64 bit integer type available
make: *** [arparse.o] Error 1
=================================

Try building binutils under /usr/local/src/binutils-2.9.1

Nope - same errors

=============================
ranlib libiberty.a
make[1]: ranlib: Command not found
make[1]: *** [libiberty.a] Error 127
make[1]: Leaving directory `/usr/local/src/binutils-2.9.1/libiberty'
make: *** [libiberty.a] Error 2
=============================

Found this somewhere - I forget where

# The following is commented out for the convertion to automake.
# This rule creates a single binary that switches between ar and ranlib
# by looking at argv[0].  Use this kludge to save some disk space.
# However, you have to install things by hand.
# (That is after 'make install', replace the installed ranlib by a link to ar.)
# Alternatively, you can install ranlib.sh as ranlib.

Found "ranlib.sh" and copied it to /usr/local/bin.
Changed "ranlib" references to "ranlib.sh"

Get this error regardless of variations on flags used with "ar" (inside ranlib.sh)

====================================
        ranlib.sh libiberty.a
UX:ar: ERROR: One of [drqtpmx] must be specified
UX:ar: TO FIX: Usage: ar [-V?] -key[arg] [posname] afile [name ...]
         where key[arg] is one of the following: r[uabi], m[abi], d, q, t, p, x
*** Error code 1 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)
====================================


Let's just forget about "ranlib" for now.

vi Makefile

Changed:

	RANLIB = ranlib.sh
		to
	RANLIB = -ranlib

Okay, gets through ranlib errors, but now stops on library reference:

./configure --enable-c-mbchar mips

make

=====================
Errors from gcc make:
=====================
UX:make: ERROR: cannot load ranlib (bu24).
*** Error code 1 (bu21) (ignored)

UX:make: WARNING: No suffix list.

Bootstrapping the compiler


"cccp.c", line 2679: warning: argument is incompatible with prototype: arg #1

"mbchar.c", line 238: warning: assignment type mismatch

        cc  -DIN_GCC  -DMULTIBYTE_CHARS=1   -g   -DHAVE_CONFIG_H  -o cccp cccp.o
 cexp.o intl.o prefix.o version.o  mbchar.o  obstack.o       -lmld ../libiberty/
libiberty.a
ld: fatal error: library not found: -lmld
*** Error code 1 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)
=====================



==========================



###########
# The End #
###########
>How-To-Repeat:
Attempt build on same platform and environment.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]