Issue 7949 - Patch to build and bundle dlcompat 3rd party dependency
Summary: Patch to build and bundle dlcompat 3rd party dependency
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 1.0.0
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: OOo 1.1.2
Assignee: Martin Hollmichel
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks: 6078 26093
  Show dependency tree
 
Reported: 2002-09-28 18:48 UTC by pluby
Modified: 2004-10-26 00:44 UTC (History)
3 users (show)

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


Attachments
Save in $SRC_ROOT/external/download directory (9.63 KB, application/octet-stream)
2002-09-28 18:49 UTC, pluby
no flags Details
Apply using the following commands: cd $SRC_ROOT/external ; patch -p0 < /path/to/patch/file ; chmod a+x $SRC_ROOT/external/dlcompat/dlcompatpatch.sh (12.93 KB, patch)
2002-09-28 18:51 UTC, pluby
no flags Details | Diff
Save in the $SRC_ROOT/external/dlcompat directory after apply external.OOO_STABLE_1_PORTS.092702.patch (265 bytes, application/octet-stream)
2002-09-28 18:52 UTC, pluby
no flags Details
Patch for cws_srx645_ooo111fix3 branch (10.29 KB, patch)
2004-03-03 21:00 UTC, pluby
no flags Details | Diff
Apply patch using the following commands: cd $SRC_ROOT/external ; mkdir -p dlcompat ; patch -p0 < /path/to/patch/file (12.17 KB, patch)
2004-03-05 20:53 UTC, pluby
no flags Details | Diff
Apply patch by executing the following commands: cd $SRC_ROOT/scp ; patch -p0 < /path/to/patch/file (1.26 KB, patch)
2004-03-05 20:54 UTC, pluby
no flags Details | Diff
Save in $SRC_ROOT/external/download directory (53.56 KB, application/octet-stream)
2004-03-18 18:00 UTC, pluby
no flags Details
Save in the $SRC_ROOT/external/dlcompat directory after executing the following command: mkdir -p $SRC_ROOT/external/dlcompat (277 bytes, application/octet-stream)
2004-03-18 18:02 UTC, pluby
no flags Details
Apply patch using the following commands: cd $SRC_ROOT/external ; mkdir -p dlcompat ; patch -p0 < /path/to/patch/file (text/plain) (12.40 KB, patch)
2004-03-18 18:03 UTC, pluby
no flags Details | Diff
Apply patch by executing the following commands: cd $SRC_ROOT/scp ; patch -p0 < /path/to/patch/file (1.26 KB, patch)
2004-03-18 18:04 UTC, pluby
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pluby 2002-09-28 18:48:45 UTC
The following attachments to this issue integrate the 3rd party "dlcompat"
package that is required to buid and run OpenOffice.org on Mac OS X. The patch
must be applied using the following steps:

1. Execute the following command to get the new empty directories from cvs:

   cd $SRC_ROOT/external ; cvs update -d -r OOO_STABLE_1_PORTS

   If your source is not from cvs, you can ignore this step.

2. Save the "dlcompat-20020709.tar.gz" attachment in the
   $SRC_ROOT/external/download directory

3. Apply the "external.OOO_STABLE_1_PORTS.092702.patch" attachment
   using the following commands:

   cd $SRC_ROOT/external ; patch -p0 < /path/to/patch/file
   chmod a+x $SRC_ROOT/external/dlcompat/dlcompatpatch.sh
   

4. Save the "dlcompat.pat.tar.gz" attachment in the
   $SRC_ROOT/external/dlcompat directory

5. Perform a clean build. Doing a respin build will not have any effect as
   every executable and library that links to libdl.dylib needs to be relinked
   and a clean build is the only way to ensure that.

Since this patch includes 3rd party source, below is the form required by
http://external.openoffice.org:

     * Product Name: dlcompat
     * Product Version: 20020709
     * Vendor or Owner Name: Jorge Acereda
     * Vendor or Owner Contact: jacereda@users.sourceforge.net
     * OpenOffice.org Contact: pluby@openoffice.org
     * Date of First Use / date of License: 2002 / 2002
     * URL for Product Information: In the README file in the *.tar.gz
