Issue 69373 - soffice.bin does not launch without script
Summary: soffice.bin does not launch without script
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m182
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: obrmac
QA Contact: issues@porting
URL:
Keywords: aqua
Depends on:
Blocks:
 
Reported: 2006-09-07 22:36 UTC by nospam4obr
Modified: 2007-05-24 21:20 UTC (History)
6 users (show)

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


Attachments
Patch changes the fallback for osl_loadModule (2.28 KB, patch)
2006-09-07 22:39 UTC, nospam4obr
no flags Details | Diff
this patch seems to fix libsalsystools.dylib issue (15.92 KB, patch)
2007-01-18 23:15 UTC, eric.bachard
no flags Details | Diff
more cleanest patch ( warning about implicit function declaration fixed ) (16.13 KB, patch)
2007-01-19 11:51 UTC, eric.bachard
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description nospam4obr 2006-09-07 22:36:18 UTC
Since Mac OS X expects absolut paths to be passed to dlopen, one can not start soffice.bin without having 
DYLD_LIBRARY_PATH set to the program directory or launching it from there.

The latter is due to a fallback in osl_psz_loadModule, which adds a './' to module names not having any '/'. 
The patch replaces this fallback by searching the library beside the executable.

obr->hro: please review the patch.
Comment 1 nospam4obr 2006-09-07 22:39:23 UTC
Created attachment 39036 [details]
Patch changes the fallback for osl_loadModule
Comment 2 moxfox 2006-09-08 08:11:11 UTC
Nice patch :)

However, please add appropriate comments to the code about what it does (esp.
the new "/" -related code). The old code had comments, there is no reason to
make the code less documented (it's already hard as it is).

Comment 3 nospam4obr 2006-09-08 08:38:01 UTC
Agreed. Will probably rework the patch also in a way that always prepends the
executable path for module names without path.

I would even say that relative paths (foo/bar.so) should always be treated
relative to executable path (instead of cwd) on all Unix platforms, even though
such paths are not used in OOo AFAIK. 
Comment 4 eric.bachard 2006-09-08 10:23:12 UTC
ericb->obr

Oliver, your patch works fine!

For the first time, I was able to launch native version of OpenOffice.org on Mac OS X without use the 
terminal.

Thank you for your work !!
Comment 5 tino.rachui 2006-09-21 07:36:20 UTC
myself on cc
Comment 6 eric.bachard 2006-10-28 10:58:11 UTC
ericb->obr

After some investigatons, I think something is missing with your patch because _imp_getProcessLocale
() does return C when bundle is run, and fr_FR.UTF-8 when run in terminal 

The exact reason is libsalsystools is searched in "/" , and not in the bundle.

This leads to important issues with the bundle, e.g. : 

1) instant crashes in some cases (like HyperLink-> Internet -> click on folder icon )
2) wizards are not working at all

Isn't it possible to modify the patch and use some getenv( )  function like, to search first in the bundle ?

Thanks in advance (and thanks to Pavel for his help)


Comment 7 pavel 2006-12-02 18:27:10 UTC
I added the patch to aquavcl01 for easier debugging.

I'm not marking this issue as fixed yet.
Comment 8 eric.bachard 2007-01-18 23:15:47 UTC
Created attachment 42291 [details]
this patch seems to fix libsalsystools.dylib issue
Comment 9 eric.bachard 2007-01-18 23:18:49 UTC
This patch works for me with aqua version, and seems to fix the libsalsystools.dylib issue (and maybe we 
now can read preferences files, not yet tested)

Can anyone do a code review ?

Thanks in advance
Comment 10 eric.bachard 2007-01-18 23:21:37 UTC
To be more complete, I removed libsalsystools.dylib, and I have linked osxlocale.cxx object to 
libuno_sal.dylib

This way, dlsym() seems to simply work

Comment 11 eric.bachard 2007-01-18 23:49:38 UTC
After some tries : 

/Users/ericb/Library/Application Suport/OpenOffice.org 2.1/user/macosxrc.txt 

works when using UpdateSettings()  : I can paint the UI in whatever color, but not choose the fonts 
(why?) 

What does not work yet is :

~/Library/Application Suport/OpenOffice.org 2.1/user/macosxrc.txt 

(default file in preset somewhere in the Bundle has not been not tested)
Comment 12 pavel 2007-01-19 07:36:27 UTC
I haven't checked the diff in details, but I like the patch in general: removing OSX specific stuff and moving 
it.

Good work, Eric.

Please check comments - there still are comments about loading something from dylib.
Comment 13 eric.bachard 2007-01-19 11:51:23 UTC
Created attachment 42305 [details]
more cleanest patch ( warning about implicit function declaration fixed )
Comment 14 eric.bachard 2007-01-19 11:56:47 UTC
New patch fixed the premac.h / postmac.h nightmare when using system.h 

+ some clean up about dilyb in comments

ericb->pjanik

Thank you :)   I want to thanks Oliver too : I just ordered and implemented his hints and suggestions.

ericb->tra

About your comments on IRC :

1) I can't get it work without use dlsym() , maybe add public headers for functions defined in 
osxlocale.cxx will help ?

Sorry, I need help/advices here :-/

2) everything is protected ( #ifdef MACOSX ... etc )


Comment 15 eric.bachard 2007-01-19 18:02:06 UTC
ericb->obrmac

As discussed on IRC, I have commited my changes in aquavcl01.
This way, you can continue for a more complete cleanup 



Comment 16 moxfox 2007-05-24 20:53:28 UTC
My understanding is that this has been fixed in cws aquavcl01. 
Marking as fixed. Reopen if I'm wrong.
Comment 17 moxfox 2007-05-24 21:20:14 UTC
see issue 73693 for further details.