Last Comment Bug 544481 - Build fails on Ubuntu Lucid Lynx using 'dash' shell (# /bin/sh: Syntax error: end of file unexpected (expecting "}"))
: Build fails on Ubuntu Lucid Lynx using 'dash' shell (# /bin/sh: Syntax error:...
Status: VERIFIED FIXED
:
Product: Core
Classification: Components
Component: ImageLib (show other bugs)
: Trunk
: x86_64 Linux
: -- critical (vote)
: mozilla1.9.3a4
Assigned To: Gary Kwong [:gkw] [:nth10sd]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-05 06:44 PST by Eyad Salah
Modified: 2010-04-12 19:47 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
.4-fixed
.10-fixed


Attachments
patch (953 bytes, patch)
2010-02-11 07:02 PST, Gary Kwong [:gkw] [:nth10sd]
joe: review+
Details | Diff | Splinter Review
v2 (897 bytes, patch)
2010-03-11 08:20 PST, Gary Kwong [:gkw] [:nth10sd]
gary: review+
mbeltzner: approval1.9.2.4+
mbeltzner: approval1.9.1.10+
Details | Diff | Splinter Review

Description Eyad Salah 2010-02-05 06:44:03 PST
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
Comment 1 Eyad Salah 2010-02-05 06:48:02 PST
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
Comment 2 Eyad Salah 2010-02-05 06:52:14 PST
The @echo is obviously unnecessary
Comment 3 Gary Kwong [:gkw] [:nth10sd] 2010-02-11 07:02:24 PST
Created attachment 426500 [details] [diff] [review]
patch

(thanks to Eyad in the earlier comment)

Not sure who to ask for review - please forward on to the correct person if incorrect.
Comment 4 Daniel Holbert [:dholbert] 2010-02-11 10:17:36 PST
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.
Comment 5 Daniel Holbert [:dholbert] 2010-02-11 10:18:28 PST
(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.)
Comment 6 Ted Mielczarek [:ted.mielczarek] 2010-02-11 10:23:17 PST
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 7 Joe Drew (not getting mail) 2010-03-02 07:38:58 PST
Comment on attachment 426500 [details] [diff] [review]
patch

Remove the @echos before checking in!
Comment 8 Gary Kwong [:gkw] [:nth10sd] 2010-03-11 08:20:03 PST
Created attachment 431885 [details] [diff] [review]
v2

Carrying over r+.
Comment 9 Dão Gottwald [:dao] 2010-03-21 02:53:34 PDT
http://hg.mozilla.org/mozilla-central/rev/8695686a1d3b
Comment 10 Micah Gersten 2010-03-23 21:43:07 PDT
Comment on attachment 431885 [details] [diff] [review]
v2

This affects mozilla-1.9.1 and mozilla-1.9.2 as well.
Comment 11 Eyad Salah 2010-03-24 00:17:20 PDT
But it works fine for me now
Comment 12 Mike Beltzner [:beltzner, not reading bugmail] 2010-03-29 10:53:13 PDT
Comment on attachment 431885 [details] [diff] [review]
v2

a=beltzner for 1.9.1.10 and 1.9.2.3
Comment 13 Gary Kwong [:gkw] [:nth10sd] 2010-04-09 19:44:12 PDT
(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.
Comment 14 Gary Kwong [:gkw] [:nth10sd] 2010-04-12 17:53:08 PDT
(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)

Note You need to log in before you can comment on or make changes to this bug.