Closed Bug 370118 Opened 17 years ago Closed 16 years ago

Thunderbird refuses to start: "Cannot find mozilla runtime directory. Exiting."

Categories

(Thunderbird :: Build Config, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3

People

(Reporter: tonymec, Assigned: standard8)

Details

(Keywords: verified1.8.1.18, Whiteboard: [trunk and 2.0.0.* Branch])

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070211 BonEcho/2.0.0.2pre
Build Identifier: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070211 Thunderbird/2.0pre" - Build ID: 2007021103

Thunderbird (but not Firefox) refuses to start, except when started as

cd /usr/local/thunderbird
./thunderbird &

The bug happens if, for instance I omit the ./ in the above (while the only "thunderbird" in the $PATH is a properly constructed link to /usr/local/thunderbird/thunderbird) or id I try to use a desktop icon which worked before; and that even if /usr/local/thunderbird is the current directory.

Reproducible: Always

Steps to Reproduce:
1. Try to start Thunderbird using just "thunderbird" as the command.

Actual Results:  
Message:

Cannot find mozilla runtime directory. Exiting.

then exit with status 1.

Expected Results:  
Thunderbird should start normally.

Additional info:
Since the parallel version of Firefox does not exhibit this problem, I did a diff of /usr/local/thunderbird/thunderbird against /usr/local/firefox/firefox and found that one line is missing: at line 122, the Firefox script has the additional line

      run_moz="$dist_bin/run-mozilla.sh"

Here is the context:

     if [ -x "$run_moz" ]; then
       cd "$curdir"
       dist_bin=`pwd`
+      run_moz="$dist_bin/run-mozilla.sh"
       found=1
       break
     fi
Version: unspecified → 2.0
Changing the above line didn't cure the bug.

What did cure the bug (after the above patch) (but this is perhaps not general enough as a "real" fix) was changing line 95 of /usr/local/thunderbird/thunderbird from

moz_libdir=/usr/local/lib/thunderbird-2.0pre

to

moz_libdir=/usr/local/thunderbird

This doesn't explain why Firefox doesn't exhibit the bug, however.
Attached patch fix the startup script (obsolete) — Splinter Review
Well, I'm submitting (just in case) the patch I applied to cure the bug. I suppose the filepathname in the Mozilla build tree will be different.
Can someone check me? The build-tree culprit seems to be the file mail/app/mozilla.in
Keywords: helpwanted
confirming so Scott see this - not sure if this is real or not, though.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Well, patching /usr/local/thunderbird/thunderbird as per attachment #254781 [details] [diff] [review] above fixed the problem. FYI, I have /usr/local/bin/thunderbird softlinked as follows:

lrwxrwxrwx 1 root root 26 Aug 14  2006 thunderbird -> ../thunderbird/thunderbird

-- Is it really necessary to search the softlink chain using ls and sed in a "while" loop? On my system, at least,

progname=`readlink -e $0`

does the job.
QA Contact: build → build-config
Attached patch Possible fixSplinter Review
I've just had a look at this. It seems like everything from bug 177996 made it into mozilla.in apart from the one-line fix up of attachment 156074 [details] [diff] [review].

mredir is no longer set in build config (bug 389673 removed it from FF only).

We should also display the error as "Cannot find Thunderbird runtime directory. Exiting", so changing that as well.

Attaching a patch that should fix all of this, I'll request reviews once I've tested it.
Assignee: mscott → bugzilla
Status: NEW → ASSIGNED
Severity: critical → normal
Comment on attachment 321072 [details] [diff] [review]
Possible fix

I'm happy this works now, so requesting review.

I've tried various symlink and starting up options and the all seem to work.

I didn't try the version name in the script name thing as I believe we don't do that any more. Certainly Shredder Alpha 1 just had "thunderbird" - with this, the script will pick up the right bin location automatically.
Attachment #321072 - Flags: review?(philringnalda)
Comment on attachment 321072 [details] [diff] [review]
Possible fix

Sure, seems reasonable to me.
Attachment #321072 - Flags: review?(philringnalda) → review+
Keywords: helpwanted
Version: 2.0 → Trunk
Whiteboard: [trunk and 2.0.0.* Branch]
Patch checked in on trunk. I guess we could put this on branch, but I'd like to see it back for a bit on trunk first.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Target Milestone: --- → Thunderbird 3
(In reply to comment #9)
> Patch checked in on trunk. I guess we could put this on branch, but I'd like to
> see it back for a bit on trunk first.
> 

OK, so it has baked for over a month on Trunk (and I've had a similar patch in my own Tb2 version since I reported this bug, which means more than a year). No problems that I can see.
P.S. The patch I'm currently using is the one in comment #0, which is part of the current "official" fix.
Comment on attachment 321072 [details] [diff] [review]
Possible fix

So I guess approval1.8.1.16 is the right flag to request (next TB 2 build).

This patch has been on the trunk for a while, and is basically just syncing TB's mozilla.in with everyone else, so should be low risk.

Requesting approval for next TB 2.0.0.x version.
Attachment #321072 - Flags: approval1.8.1.16?
Comment on attachment 321072 [details] [diff] [review]
Possible fix

Approved for 1.8.1.17, a=dveditz for release-drivers.
Attachment #321072 - Flags: approval1.8.1.17? → approval1.8.1.17+
Comment on attachment 321072 [details] [diff] [review]
Possible fix

This will have to get looked at in 1.8.1.18. We're frozen.
Attachment #321072 - Flags: approval1.8.1.18?
Attachment #321072 - Flags: approval1.8.1.17-
Attachment #321072 - Flags: approval1.8.1.17+
Attachment #321072 - Flags: approval1.8.1.18? → approval1.8.1.18+
Comment on attachment 321072 [details] [diff] [review]
Possible fix

Approved for 1.8.1.18, a=dveditz for release-drivers
Attachment #254781 - Attachment is obsolete: true
Checked into the 1.8.1 branch:

mozilla/mail/app/Makefile.in 	1.46.2.10
mozilla/mail/app/mozilla.in 	1.5.4.3
Keywords: fixed1.8.1.18
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18pre) Gecko/20081023 Thunderbird/2.0.0.18pre - Build ID: 2008102303

The fix is in. => verified1.8.1.18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: