Closed Bug 591145 Opened 11 years ago Closed 11 years ago

Build fails with mv: cannot stat 'nsImgBuildDefines.tmp': No such file or directory

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla2.0b8

People

(Reporter: bjackson0971, Assigned: anarchy)

References

Details

Attachments

(2 files, 5 obsolete files)

User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:2.0b5pre) Gecko/20100826 Firefox/4.0b5pre
Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:2.0b5pre) Gecko/20100823 Firefox/4.0b5pre

Starting on approximately 8/23, I have this error when compiling Firefox from trunk.

make[5]: Entering directory
>>>
>>> `/home/brad/projects/mozilla/obj-x86_64-unknown-linux-gnu/modules/libpr0n/build'
>>> { \
>>>     echo "#define IMG_BUILD_ENCODER_png" ;   echo "#define
>>> IMG_BUILD_ENCODER_jpeg" ; } > nsImgBumgBuildDefines.tmp
>>> mv: cannot stat `nsImgBuildDefines.tmp': No such file or directory
>>> make[5]: *** [export] Error 1

It creates a tmp file with a name that has random characters in the middle. I tried experimenting with the value of the string that is passed to echo, and the "Bumg" changed to other values.  It may have something to do with the ${d} part.  If I change it to $d or $\{d\}, it works properly.


Reproducible: Always

Steps to Reproduce:
1. Build Firefox from trunk

