[Orca-users] orca 0.27 make error on Solaris 9

David Michaels dragon at raytheon.com
Thu Aug 26 17:59:48 PDT 2004


Addendum:

Note that a very common workaround for this sort of "this variable might 
be empty" problem is to do the following:

    if test "x$variable" != "x"; then
        do stuff
    fi

This avoids multi-level parsing problems resulting from $variable 
getting expanded to nothing and the quotes getting translated more than 
once (and thus potentially disappearing in one branch of the parse 
path).  While this works great when $variable is empty, it can cause 
problems if $variable is "mostly empty" (contains only white-space), and 
there's only one level of the parse tree (the quotes are getting 
properly interpreted), as is apparently the case here.

--Dragon


David Michaels wrote:

> I saw the exact same problem with the winallator part of the install.
>
> The reason it's happening is that $BIN_TARGETS ends up being set to "  
> " (double space), since there are no binary targets for Winallator.  
> The "install" rule tests "$BIN_TARGETS", but since that evaluates to 
> spaces, 'test' ends up getting no arguments, so "sh" complains that 
> the ";" showed up too soon.
>
> I fixed this by changing the test to compare against a string with two 
> spaces in it.  I also had to put a 'placeholder' in the for loop, 
> called 'foo', which will probably break if BIN_TARGETS actually gets 
> set to something. 
>
> Take the attachment, copy it to the winallator directory (or somewhere 
> else, if you like) and run:
>
>     cd <orca snapshot path>/data_gatherers/winallator
>     patch < winallator-makefile-patch.txt
>
>
> Just in case the attachment doesn't work, here's the diff -c:
>
> *** Makefile    Thu Aug 26 18:40:01 2004
> --- Makefile.fixed      Thu Aug 26 18:37:12 2004
> ***************
> *** 42,49 ****
>         $(MKDIR) $(sysconfdir)
>         $(MKDIR) $(RAW_WINALLATOR_DIR)
>         $(MKDIR) $(RRD_WINALLATOR_DIR)
> !       @if test "$(BIN_TARGETS)"; then \
> !         for file in $(BIN_TARGETS); do \
>             echo $(INSTALL) $$file $(bindir); \
>             $(INSTALL) $$file $(bindir); \
>           done; \
> --- 42,49 ----
>         $(MKDIR) $(sysconfdir)
>         $(MKDIR) $(RAW_WINALLATOR_DIR)
>         $(MKDIR) $(RRD_WINALLATOR_DIR)
> !       @if test "$(BIN_TARGETS)" != "  "; then \
> !         for file in $(BIN_TARGETS) foo; do \
>             echo $(INSTALL) $$file $(bindir); \
>             $(INSTALL) $$file $(bindir); \
>           done; \
>
> --Dragon
> PS - in a very similar setup to what you have, I now have winallator 
> crunching through 12 Windows server perfmon logs.  But I had to make a 
> lot of adjustments to SourceFile.pm, the orca perl script, and my 
> winallator.cfg file to get those Windows perfmon logs to be handled 
> nicely.  There are all sorts of quirks, like integers where floats 
> should be (modified SourceFile.pm to convert integers to floats as 
> they are read), blank fields (" " - modified SourceFile.pm to convert 
> blank fields to 0.0), and ^M's throwing off field headers (added a 
> "chomp" line and a tr line in SourceFile.pm to clean these off).
>
> Let me know if you want to see the diffs of those changes.  I'm still 
> cleaning up / verifying, so I don't want to post them right now.
>
> Good luck!
>
>
>
> GKP Tharan wrote:
>
>>Hi David,
>>
>>Thank you for your reply.
>>
>>This time the Orca snapshot-r380 fails to run make install.
>>
>>Based on your advise,
>>
>>I made sure that umask is 022 & tared with xpf option.
>>
>>I downloaded the snapshot verion this time versus 0.27 (make failed) last
>>
>>1.I downloaded the orca-snapshot-r380.bz2 again.
>>
>>2. Ran configure & make no problem
>>
>>3. Ran make test_modules (no error)
>>
>>4. ran make install_modules (no error)
>>
>>5. make install (installing orca) failed with the following error:
>>
>>cd winallator && make CFLAGS=-g -O2 install
>>/export/home/tools/orca-snapshot-r380/config/mkinstalldirs /usr/local/bin
>>/export/home/tools/orca-snapshot-r380/config/mkinstalldirs /usr/local/lib
>>/export/home/tools/orca-snapshot-r380/config/mkinstalldirs /usr/local/etc
>>/export/home/tools/orca-snapshot-r380/config/mkinstalldirs
>>/usr/local/var/orca/winallator
>>/export/home/tools/orca-snapshot-r380/config/mkinstalldirs
>>/usr/local/var/orca/rrd/winallator
>>sh: syntax error at line 2: `;' unexpected
>>*** Error code 2
>>make: Fatal error: Command failed for target `install'
>>Current working directory
>>/export/home/tools/orca-snapshot-r380/data_gatherers/winallator
>>*** Error code 1
>>make: Fatal error: Command failed for target `install'
>>Current working directory /export/home/tools/orca-snapshot-r380/data_gatherers
>>*** Error code 1
>>make: Fatal error: Command failed for target `install'
>>
>>Any pointers or help would be much helpful..
>>
>>Thanks Again,
>>-Murali
>>
>>On Thu, 26 Aug 2004 16:05:37 -0600, David Michaels <dragon at raytheon.com> wrote:
>>  
>>
>>>Check your umask (022 should be sufficient) when untarring the Orca
>>>files, and/or use "tar xfp" to ensure you maintain permissions.  It
>>>/looks/ like the configure script (or a configure.status script) does
>>>not have the execute bit set, namely the one in the rrd directory.
>>>
>>>Depending on which Orca you downloaded (0.27 versus snapshot), you may
>>>have to do some tweaking to the Makefiles to get them to work with gcc.
>>>My Makefiles all got created with -KPIC and -xO3 options configured in
>>>them for the compiler, but GCC didn't like those, and so it bombed.  I
>>>commented out the respective flags in the Makefiles, and the builds went
>>>smoothly, for the most part.  Then again, I was using perl 5.005003
>>>(comes with Solaris 9) and gcc 3.3.2
>>>
>>>--Dragon
>>>
>>>GKP Tharan wrote:
>>>
>>>    
>>>
>>>>Hi,
>>>>
>>>>I installed gcc 3.4 & Active perl 5.8 on solaris 9.
>>>>
>>>>Then downloaded the orca from orcaware.com. I was able to run the
>>>>configure with-html file. Then, the make fails with the following error:
>>>>
>>>>Manifying blib/man3/Math::Interpolate.3
>>>>cd rrdtool-1.0.40 && ./configure
>>>>--with-html-dir=/usr/local/apache2/htdocs
>>>>--cache-file=../../config.cache
>>>>sh: ./configure: cannot execute
>>>>*** Error code 1
>>>>make: Fatal error: Command failed for target `rrdtool-1.0.40/config.status'
>>>>Current working directory /export/home/tools/orca/0.27/packages
>>>>*** Error code 1
>>>>make: Fatal error: Command failed for target `all'
>>>>
>>>>Any pointers or help would be much appreciated.
>>>>
>>>>Thanks,
>>>>-Murali
>>>>_______________________________________________
>>>>Orca-users mailing list
>>>>Orca-users at orcaware.com
>>>>http://www.orcaware.com/mailman/listinfo/orca-users
>>>>
>>>>
>>>>      
>>>>
>>>--
>>>
>>>       Raytheon
>>>
>>>       *David P. Michaels*
>>>Senior Multi-Disciplined Engineer II W.H.
>>>NPOESS IS
>>>Platform OS Unix
>>>303.344.6840
>>>720.858.5952 fax
>>>720.521.0561 pager
>>>dragon at raytheon.com <mailto:dragon at raytheon.com>        *aka "Dragon"*
>>>
>>>"I wonder what news is doing..."
>>>
>>>news at newshost <29> ps -fu news
>>>news 18624 12367 2 0:00 makehistory
>>>
>>>"News is making history."
>>>
>>>
>>>    
>>>
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/orca-users/attachments/20040826/02761761/attachment.html>


More information about the Orca-users mailing list