file form at the following URL:
http://prdownloads.sourceforge.net/fink/dlcompat-20020709.tar.gz?download
     * URL for License: In the LICENSE file in the *.tar.gz file form at
the following URL:
http://prdownloads.sourceforge.net/fink/dlcompat-20020709.tar.gz?download
     * Purpose: This software provides the dlopen() and dlsym() APIs for
Mac OS X.
     * Type of Encryption: none
     * Binary or Source Code: source
Comment 1 pluby 2002-09-28 18:49:35 UTC
Created attachment 2986 [details]
Save in $SRC_ROOT/external/download directory
Comment 2 pluby 2002-09-28 18:51:05 UTC
Created attachment 2987 [details]
Apply using the following commands: cd $SRC_ROOT/external ; patch -p0 < /path/to/patch/file ; chmod a+x $SRC_ROOT/external/dlcompat/dlcompatpatch.sh
Comment 3 pluby 2002-09-28 18:52:20 UTC
Created attachment 2988 [details]
Save in the $SRC_ROOT/external/dlcompat directory after apply external.OOO_STABLE_1_PORTS.092702.patch
Comment 4 utomo99 2003-10-08 04:42:05 UTC
Please try using the latest OpenOffice 1.1 Final , you can download it
from www.openoffice.org
many bug fixes and enhancements since your version and 1.1 Final . If
the problem still happend in 1.1 please report back 
It maybe not yet solve your Issue, but it worth to try.
Comment 5 pluby 2003-10-08 05:03:44 UTC
Are you sure you posted your attachment to the correct issue? I ask
this because this issue is a Mac OS X issue and there is no OOo 1.1
release for Mac OS X yet.

This issue still exists since dlcompat is required by the Mozilla
libraries that are included in OOo and, AFAIK, porting of the Mozilla
libraries to OOo 1.1 has not been done yet.
Comment 6 Martin Hollmichel 2003-11-17 14:12:26 UTC
set target milestone.
Comment 7 pluby 2004-03-03 21:00:57 UTC
Created attachment 13564 [details]
Patch for cws_srx645_ooo111fix3 branch
Comment 8 pluby 2004-03-03 21:07:27 UTC
Added a patch for integrating "dlcompat" into the cws_srx645_ooo111fix3 build.

Here are updated instructions for integrating the patch into the
cws_srx645_ooo111fix3 Mac OS X build. "dlcompat" is required for
cws_srx645_ooo111fix3 to build on Mac OS X 10.2. The patch
must be applied using the following steps:

1. Save the "dlcompat-20020709.tar.gz" attachment in the
   $SRC_ROOT/external/download directory

2. Execute the following command to create an empty $SRC_ROOT/external/dlcompat
   directory:

   cd $SRC_ROOT/external ; mkdir -p dlcompat

3. Apply the "external.cws_srx645_ooo111fix3.patch" attachment
   using the following commands:

   cd $SRC_ROOT/external ; patch -p0 < /path/to/patch/file
   chmod a+x $SRC_ROOT/external/dlcompat/dlcompatpatch.sh
   
4. Save the "dlcompat.pat.tar.gz" attachment in the
   $SRC_ROOT/external/dlcompat directory

5. Perform a clean build. Doing a respin build will not have any effect as
   every executable and library that links to libdl.dylib needs to be relinked
   and a clean build is the only way to ensure that.

Comment 9 khendricks 2004-03-03 21:28:45 UTC
Hi Patrick,

Good idea but we really don't want to use this on Panther at all.  Dan has integrated build environment 
vars into the config_office set_soenv.in.

So in MacosxEnv.Set you should see ...

