Closed Bug 135589 Opened 24 years ago Closed 24 years ago

win32 gmake builds require --srcdir

Categories

(SeaMonkey :: Build Config, defect)

x86
Windows 2000
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: netscape, Assigned: netscape)

Details

Attachments

(1 file, 2 obsolete files)

The win32 gmake build has a known problem with absolute paths. Specifically, win32 native tools get confused by /cygdrive/ paths unless you've made a symlink and some cygwin tools appear to be confused by dos-drive paths. Because of this, we've always (for the past 3 months) required that a developer manually pass --srcdir to the build so that it always uses relative paths. Here's a patch to automate the setting of --srcdir. Here's a few of issues that make me question the effectiveness of the patch: 1) I haven't tried it on any drives that are not cygwin mounted (see bug 135391) 2) There's no way to override the autogenerated --srcdir as it's given on the cmdline, which overrides mozconfig settings 3) I really don't have a good win32 test for client.mk and I don't want to make that change for everyone.
Comment on attachment 77798 [details] [diff] [review] Use CONFIGURE_ARGS for --srcdir instead of CONFIGURE r=bryner
Attachment #77798 - Flags: review+
Comment on attachment 77798 [details] [diff] [review] Use CONFIGURE_ARGS for --srcdir instead of CONFIGURE a=rjesup@wgate.com for drivers
Attachment #77798 - Flags: approval+
Patch has been checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Kai noticed a problem that relative links in the MOZ_OBJDIR were not being correctly resolved. Apparently, abs2rel takes the easy way out and doesn't do any canonpath() or no_upwards() on its args. Which is probably a good thing since no_upwards seems to be broken. I had to write my own.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #77798 - Attachment is obsolete: true
Thanks for the patch! Using it, doing an objdir build with gmake on win32, where objdir has .. in it, does now work for me.
Comment on attachment 78518 [details] [diff] [review] Roll our own version of abs2rel a=rjesup@wgate.com
Attachment #78518 - Flags: review+
Attachment #78518 - Flags: approval+
Patch has been checked in on the 1.0 branch & the trunk.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Did you check in client.mk? I don't see a 1.178 version of it. Was that part of patch 78518 only a mistake?
On the other hand, with that part I still fail to build but in another way: J:\moz\rmp\mozilla>make -f client.mk build_all Adding client.mk options from j:\moz\rmp\profile_options: MOZ_OBJDIR=../prof_obj cd ../prof_obj /cygdrive/j/moz/rmp/mozilla/configure --srcdir=Usage: /cygdrive/j/moz/rmp/mozill a/build/unix/abs2rel.pl dest_path start_path Adding configure options from j:\moz\rmp\profile_options: --enable-crypto --srcdir=../mozilla --disable-debug --disable-dtd-debug --disable-logging --enable-optimize=-O2 configure: warning: /cygdrive/j/moz/rmp/mozilla/build/unix/abs2rel.pl: invalid h ost type configure: warning: dest_path: invalid host type configure: error: can only configure for one host and one target at a time *** Fix above errors and then restart with "make -f client.mk build" make: *** [../prof_obj/Makefile] Error 1 It doesn't matter if I specify a srcdir in my MOZCONFIG file or not.
Nope, looks like that checkin didn't take for the trunk. Just checked it in. Thanks for the catch. > /cygdrive/j/moz/rmp/mozilla/configure --srcdir=Usage: /cygdrive/j/moz/rmp/mozill a/build/unix/abs2rel.pl dest_path start_path The abs2rel.pl script is being called with incorrect args. Try: make -f client.mk SHELL='sh -x' to see what it's actually doing.
I must have hand applied it wrongly beacuse now, after updating I no longer see that error. Instead I get another error. I have my src in ../mozilla. Before the client.mk update Mozilla set srcdir to ../.. and now it seems to set it to .. The only way I have managed to get further is by hardcode the path in client.mk. + pwd + dirname /cygdrive/j/moz/rmp/mozilla + echo /cygdrive/j/moz/rmp/mozilla + sed -e s%//%/% + echo /cygdrive/j/moz/rmp + sed -e s/^.:// + cat /cygdrive/j/moz/rmp/mozilla/CVS/Root + echo /cygdrive/j/moz/rmp/cvsco.log + sed s%//%/% + cd /cygdrive/j/moz/rmp + test + true + mozilla/build/autoconf/mozconfig2client-mk /cygdrive/j/moz/rmp/mozilla mozilla /.mozconfig.mk + cygpath -u ../prof_obj + /cygdrive/j/moz/rmp/mozilla/build/unix/abs2rel.pl /cygdrive/j/moz/rmp/mozilla ../prof_obj + test -f .mozconfig.out + cat .mozconfig.out Adding client.mk options from j:\moz\rmp\profile_options: MOZ_OBJDIR=../prof_obj + rm -f .mozconfig.out + test ! -d ../prof_obj + true + echo cd ../prof_obj cd ../prof_obj + echo /cygdrive/j/moz/rmp/mozilla/configure --srcdir=.. /cygdrive/j/moz/rmp/mozilla/configure --srcdir=.. + cd ../prof_obj + /cygdrive/j/moz/rmp/mozilla/configure --srcdir=.. Adding configure options from j:\moz\rmp\profile_options: --enable-crypto --disable-debug --disable-dtd-debug --disable-logging --enable-optimize=-O2 configure: error: can not find sources in .. + echo *** Fix above errors and then restart with "make -f client.mk build" *** Fix above errors and then restart with "make -f client.mk build" + exit 1 make: *** [../prof_obj/Makefile] Error 1
Now that I'm awake....your MOZ_OBJDIR should be set to an absolute path. You want to set it to @TOPSRCDIR@/../prof_obj .
adding fixed1.0.0 keyword (branch resolution). This bug has comments saying it was fixed on the 1.0 branch and a bonsai checkin comment that agrees. To verify the bug has been fixed on the 1.0 branch please replace the fixed1.0.0 keyword with verified1.0.0.
Keywords: fixed1.0.0
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: