Issue 10385 - OOO_STABLE_1_PORTS/X11+Aqua: OS X locale detection dylib
Summary: OOO_STABLE_1_PORTS/X11+Aqua: OS X locale detection dylib
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 1.0.1
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: OOo 1.0.4
Assignee: fa
QA Contact: issues@porting
URL:
Keywords:
: 11688 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-01-01 22:24 UTC by fa
Modified: 2004-03-25 07:51 UTC (History)
4 users (show)

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


Attachments
cd to $SRC_ROOT, unzip and untar the archive (2.89 KB, application/octet-stream)
2003-01-01 22:26 UTC, fa
no flags Details
cd to $SRC_ROOT/sal, patch -p0 < /path/to/patchfile Changes locale functions for OS X to use platform_extras module (32.31 KB, patch)
2003-01-01 22:27 UTC, fa
no flags Details | Diff
cd to sal/, patch -p0 < /path/to/patchfile Implements dynamic loading functions for locale (13.25 KB, patch)
2003-02-21 05:13 UTC, fa
no flags Details | Diff
cd to sal, uncompress. Implements OS X locale detection in separate dylib (2.49 KB, application/octet-stream)
2003-02-21 05:14 UTC, fa
no flags Details
Patch to tools project. Apply by executing the following commands: cd $SRC_ROOT/tools ; patch -p0 < /path/to/patch/file (533 bytes, patch)
2003-02-21 15:25 UTC, pluby
no flags Details | Diff
cd to sal, patch -p0 < /path/to/patchfile Loads the locale dylib on demand, and adds build support for the macxp specific systools directory (13.73 KB, patch)
2003-03-25 01:29 UTC, fa
no flags Details | Diff
cd to sal/systools, and untar and ungzip the archive Adds macxp specific files for creating dylib that does locale detection on OS X (2.50 KB, patch)
2003-03-25 01:30 UTC, fa
no flags Details | Diff
cd to scp, patch -p0 < /path/to/patchfile Allows the sal locale dylib to be delivered with the full product (3.28 KB, patch)
2003-03-27 06:18 UTC, fa
no flags Details | Diff
cd to sal, patch -p0 < /path/to/patchfile Adds the NOCREATESTATICLIB stuff for osx locale detection, and rearranges the build order for locale dylib too (1.77 KB, patch)
2003-03-28 00:17 UTC, fa
no flags Details | Diff
cd to solenv, patch -p0 < /path/to/patchfile Adds solenv build support for NOCREATESTATICLIB on OS X to not run static template data member library scripts on a dylib (9.92 KB, patch)
2003-03-28 00:18 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 2003-01-01 22:24:42 UTC
The Mac OS X/Darwin port has identified a need to store code that links against
Mac OS X frameworks outside the module the code is needed in.  Example:  locale
discovery.  On Mac OS X, it is easiest to use OS X functions to do this, but we
cannot link against OS X frameworks because Darwin doesn't have them. 
Therefore, this code must exist in a separate dylib and must be loaded at
run-time after determining the system we are running on.

The platform_extras module allows any platform to store pieces of code or other
resources in this module that do not fit or cannot be put into other modules of
the project.
Comment 1 fa 2003-01-01 22:26:14 UTC
Created attachment 4183 [details]
cd to $SRC_ROOT, unzip and untar the archive
Comment 2 fa 2003-01-01 22:27:08 UTC
Created attachment 4184 [details]
cd to $SRC_ROOT/sal, patch -p0 < /path/to/patchfile  Changes locale functions for OS X to use platform_extras module
Comment 3 fa 2003-01-01 22:27:50 UTC
Please approve both:

1)  platextras.tar.gz
2)  sal.OOO_STABLE_1_PORTS.010103.patch

Dan
Comment 4 khendricks 2003-01-02 16:01:08 UTC
Hi Dan, 
 
I just unpacked your platform_extras into my OOO_STABLE_1 tree and 
ran build in it under LinuxPPC and got the following error message: 
 