...
setenv BUILD_OS_APPLEOSX "TRUE"
setenv BUILD_OS_MAJOR "10"
setenv BUILD_OS_MINOR "3"
setenv BUILD_OS_REV "2"
...

Please change your patch to not build dlcomapt at all if BUILD_OS_MINOR is >= 3

Thanks,

Kevin



Comment 10 pluby 2004-03-03 22:48:39 UTC
Does this cause build errors on Panther? If not, you might want to reconsider
including it in the Panther build as from what I have seen on the Trinity
forums, Ed's installer seems to be tripping on the libdl.dylib.

By bundling libdl.dylib with OOo, we have one less dependency to worry about and
I could add an scp patch that bundles the libdl.dylib built by this patch.
Comment 11 khendricks 2004-03-03 23:09:17 UTC
Hi,

Panther has its own libdl.dylib that is actually a symlink to libSystem.dylib.  It is now an official 
interface.  So you don't want to have to build libdlcompat when a real libdl already exists on Panther.

So Please simply special case the makefile.mk not to build a dlcompat for Panther.  It is easy to do and 
won't hurt Jaguar users at all.

We can use the same approach in scp to prevent libdl from being needed by the installed on Panther as 
well.

Kevin



Comment 12 pluby 2004-03-03 23:32:51 UTC
Ahh! They put the symbols in the System library.

I'll add the conditionalization to the patch tomorrow. If you tell me which scp
file to edit, I can post a patch for that as well.
Comment 13 khendricks 2004-03-03 23:49:08 UTC
Hi Patrick,

Thanks.  If setup.bin needs to run anything that uses libdl (does vcl use it?) it should probably be added 
to scp/source/global/setupzip.scp so that it gets unpacked into tmp first and ready to be used by 
setup.bin.

If not, then probably putting it in scp/source/office/files.scp would be best.

The easiiest solution would be in the makefile.mk to check the build machine for 

.IF $(BUILD_OS_MAJOR)=="10"
.IF $(BUILD_OS_MINOR)== "2"
CDEFS+= -DNEED_DLCOMPAT
.ENDIF
.ENDIF

And then have the code in the scp file check 

#ifdef NEED_DLCOMPAT

or something like that.

Unless Dan or you have a better idea!

Kevin





Comment 14 pluby 2004-03-04 00:07:03 UTC
I confirmed that libdl.dylib needs to be bundled with the "setup" executable and
it needs to be unzipped into the temp directory. I add both to scp.

 
Comment 15 pluby 2004-03-05 20:53:40 UTC
Created attachment 13594 [details]
Apply patch using the following commands: cd $SRC_ROOT/external ; mkdir -p dlcompat ; patch -p0 < /path/to/patch/file
Comment 16 pluby 2004-03-05 20:54:41 UTC
Created attachment 13595 [details]
Apply patch by executing the following commands: cd $SRC_ROOT/scp ; patch -p0 < /path/to/patch/file
Comment 17 pluby 2004-03-05 20:59:28 UTC
I attached external.cws_srx645_ooo111fix3.030504.patch which only builds and
delivers libdl.0.dylib on Mac OS X 10.2. Nothing will get built on later
versions of Mac OS X.

Also, I attached scp.cws_srx645_ooo111fix3.030504.patch which adds libdl.0.dylib
to all required places in the setup package on Mac OS X 10.2 only.

Note that if you build with this patch on Mac OS X 10.2 and install the setup
package on 10.3, OOo should work. So, in theory, you should be able to use these
patches to build a single setup package that runs on both 10.2 and 10.3.

I will test this later today to confirm that the 10.2 setup package runs OK on 10.3.
Comment 18 pluby 2004-03-06 00:33:17 UTC
I ran the setup package that I built on 10.2 on my 10.3 machine. I ran it in a
clean environment (i.e. without any OOo build environment variables) and it
installed and ran without a problem.

So, if you can commit the following patches and the patch in issue 26093, then
you should be able to use a 10.2 build for the next OOo 1.1 build that you post
for testing:

