Closed Bug 544481 Opened 14 years ago Closed 14 years ago

Build fails on Ubuntu Lucid Lynx using 'dash' shell (# /bin/sh: Syntax error: end of file unexpected (expecting "}"))

Categories

(Core :: Graphics: ImageLib, defect)

x86_64
Linux
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla1.9.3a4
Tracking Status
status1.9.2 --- .4-fixed
status1.9.1 --- .10-fixed

People

(Reporter: computerjy, Assigned: gkw)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100125 Ubuntu/10.04 (lucid) Firefox/3.6 (.NET CLR 3.5.30729)
Build Identifier: 

When I try simple firefox build instructions on my Ubuntu Lucid-Lynx. I get the following error:
make[5]: Entering directory `/home/eyad/mozilla-central/objdir-ff-release/modules/libpr0n/build'
/bin/sh: Syntax error: end of file unexpected (expecting "}")
make[5]: *** [export] Error 2
make[5]: Leaving directory `/home/eyad/mozilla-central/objdir-ff-release/modules/libpr0n/build'
make[4]: *** [export] Error 2
make[4]: Leaving directory `/home/eyad/mozilla-central/objdir-ff-release/modules/libpr0n'
make[3]: *** [export_tier_gecko] Error 2
make[3]: Leaving directory `/home/eyad/mozilla-central/objdir-ff-release'
make[2]: *** [tier_gecko] Error 2
make[2]: Leaving directory `/home/eyad/mozilla-central/objdir-ff-release'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/eyad/mozilla-central/objdir-ff-release'
make: *** [build] Error 2

Reproducible: Always

Steps to Reproduce:
1.Checkout a mozilla-central source
2.Follow the instructions on https://developer.mozilla.org/en/Simple_Firefox_build
3.
Actual Results:  
Build error [Error 2] on libpr0n Make script


I have make Version: 3.81-7
and dash Version: 0.5.5.1-3ubuntu1
The following patch fixed the issue:

diff -r 32a13ebe9ba0 modules/libpr0n/build/Makefile.in
--- a/modules/libpr0n/build/Makefile.in	Fri Feb 05 08:34:35 2010 +0100
+++ b/modules/libpr0n/build/Makefile.in	Fri Feb 05 16:47:34 2010 +0200
@@ -91,16 +91,18 @@
 GARBAGE += _img_list nsImgBuildDefines.h
 
 export::
-	@{ \
+	@echo $(MOZ_IMG_DECODERS)
+	@echo $(MOZ_IMG_ENCODERS)
+	{ \
 	$(foreach d,$(filter-out icon,$(MOZ_IMG_DECODERS)), \
-		echo "#define IMG_BUILD_DECODER_${d}";) \
+		echo "#define IMG_BUILD_DECODER_${d}" ; ) \
 	$(foreach d,$(MOZ_IMG_ENCODERS), \
-		echo "#define IMG_BUILD_ENCODER_${d}";) \
+		echo "#define IMG_BUILD_ENCODER_${d}" ; ) \
 	} > nsImgBuildDefines.tmp
 	@if `cmp -s nsImgBuildDefines.h nsImgBuildDefines.tmp`; then \
 		rm -f nsImgBuildDefines.tmp; \
 	else \
-		rm -f nsImgBuildDefines.h; \
+	rm -f nsImgBuildDefines.h; \
 		mv nsImgBuildDefines.tmp nsImgBuildDefines.h; \
 	fi
The @echo is obviously unnecessary
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch patch (obsolete) — Splinter Review
(thanks to Eyad in the earlier comment)

Not sure who to ask for review - please forward on to the correct person if incorrect.
Attachment #426500 - Flags: review?(dholbert)
Comment on attachment 426500 [details] [diff] [review]
patch

(In reply to comment #3)
> Not sure who to ask for review - please forward on to the correct person if
> incorrect.

If you're not sure who to ask, you can always start with module owner for the directory. http://www.mozilla.org/about/owners.html says Joe Drew owns libpr0n -- redirecting review request to him.
Attachment #426500 - Flags: review?(dholbert) → review?(joe)
(FWIW, I've been running Ubuntu Lucid for around a month now, with no build problems.  That might be because I'm using bash instead of dash as my shell, though.)
This is definitely a dash issue. We can take a simple patch here to make this work again, but I think that whole Makefile section could probably be removed and replaced with a little section in configure, honestly. We've already hooked up machinery to force rebuilds if you reconfigure, so this is kind of overkill nowadays.
Comment on attachment 426500 [details] [diff] [review]
patch

Remove the @echos before checking in!
Attachment #426500 - Flags: review?(joe) → review+
Summary: Build fails on Ubuntu Lucid Lynx (# /bin/sh: Syntax error: end of file unexpected (expecting "}")) → Build fails on Ubuntu Lucid Lynx using 'dash' shell (# /bin/sh: Syntax error: end of file unexpected (expecting "}"))
Attached patch v2Splinter Review
Carrying over r+.
Assignee: nobody → gary
Attachment #426500 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #431885 - Flags: review+
Keywords: checkin-needed
Version: unspecified → Trunk
Component: Build Config → ImageLib
Product: Firefox → Core
QA Contact: build.config → imagelib
http://hg.mozilla.org/mozilla-central/rev/8695686a1d3b
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a4
Attachment #431885 - Flags: approval1.9.2.3?
Attachment #431885 - Flags: approval1.9.1.10?
Comment on attachment 431885 [details] [diff] [review]
v2

This affects mozilla-1.9.1 and mozilla-1.9.2 as well.
But it works fine for me now
Status: RESOLVED → VERIFIED
Comment on attachment 431885 [details] [diff] [review]
v2

a=beltzner for 1.9.1.10 and 1.9.2.3
Attachment #431885 - Flags: approval1.9.2.3?
Attachment #431885 - Flags: approval1.9.2.3+
Attachment #431885 - Flags: approval1.9.1.10?
Attachment #431885 - Flags: approval1.9.1.10+
(In reply to comment #12)
> (From update of attachment 431885 [details] [diff] [review])
> a=beltzner for 1.9.1.10 and 1.9.2.3

Setting checkin-needed.
Keywords: checkin-needed
(In reply to comment #13)
> (In reply to comment #12)
> > (From update of attachment 431885 [details] [diff] [review] [details])
> > a=beltzner for 1.9.1.10 and 1.9.2.3
> 
> Setting checkin-needed.

Can someone please check this in for the branches? (before the deadline in < 6 hours)
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: