Issue 5472 - OO638C_MacOSX/aqua: lzip doesn't successfully call scpzip
Summary: OO638C_MacOSX/aqua: lzip doesn't successfully call scpzip
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: current
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ed
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks: 2588
  Show dependency tree
 
Reported: 2002-06-01 05:11 UTC by fa
Modified: 2004-03-25 04:21 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
'cd' to SRC_ROOT/scptools, patch -p0 < patch-file-here, build, deliver, then go to instsetoo/ and build, deliver. (1.08 KB, patch)
2002-06-01 05:12 UTC, fa
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description fa 2002-06-01 05:11:10 UTC
The problem in scptools/source/linker/lzip.cxx:
    ByteString aSysCmd( "scpzip" );
    for( i = 0; i < m_nCmd; ++i )
    {
        aSysCmd += ' ';
        aSysCmd += m_ppCmd[i];
    }
--->    system( aSysCmd.GetBuffer() );

The system() call for the Quartz build has problems calling 'scpzip'.  It returns status WIFSIGNALED=true (in sys/wait.h), signal #10 (SIGBUS).

Test 1) calling simply system("lzip") returns the same thing.
Test 2) calling system("grep") works CORRECTLY.
Test 3) copying scpzip to /scpzip, and calling system("/scpzip") works CORRECTLY.
Test 4) setting:
ByteString aSysCmd( "scpzip" ) to
ByteString aSysCmd
( "/Developer/OpenOffice/aqua_oo638c_macosx/solver/638/unxmacxp.pro/bin/scpzip"
 )
also WORKS.

It seems to me that the problem with the Quartz build of lzip is that paths are messing up system().  When the full path to scpzip is specified, system() has correct behavior.  When simply "scpzip" is passed, system() returns SIGBUS.

The following patch gets the environment variable STAR_RESOURCEPATH which should be the directory that scpzip is in, and calls system() with the full path to scpzip.  'cd' to SRC_ROOT/scptools, patch -p0 < patch-file-here, build, deliver, then go to instsetoo/ and build, deliver.

----NOTE: This is a hack, not a patch really.  It covers up the problem and avoids it, but we should probably fix the real problem with system() and sh instead.
Comment 1 fa 2002-06-01 05:12:15 UTC
Created attachment 1829 [details]
'cd' to SRC_ROOT/scptools, patch -p0 < patch-file-here, build, deliver, then go to instsetoo/ and build, deliver.
Comment 2 fa 2002-06-01 05:15:26 UTC
Should really go to Ed.  Forgot when creating.
Comment 3 ed 2002-06-04 04:19:05 UTC
committed to OO638C_MacOSX branch
Comment 4 ed 2002-06-04 04:19:43 UTC
forgot to change status with last commit :)
Comment 5 Martin Hollmichel 2004-03-25 04:21:33 UTC
close issue.