dlcompat-20020709.tar.gz
dlcompat.pat.tar.gz
external.cws_srx645_ooo111fix3.030504.patch
scp.cws_srx645_ooo111fix3.030504.patch
Comment 19 Martin Hollmichel 2004-03-09 16:30:59 UTC
need to approve dlcompat first, so set target to 1.1.2.
schedule approval until end of March
Comment 20 Martin Hollmichel 2004-03-18 13:47:03 UTC
mh->patrick: on sourceforge is in the meantime 20030629 version available and no
more reference to the old one. Is the 20030629 also usable. If you can confirm I
will approve.
Comment 21 pluby 2004-03-18 18:00:17 UTC
Created attachment 13913 [details]
Save in $SRC_ROOT/external/download directory
Comment 22 pluby 2004-03-18 18:02:42 UTC
Created attachment 13914 [details]
Save in the $SRC_ROOT/external/dlcompat directory after executing the following command: mkdir -p $SRC_ROOT/external/dlcompat
Comment 23 pluby 2004-03-18 18:03:51 UTC
Created attachment 13915 [details]
Apply patch using the following commands: cd $SRC_ROOT/external ; mkdir -p dlcompat ; patch -p0 < /path/to/patch/file (text/plain)
Comment 24 pluby 2004-03-18 18:04:28 UTC
Created attachment 13916 [details]
Apply patch by executing the following commands: cd $SRC_ROOT/scp ; patch -p0 < /path/to/patch/file
Comment 25 pluby 2004-03-18 18:14:01 UTC
Per Martin's request, I have attached the latest dlcompat release
(dlcompat-20030629.tar.gz) and new patch files that use this newer release. The
 dlcompat-20030629.tar.gz file was downloaded from
http://sourceforge.net/projects/fink/. I tested this patch in
cws_srx645_ooo111fix3 on Mac OS X 10.2. It built and both the setup executable
and the soffice execute ran from a Terminal with a clean environment (i.e. no
OOo build environment variables).

Here are updated instructions for integrating the patch into the
cws_srx645_ooo111fix3 Mac OS X build. "dlcompat" is required for
cws_srx645_ooo111fix3 to build on Mac OS X 10.2. The patch
must be applied using the following steps:

1. Save the "dlcompat-20030629.tar.gz" attachment in the
   $SRC_ROOT/external/download directory

2. Execute the following command to create an empty $SRC_ROOT/external/dlcompat
   directory:

   cd $SRC_ROOT/external ; mkdir -p dlcompat

3. Apply the "external.cws_src645_ooo111fix3.031804.patch" attachment
   using the following commands:

   cd $SRC_ROOT/external ; patch -p0 < /path/to/patch/file
   chmod a+x $SRC_ROOT/external/dlcompat/dlcompatpatch.sh
   
4. Save the latest "dlcompat.pat.tar.gz" attachment in the
   $SRC_ROOT/external/dlcompat directory

5. Apply the "scp.cws_src645_ooo111fix3.031804.patch" attachment
   using the following command:

   cd $SRC_ROOT/scp ; patch -p0 < /path/to/patch/file

6. Perform a clean build. Doing a respin build will not have any effect as
   every executable and library that links to libdl.dylib needs to be relinked
   and a clean build is the only way to ensure that.
Comment 26 Martin Hollmichel 2004-03-22 15:36:24 UTC
going to introduce own module in external project.
Comment 27 Martin Hollmichel 2004-03-25 13:15:08 UTC
setting this to fixed and verfied, although the alias in CVSROOT/modules is not
already there and I have not the possibilty to test now on MacOSX. has no impact
to "our standard platforms". final tasks to be done on a to becreated ooo112fix1
cws. mh->patrick: we should open a new issues then if needed. 
Comment 28 Martin Hollmichel 2004-03-25 13:15:42 UTC
set to verified.
Comment 29 Martin Hollmichel 2004-10-26 00:44:33 UTC
close issue.