?
Solved

Problem with "build product", make error

Posted on 1999-01-25
13
Medium Priority
?
332 Views
Last Modified: 2013-12-26
A programmer left me a series of scripts to compile and package a series of programs into one executable.  The scripts do alot of "build product" or "build tools".  It all works fine on SCO OpenServer 5.0.4, but when I try and use the same scripts on Unixware 2.1.2, I get error messages.  When I tried it manually with build product, I get the message:

UX: make: Error. Must be a separator on rules line 4 (bu 39).

One person suggested that lines must have tabs rather than leading spaces, but that all seems to be fine.  There are a series of "Buildfiles" which contain sections like:

product:
   ( cd port; build product )
   ( cd ncurses; build product )

Some files have additional stuff, like actual cc commands, but I believe this is getting hung up the first time it tries to do a "build".  I am not a programmer, so I need some advice on what to look for.
0
Comment
Question by:douga99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 3

Expert Comment

by:mliberi
ID: 1296386
> One person suggested that lines must have tabs rather than  leading spaces, but that all seems to be fine.

Not ALL the lines must be preceded by a TAB char, only lines containing commands. The rule lines MUST NOT be preceded by TAB.

I experienced that "make" command behaves differently on different platforms. Many times I had to modify a working "Makefile" to get it working on another OS.


0
 

Expert Comment

by:kenro
ID: 1296387
Make sure you aren't running GNU make on your SCO machine, but regular make on UNIXWARE.  In general, GNU make will run anything regular make does, but not vice-versa.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1296388
mliberi, how about that you give your TAB comment as answer ;-)
0
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 

Author Comment

by:douga99
ID: 1296389
Just so everyone knows, the TAB comment above was not the answer.  It appears the file are structured appropriately with TABS where needed and with no TABS where not needed.  Thanks though.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1296390
Could you please post the first 10 line of this makefile.
0
 

Author Comment

by:douga99
ID: 1296391
Here is the "offending" Buildfile (is it the same as a makefile?):

OPTIONS = -DHAVE_RENAME -DHAVE_STRDUP -DHAVE_STRERROR -DHAVE_PWENT -DHAVE_GRENT -DHAVE_STRSTR -DHAVE_TMPFILE -DHAVE_TELL -DHAVE_FTIME

.c.o:
      $(CC) -c $(CFLAGS) $(OPTIONS) $<

SRCS =       default.c ftime.c getdate.c getpath.c grp.c matchpat.c \
      mkname.c mktime.c name.c pwd.c rename.c resolve.c spname.c \
      stccat.c stccpy.c strany.c strdup.c strenv.c strerror.c \
      strftime.c stricmp.c strint.c stristr.c strlwr.c strnicmp.c \
      strpack.c strpad.c strstr.c strupr.c tell.c tilde.c tmpfile.c \
      vector.c xgets.c

OBJS =       default.o ftime.o getdate.o getpath.o grp.o matchpat.o \
      mkname.o mktime.o name.o pwd.o rename.o resolve.o spname.o \
      stccat.o stccpy.o strany.o strdup.o strenv.o strerror.o \
      strftime.o stricmp.o strint.o stristr.o strlwr.o strnicmp.o \
      strpack.o strpad.o strstr.o strupr.o tell.o tilde.o tmpfile.o \
      vector.o xgets.o

all: $(LIBRARY)

product: $(LIBRARY)
      install -d -m 644 -f$(LIBDIR) $(LIBRARY)

clean:
      rm -f $(LIBRARY) getdate.c *.o a.out core

$(LIBRARY): $(OBJS)
      @rm -f $(LIBRARY)
      ar cq $(LIBRARY) $(OBJS)
      $(RANLIB) $(LIBRARY)

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1296392
looks good (if there are the TABS in the right places).
Only the first macro definition (OPTIONS=) may be the problem if it is written in 2 lines, then you need to add a \ as very last character in the first line, like:

OPTIONS = -DHAVE_RENAME -DHAVE_STRDUP -DHAVE_STRERROR -DHAVE_PWENT \
-DHAVE_GRENT -DHAVE_STRSTR -DHAVE_TMPFILE -DHAVE_TELL -DHAVE_FTIME

(hope that E-E, did format it corrctly)
0
 

Author Comment

by:douga99
ID: 1296393
I didn't realize when I did the cut and paste, that the indents no longer show.  There is a tab beginning each line in the section following a colon. The OPTIONS= line appears to be written as one continuous line.  Don't forget that this works fine on SCO OSR5, but bombs in UnixWare.  Is there something wrong with my UnixWare?

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1296394
It's difficult to see if the Makefile is right.

> There is a tab beginning each line in the section following a colon.
Hope, this is *not* true for the targets which have no commands (like all: $(LIBRARY) ).
Also, the error message says "separator on rules line 4 (bu 39)"
This is either the OPTIONS= line, or the target $(LIBRARY): $(OBJS)

To me, it looks like you have not posted the complete Makefile, 'cause I cannot see the definition of LIBRARY.
If you don't know how Makefiles work, try to add following and test again, then post result:

LIBRARY=keep_make_happy
0
 

Author Comment

by:douga99
ID: 1296395
I added the line:
LIBRARY=keep_make_happy
to the Buildfile and a blank line after.  The error message changed to:

UX: make: Error. Must be a separator on rules line 6 (bu 39).

There are various Buildfiles in different directories.  It seems that whenever
I try to "build <something>" I get basically the same error message.

Thanks for your help.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1296396
With the added LIBRARY macro (see last 2 comments), try following command:

   make -f Buildfile all

You said you're using a "build script", could you please specify this. Probably post it. Or just post result of following:

    grep -i make build-script

then tell us which Makefile or Buildfile you have posted in your comment Sunday, March 07 1999 - 04:53PM PST.


0
 

Author Comment

by:douga99
ID: 1296397
I just reinstalled my UnixWare system.  Now I can process the files properly -- its runs the Buildfiles and compiles as it should.  Thanks alot for bearing with me all this time.  I'd be pleased to assign you the points... just tell me how to do it!

0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 400 total points
ID: 1296398
answer in the comments,
If you like to grade another person, you have to post a new (dummy) question.
0

Featured Post

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
In this post we will learn different types of Android Layout and some basics of an Android App.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question