Actual Results:  
Make fails with mv: cannot stat `nsImgBuildDefines.tmp': No such file or directory

Expected Results:  
Completion of build
This is almost assuredly fallout from bug 513681. We really should just get rid of that Makefile goop, since that bug removed most of the options to change decoders, we should just fix the set of encoders too.
Blocks: 513681
Product: Firefox → Core
QA Contact: build.config → build-config
Assignee: nobody → anarchy
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #472092 - Flags: review?(khuey)
Comment on attachment 472092 [details] [diff] [review]
remove hack for disabling clobber on change of encoder

You need to remove it from GARBAGE, remove the comment, and #define the relevant defines at http://mxr.mozilla.org/mozilla-central/source/modules/libpr0n/build/nsImageModule.cpp#40
Attachment #472092 - Flags: review?(khuey) → review-
Updated with comments :)
Attachment #472092 - Attachment is obsolete: true
Attachment #472098 - Flags: review?(khuey)
Simply remove the checks in configure as they will do absolutely nothing.
Attachment #472100 - Flags: review?(khuey)
Attachment #472100 - Attachment is patch: true
Attachment #472100 - Attachment mime type: application/octet-stream → text/plain
Comment on attachment 472100 [details] [diff] [review]
remove configure checks for encoders

Righteous, but you need to fix up all the consumers. http://mxr.mozilla.org/mozilla-central/search?string=MOZ_IMG_ENCODERS
Attachment #472100 - Flags: review?(khuey) → review-
I believe all comments have been addressed any further changes please let me know.
Attachment #472100 - Attachment is obsolete: true
Attachment #472106 - Flags: review?(khuey)
Comment on attachment 472106 [details] [diff] [review]
remove configure checks for encoders V0.1

Looks good, just a few nits.

>diff --git a/jpeg/Makefile.in b/jpeg/Makefile.in
>--- a/jpeg/Makefile.in
>+++ b/jpeg/Makefile.in
>@@ -94,18 +94,16 @@ EXPORTS		= \
> 		jmorecfg.h \
> 		jpeglib.h \
> 		jpegint.h \
> 		jwinfig.h \
> 		jos2fig.h \
> 		$(NULL)
> 
> # These files enable support for writing JPEGs
>-# (on certain platforms, or if JPEG image encoder support is required)
>-ifneq (,$(filter os2 windows,$(MOZ_WIDGET_TOOLKIT))$(filter jpeg,$(MOZ_IMG_ENCODERS)))
> CSRCS		+= \
> 		jcapimin.c \
> 		jcparam.c \
> 		jcapistd.c \
> 		jcmarker.c \
> 		jcinit.c \
> 		jcmainct.c \
> 		jchuff.c \

This hunk needs to remove the matching endif.

>diff --git a/modules/libimg/png/Makefile.in b/modules/libimg/png/Makefile.in
>--- a/modules/libimg/png/Makefile.in
>+++ b/modules/libimg/png/Makefile.in
>@@ -73,17 +73,16 @@ CSRCS		+= \
> 		pngrio.c \
> 		pngrtran.c \
> 		pngrutil.c \
> 		$(NULL)
> 
> DEFINES		+= -DMOZ_PNG_READ
> 
> # These files enable support for writing PNGs
>-ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
> CSRCS		+= \
> 		pngwio.c \
> 		pngwrite.c \
> 		pngwtran.c \
> 		pngwutil.c \
> 		$(NULL)
> 
> DEFINES		+= -DMOZ_PNG_WRITE

Ditto.

>diff --git a/modules/libpr0n/Makefile.in b/modules/libpr0n/Makefile.in
>--- a/modules/libpr0n/Makefile.in
>+++ b/modules/libpr0n/Makefile.in
>@@ -41,19 +41,17 @@ srcdir		= @srcdir@
> VPATH		= @srcdir@
> 
> include $(DEPTH)/config/autoconf.mk
> 
> MODULE		= imglib2
> 
> DIRS		= public src decoders
> 
>-ifdef MOZ_IMG_ENCODERS
> DIRS		+= encoders
>-endif
> 
> ifdef ENABLE_TESTS
> DIRS  += test
> endif
> 
> DIRS		+= build
> 
> include $(topsrcdir)/config/rules.mk

Consolidate encoders onto the previous DIRS line

>diff --git a/modules/libpr0n/decoders/Makefile.in b/modules/libpr0n/decoders/Makefile.in
>--- a/modules/libpr0n/decoders/Makefile.in
>+++ b/modules/libpr0n/decoders/Makefile.in
>@@ -55,19 +55,17 @@ CPPSRCS = nsPNGDecoder.cpp nsJPEGDecoder
> 
> CSRCS   = iccjpeg.c \
>           $(NULL)
> 
> # Decoders need RasterImage.h
> LOCAL_INCLUDES += -I$(topsrcdir)/modules/libpr0n/src/
> 
> # PNG read/write stuff
>-ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
> DEFINES		+= -DMOZ_PNG_WRITE
>-endif
> DEFINES		+= -DMOZ_PNG_READ
> 
> 
> # The Icon Channel stuff really shouldn't live in decoders/icon, but we'll
> # fix that another time.
> ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
> DIRS = icon/gtk icon
> endif

Consolidate the two defines onto one line.

>diff --git a/modules/libpr0n/encoders/png/Makefile.in b/modules/libpr0n/encoders/png/Makefile.in
>--- a/modules/libpr0n/encoders/png/Makefile.in
>+++ b/modules/libpr0n/encoders/png/Makefile.in
>@@ -43,20 +43,16 @@ include $(DEPTH)/config/autoconf.mk
> MODULE		= imgpnge
> LIBRARY_NAME	= imgpnge_s
> FORCE_STATIC_LIB = 1
> MODULE_NAME	= imgEncoderPNGModule
> LIBXUL_LIBRARY = 1
> 
> EXTRA_DSO_LIBS	= gkgfx
> 
>-
>-ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
> DEFINES		+= -DMOZ_PNG_WRITE
>-endif
>-
> DEFINES		+= -DMOZ_PNG_READ
> 
> CPPSRCS		= nsPNGEncoder.cpp
> 
> include $(topsrcdir)/config/rules.mk
> 
> 

Ditto.

r=me with that.  Thanks for this!
Attachment #472106 - Flags: review?(khuey) → review+
Also, the place I mentioned to consolidate DIRS can probably become PARALLEL_DIRS for extra speed.
carrying forward review, with nit fixes.
Attachment #472106 - Attachment is obsolete: true
Attachment #472108 - Flags: review+
Attachment #472098 - Flags: approval2.0?
Attachment #472108 - Flags: approval2.0?
Comment on attachment 472108 [details] [diff] [review]
remove configure checks for encoders V0.2

cancel approval until we figure out why it is breaking try server.
Attachment #472108 - Flags: approval2.0?
Comment on attachment 472098 [details] [diff] [review]
remove hack for disabling clobber on change of encoder v0.1

remove approval until we fix try server.
Attachment #472098 - Flags: approval2.0?
Slight syntax error in the previous patch, I have run this through my machines and currently have it running on the try server. I will post back with the results from try but no failure on any of my local machines.
Attachment #472108 - Attachment is obsolete: true
Attachment #472113 - Flags: review+
Attachment #472113 - Flags: approval2.0?
Attachment #472098 - Flags: approval2.0?
bsmedberg, according to gavin, you are the appropriate person to look at this approval request.
Duplicate of this bug: 598635
update for bitrot, maybe we will get auth to land these rather soon.
Attachment #472113 - Attachment is obsolete: true
Attachment #484022 - Flags: review+
Attachment #484022 - Flags: approval2.0?
Attachment #472113 - Flags: approval2.0?
Version: unspecified → Trunk
Attachment #472098 - Flags: approval2.0? → approval2.0+
Attachment #484022 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
If you don't have commit access by then, I can land this after b7 is out.
Pushed:
http://hg.mozilla.org/mozilla-central/rev/76f5f4bfdf63
http://hg.mozilla.org/mozilla-central/rev/a6246fce5cc2
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
I was able to do a complete trunk build with no errors.

The dup bug 598635 that points to a Gentoo bug suggests this was caused by a bug in make v3.81 and I am running that version.
This is cruft worth killing regardless :-)
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.