Closed
Bug 371236
Opened 17 years ago
Closed 17 years ago
Mingw build error: ld.exe: cannot find -lmozjs
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: martijn.martijn, Unassigned)
References
Details
Attachments
(1 file)
706 bytes,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
I got a build error after updating my build last night: ygdrive/c/mozilla/mozilla/js/src/xpconnect/src/xpcwrappednativescope.cpp rm -f xpc3250.dll /cygdrive/c/mozilla/mozilla/build/cygwin-wrapper g++ -mno-cygwin -shared -o xpc3 250.dll nsScriptError.o nsXPConnect.o xpccallcontext.o xpccomponents.o xpcconte xt.o xpcconvert.o xpcdebug.o xpcexception.o xpcjsid.o xpcjsruntime.o xpclog.o xp cmaps.o xpcmodule.o xpcruntimesvc.o xpcstack.o xpcstring.o xpcthreadcontext.o xp cthrower.o xpcwrappedjs.o xpcvariant.o xpcwrappedjsclass.o xpcwrappednative.o xp cwrappednativeinfo.o xpcwrappednativejsops.o xpcwrappednativeproto.o xpcwrappedn ativescope.o XPCNativeWrapper.o XPCSafeJSObjectWrapper.o ./module.res -Wl,--whole-archive ../loader/libjsloader_s.a -Wl,--no-whole-archive -L../../. ./../dist/lib -lxpcom -lxpcom_core -L../../../../dist/bin -L../../../../dist/lib -lnspr4 -lplc4 -lplds4 -L../../../../dist/bin -lmozjs -lm -lgdi32 -lwinmm -l wsock32 c:\mozilla\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lmozjs collect2: ld returned 1 exit status make[5]: *** [xpc3250.dll] Error 1 make[5]: Leaving directory `/cygdrive/c/mozilla/mozilla/js/src/xpconnect/src' make[4]: *** [libs] Error 2 make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/js/src/xpconnect' make[3]: *** [libs_tier_gecko] Error 2 make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla' make[2]: *** [tier_gecko] Error 2 make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla' make[1]: *** [alldep] Error 2 make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla' make: *** [alldep] Error 2 C:\mozilla\mozilla> I think I 'fixed' it by backing out the relevant patch in bug 78081 ( https://bugzilla.mozilla.org/attachment.cgi?id=253788 ) and doing an autoconf-2.13 afterwards. So I guess something needs to be changed for the mingw platform?
Comment 1•17 years ago
|
||
I also get this. I haven't been able to investigate yet, been busy with a VC8 build bustage...
Comment 2•17 years ago
|
||
In a gcc build: $ grep -rsI MOZ_JS_LIBS config/ config/autoconf.mk:MOZ_JS_LIBS = -L$(LIBXUL_DIST)/bin -lmozjs config/autoconf.mk.in:MOZ_JS_LIBS = @MOZ_JS_LIBS@ In a VC8 build: $ grep -rsI MOZ_JS_LIBS config/ config/autoconf.mk:MOZ_JS_LIBS = $(LIBXUL_DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib config/autoconf.mk.in:MOZ_JS_LIBS = @MOZ_JS_LIBS@
I got the same error on my building process. I back out the patch in bug 78081 ( https://bugzilla.mozilla.org/attachment.cgi?id=253788 ) and then I did an autoconf-2.13, as you did, but it didn't fix the error. When I run: make -f client.mk build_all, I am still getting the same error. Any help will be really appreciate, thanks in advance!!
Reporter | ||
Comment 4•17 years ago
|
||
You might want to try a make -f client.mk clobber (or even a make -f client.mk distclean, which I did) before that.
I tried a make -f client.mk clobber, but it fail. Then I tried a make -f client.mk distclean, and then a make -f client.mk build_all, and I got the same error. Do you have any idea of what should I do to fix this. I am in this for first time, any help will be really appreciate, thanks in advance!!!
Comment 6•17 years ago
|
||
(In reply to comment #5) > I tried a make -f client.mk clobber, but it fail. Then I tried a make -f > client.mk distclean, and then a make -f client.mk build_all, and I got the same > error. Have you tried just removing your objdir? Do you even build with an objdir? The clean and distclean targets are not reliable.
(In reply to comment #6) > (In reply to comment #5) > > I tried a make -f client.mk clobber, but it fail. Then I tried a make -f > > client.mk distclean, and then a make -f client.mk build_all, and I got the same > > error. > > Have you tried just removing your objdir? Do you even build with an objdir? The > clean and distclean targets are not reliable. > I am not pretty sure of what my objdir is. I have a directory c:\mozilla where are all the files.(probably is this one) I have remove this file and restart all over again, but with the same results, I am still having this error: ld.exe: cannot find -lmozjs when I try a make -f client.mk build_all. Let me know if there is something I can do. thanks you!!!
Comment 8•17 years ago
|
||
Gavin, the build really is broken if you use gcc as the compiler. I think MOZ_JS_LIBS is wrong, see comment 2 (I have don't know how to fix it, so no patch, sorry). I fixed it temporarily in my tree by doing a workaround: cd dist/bin/ ln -s js3250.dll mozjs.dll cd ../../ make -f client.mk build I have another MSYS build tree using the VC8 compiler and that works fine, so it's just using gcc as the compiler that is broken (at least for me).
If you look at the rev 2.2 patch from bug 78081, you'll see MOZ_JS_LIBS being removed from one section of configure.in but not being added anywhere else. This is causing the win32 gcc build to look for the default value of -lmozjs instead of -ljs3250. And if 'make clean' or 'make distclean' are broken, someone should fix that.
Attachment #257363 -
Flags: review?(benjamin)
Comment 10•17 years ago
|
||
Comment on attachment 257363 [details] [diff] [review] v1.0 indeed. I didn't notice the difference between -ljs and -jsmozbitsversiongoop
Attachment #257363 -
Flags: review?(benjamin) → review+
Comment 11•17 years ago
|
||
I wonder if a solution would be install an older version. Do you think this may be a solution? if yes, how can I do that? I have tried every one of the "temporary" fixes post here but none of them works to me(comment 4 and 8). Let me know if there is something I can do so I can finish the building process, or if I should just wait for the fix?? any help will be really appreciate, thanks in advance
Comment 12•17 years ago
|
||
Checking in configure; /cvsroot/mozilla/configure,v <-- configure new revision: 1.1783; previous revision: 1.1782 done Checking in configure.in; /cvsroot/mozilla/configure.in,v <-- configure.in new revision: 1.1772; previous revision: 1.1771 done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•