[kbhend@localhost ooo102]$ tcsh 
[kbhend@localhost ooo102]$ source LinuxPPCEnv.Set 
[kbhend@localhost ooo102]$ cd platform_extras 
[kbhend@localhost platform_extras]$ build 
build -- version: 1.65 
 
/src2/ooo102/platform_extras/macxp_x11osx/osxlocale 
mkout -- version: 1.3 
Nothing to build for GUIBASE unx 
/src2/ooo102/platform_extras/util 
------------------------------ 
Making: ../unxlngppc.pro/misc/platextra.dpc 
dmake subdmake=true   depend=t ALLDPC 
------------------------------ 
No Dependencies 
dmake:  Error -- `../unxlngppc.pro/slb/osxlocale.lib' not found, and 
can't be made 
---* TG_SLO.MK *--- 
 
ERROR: Error 65280 occurred while making 
/src2/ooo102/platform_extras/util 
[kbhend@localhost platform_extras]$ 
 
So I do not think something here is being properly protected. 
 
I will look closer. 
 
Kevin 
 
Comment 5 khendricks 2003-01-02 16:08:41 UTC
Hi Dan, 
 
The problem is in platform_extras/util/ 
 
There is no ifdef to protect those targets. 
 
You might want to model things on bridges/ or lingucomponent/ which 
do not use a util/ subdirectory to buid all libraries and instead 
merge that right into the appropriate target directory. 
 
Hope this helps, 
 
Kevin 
 
 
Comment 6 fa 2003-01-02 16:28:03 UTC
Kevin,

Correct.  I also need to add a dependency for idlc on platform_extras 
for Mac OS X at least.  We need this to be built fairly early during 
the process as tools like idlc, xml2cmp, cppumaker, etc, use the 
locale discovery during their run.

I will clean up and resubmit.

Dan
Comment 7 khendricks 2003-01-02 16:45:31 UTC
Hi Dan, 
 
For safety sake, why don't you have it be built before sal (if 
possible make it a sal dependency) that way it it should be done 
very very early in the process before all of the other tools which 
might be needed for the build (probably not possible given it uses 
osl_module right).  The key is to make it as early on as possible. 
 
However, the dependency thing is the real issue here!   
 
What if other platforms need platform_extras to be later than idlc 
or or have some other dependency that conflicts? 
 
What if some alter addition has a conflicting module dependency?   
 
Perhaps it would really be better to make put all of these changes 
right in sal (or the most closely related target) and not use a 
platform_extras for multiple platforms since conflicting 
dependencies will happen eventually? 
 
I think I understand better what Sander and Martin were talking 
about dependency wize given the limited flexibility in assigning 
module dependencies. 
 
Hmmm... I am just no sure what is best here. 
 
Couldn't all of this just become an extra subdirectory of sal that 
is built after sal/osl/unx/ (as set by the prj/build.lst 
dependencies)? 
 
Kevin 
 
 
 
Comment 8 fa 2003-02-21 05:12:57 UTC
The following two patches are the result of breaking down the platform_extras proposal to a per-module basis to resolve any potential conflicts.  The first two patches from January should _NOT_ be used.

Dan
Comment 9 fa 2003-02-21 05:13:43 UTC
Created attachment 4823 [details]
cd to sal/, patch -p0 < /path/to/patchfile  Implements dynamic loading functions for locale
Comment 10 fa 2003-02-21 05:14:29 UTC
Created attachment 4824 [details]
cd to sal, uncompress.  Implements OS X locale detection in separate dylib
Comment 11 pluby 2003-02-21 15:25:44 UTC
Created attachment 4832 [details]
Patch to tools project. Apply by executing the following commands: cd $SRC_ROOT/tools ; patch -p0 < /path/to/patch/file
Comment 12 pluby 2003-02-21 15:34:33 UTC
*** Issue 11688 has been marked as a duplicate of this issue. ***
Comment 13 Martin Hollmichel 2003-02-25 10:48:51 UTC
for lowlevel platform specific implementations I would prefer
sal/systools. for win32/win95 the same game was already played some
time ago.
we have now not the possiblity to specify platform dependent module
dependencies, so every makefile has to take care of excluding other
platforms.
also I see no problem to add a platform specific directory in a module
when needed.
As a last choice I'd introduce an extra module for this, but if it
make sense I will not object.
Comment 14 fa 2003-03-25 01:22:15 UTC
Martin,

I will move the Mac specific stuff into systools.  I'm not using systools/util at this time for any linkage stuff, the linkage currently happens in the Mac specific directory itself since there may need to be 1 library for each mac specific directory (ie one for Aqua, one for OS X/X11, one for pure Darwin).  Patches to be posted soon.

dan
Comment 15 fa 2003-03-25 01:29:39 UTC
Created attachment 5222 [details]
cd to sal, patch -p0 < /path/to/patchfile   Loads the locale dylib on demand, and adds build support for the macxp specific systools directory
Comment 16 fa 2003-03-25 01:30:31 UTC
Created attachment 5223 [details]
cd to sal/systools, and untar and ungzip the archive  Adds macxp specific files for creating dylib that does locale detection on OS X
Comment 17 fa 2003-03-25 01:31:28 UTC
The two 032403 patches implement the dylib-based locale detection on OS X using the systools directory.  Please approve both patches for commit to PORTS.

dan
Comment 18 fa 2003-03-27 00:12:56 UTC
salmacxp_extras.PORTS.032403.tar.gz
sal.extras.PORTS.032403.patch
tools.patch

Committed to OOO_STABLE_1_PORTS.

Dan
Comment 19 fa 2003-03-27 06:18:44 UTC
Created attachment 5261 [details]
cd to scp, patch -p0 < /path/to/patchfile   Allows the sal locale dylib to be delivered with the full product
Comment 20 fa 2003-03-27 06:20:18 UTC
scp.salextra.OOO_STABLE_1_PORTS.032603.patch committed to PORTS also.  Allows the locale detection dylib created by the other patches to actually be zipped up and delivered to the final product directory.

MERGE:
scp.salextra.OOO_STABLE_1_PORTS.032603.patch
salmacxp_extras.PORTS.032403.tar.gz
sal.extras.PORTS.032403.patch
tools.patch

Dan
Comment 21 fa 2003-03-28 00:16:17 UTC
For whatever reason, the locale detection patches broke the builds.  The problem
is that since the static template data member libraries link against libsal, but libsal
isn't built at the time that the locale detection stuff is, things go haywire.  So we
have to add a new variable NOCREATESTATICLIB, that specifies for a particular target
that we wish NOT to run the static data scripts on it.

Dan
Comment 22 fa 2003-03-28 00:17:24 UTC
Created attachment 5295 [details]
cd to sal, patch -p0 < /path/to/patchfile    Adds the NOCREATESTATICLIB stuff for osx locale detection, and rearranges the build order for locale dylib too
Comment 23 fa 2003-03-28 00:18:15 UTC
Created attachment 5296 [details]
cd to solenv, patch -p0 < /path/to/patchfile   Adds solenv build support for NOCREATESTATICLIB on OS X to not run static template data member library scripts on a dylib
Comment 24 fa 2003-03-28 00:18:55 UTC
Approval requested for the following patches:

sal.nocreatestatic.032703.patch
solenv.nocreatestatic.032703.patch

Dan
Comment 25 khendricks 2003-03-28 14:26:16 UTC
Hi Dan, 
 
Did you remember to protect the new makefile.mk added to the sal build.lst for unix 
platforms that are not MacOSX? 
 
If so, then both look okay so approved. 
 
Hope this helps, 
 
Kevin 
 
Comment 26 fa 2003-03-28 15:06:42 UTC
The makefile is build only for OS=MACOSX.

Committed to PORTS:
sal.nocreatestatic.032703.patch
solenv.nocreatestatic.032703.patch

Dan
Comment 27 fa 2003-08-04 05:43:51 UTC
Fixed in 103 GM and 1.1.
Comment 28 pavel 2003-11-23 11:47:23 UTC
This is fixed, can we close it?
Comment 29 Martin Hollmichel 2004-03-25 07:51:41 UTC
close issue.