To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2341
2340  |  2342
Subject: 
Re: Makefile command to make *.map files
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 8 Mar 2002 20:30:33 GMT
Viewed: 
2112 times
  
For clarity I am running under Win98 using CYGWIN tools as outlined by the
instructions "LegOS0.2.4 - Instructions for installing on NT/Win9x with
Cygwin".  I was looking for help on the sort command using $sort --help but
I was getting a similar error message.  I just discovered that using the
option /? gave me the help for sort.  This slightly confussed me because all
that I have learned about cygwin tools is that --help gives you the help.
And as I checked my system sort is also a dos command.  So the dos command
is taking precedence over the cygwin command. I have fixed this by adding in
Makefile.common another define CYGWINTOOLPREFIX as shown below

#
# WindowsNT/Cygnwin, test against several values:
#
ifneq (,$(findstring $(OSTYPE),cygwin32 CYGWIN_NT-4.0 WindowsNT Windows_NT))

# NT
TOOLPREFIX=/cygnus/cygwin-b20/H-i586-cygwin32/bin/h8300-hms-
CYGWINTOOLPREFIX=/cygnus/cygwin-b20/H-i586-cygwin32/bin/
SED_SFLAG=i

endif

And then in the rules for building the kernel in Makefile.kernel I modified
the rule for building map files to

# how to make map files
%.map: %.coff
$(NM) $*.coff | $(CYGWINTOOLPREFIX)sort -u > $*.map

This solved my problem and solved another common issue for which I will make
another posting about.  Thanks for the hint there Geoff.

Ed


In lugnet.robotics.rcx.legos, Geoff Gerrietts writes:
Quoting Ed Manlove (emanlove@ieee.org):
What is the sort command doing in the command to create *.map files within
the Makefile.kernal?

# how to make map files
%.map: %.coff
$(NM) $*.coff | sort -u > $*.map

Doing my build I get the following error and the resulting map file has size
zero.

/cygnus/cygwin-b20/H-i586-cygwin32/bin/h8300-hms-nm legOS.coff | sort -u > legOS
.map
SORT: File <-U> not found

I can't speak for absolute certain about this, not being familiar with
that part of the code, but sort -u is used to unique a list of
strings. That is, if you pipe a file:

spam
spam
spam
eggs

through sort -u, you get back

eggs
spam


It looks like the "sort" on your system doesn't grok -u tho.

--G.



Message has 1 Reply:
  Re: Makefile command to make *.map files
 
I had a similar problem with the "sort" program apparently not functioning and then someone kindly looked at my error output and pointed out that I should make sure that the CYGWIN bin path was added to the FRONT of my path as declared in my (...) (23 years ago, 9-Mar-02, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Makefile command to make *.map files
 
Quoting Ed Manlove (emanlove@ieee.org): (...) I can't speak for absolute certain about this, not being familiar with that part of the code, but sort -u is used to unique a list of strings. That is, if you pipe a file: spam spam spam eggs through (...) (23 years ago, 8-Mar-02, to lugnet.robotics.rcx.legos)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR