Closed Bug 342047 Opened 18 years ago Closed 18 years ago

syntax error at -e line 3, near "while" syntax error at -e line 7, near "}" when doing make export in security/nss/lib/cryptohi

Categories

(NSS :: Build, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 325148

People

(Reporter: romaxa, Unassigned)

References

()

Details

uname -a Linux romaxa-sr 2.6.16-1-686-smp #2 SMP Thu May 4 18:28:53 UTC 2006 i686 GNU/Linux make -v GNU Make 3.81 perl -v This is perl, v5.8.8 built for i486-linux-gnu-thread-multi sh is a symlink to bash bash --version GNU bash, version 3.1.14(1)-release (i486-pc-linux-gnu) When I try to build mozilla, I get syntax error at -e line 3, near "while" syntax error at -e line 7, near "}" during the export pass over nss. I removed the @ from the perl -e line as in: --- ../mozilla-cvs-20060615.13.45/security/coreconf/rules.mk 2006-06-19 18:04:12.000000000 +0300 +++ security/coreconf/rules.mk 2006-06-19 21:22:25.940133488 +0300 @@ -876,3 +876,3 @@ .DEFAULT: - @perl -e ' \ + perl -e ' \ open(MD, "< $(DEPENDENCIES)"); \ I get the following output when i run make export: romaxa@romaxa-sr:/home/work/xulrunner/mozilla-cvs-20060613/security/nss/lib/cryptohi$ make export perl -e ' \ open(MD, "< Linux2.6_x86_glibc_PTH_DBG.OBJ/.md"); \ while (<MD>) { \ if (m@ \.*/*Linux2.6_x86_glibc_PTH_DBG.OBJ/.md @) { \ $found = 1; \ last; \ } \ } \ if ($found) { \ print "Removing stale dependency Linux2.6_x86_glibc_PTH_DBG.OBJ/.md from Linux2.6_x86_glibc_PTH_DBG.OBJ/.md\n"; \ seek(MD, 0, 0); \ $tmpname = "Linux2.6_x86_glibc_PTH_DBG.OBJ/fix.md" . $$; \ open(TMD, "> " . $tmpname); \ while (<MD>) { \ s@ \.*/*Linux2.6_x86_glibc_PTH_DBG.OBJ/.md @ @; \ if (!print TMD "$_") { \ unlink(($tmpname)); \ exit(1); \ } \ } \ close(TMD); \ if (!rename($tmpname, "Linux2.6_x86_glibc_PTH_DBG.OBJ/.md")) { \ unlink(($tmpname)); \ } \ } elsif ("Linux2.6_x86_glibc_PTH_DBG.OBJ/.md" ne "Linux2.6_x86_glibc_PTH_DBG.OBJ/.md") { \ print "make: *** No rule to make target Linux2.6_x86_glibc_PTH_DBG.OBJ/.md. Stop.\n"; \ exit(1); \ }' syntax error at -e line 3, near "while" syntax error at -e line 7, near "}" Execution of -e aborted due to compilation errors. We don't quite understand the cause. the following seem to show the same behavior: romaxa@romaxa-sr:/home/work/xulrunner/mozilla-cvs-20060613/security/nss/lib/cryptohi$ perl -e ' open(MD, "< Linux2.6_x86_glibc_PTH_DBG.OBJ/.md"); while (<MD>) { if (m@ \.*/*Linux2.6_x86_glibc_PTH_DBG.OBJ/.md @) { $found = 1; last; } } if ($found) { print "Removing stale dependency Linux2.6_x86_glibc_PTH_DBG.OBJ/.md from Linux2.6_x86_glibc_PTH_DBG.OBJ/.md\n"; seek(MD, 0, 0); $tmpname = "Linux2.6_x86_glibc_PTH_DBG.OBJ/fix.md" . $$; open(TMD, "> " . $tmpname); while (<MD>) { s@ \.*/*Linux2.6_x86_glibc_PTH_DBG.OBJ/.md @ @; if (!print TMD "$_") { unlink(($tmpname)); exit(1); } } close(TMD); if (!rename($tmpname, "Linux2.6_x86_glibc_PTH_DBG.OBJ/.md")) { unlink(($tmpname)); } } elsif ("Linux2.6_x86_glibc_PTH_DBG.OBJ/.md" ne "Linux2.6_x86_glibc_PTH_DBG.OBJ/.md") { print "make: *** No rule to make target Linux2.6_x86_glibc_PTH_DBG.OBJ/.md. Stop.\n"; exit(1); }' romaxa@romaxa-sr:/home/work/xulrunner/mozilla-cvs-20060613/security/nss/lib/cryptohi$ perl -e ' \ open(MD, "< Linux2.6_x86_glibc_PTH_DBG.OBJ/.md"); \ while (<MD>) { \ if (m@ \.*/*Linux2.6_x86_glibc_PTH_DBG.OBJ/.md @) { \ $found = 1; \ last; \ } \ } \ if ($found) { \ print "Removing stale dependency Linux2.6_x86_glibc_PTH_DBG.OBJ/.md from Linux2.6_x86_glibc_PTH_DBG.OBJ/.md\n"; \ seek(MD, 0, 0); \ $tmpname = "Linux2.6_x86_glibc_PTH_DBG.OBJ/fix.md" . $$; \ open(TMD, "> " . $tmpname); \ while (<MD>) { \ s@ \.*/*Linux2.6_x86_glibc_PTH_DBG.OBJ/.md @ @; \ if (!print TMD "$_") { \ unlink(($tmpname)); \ exit(1); \ } \ } \ close(TMD); \ if (!rename($tmpname, "Linux2.6_x86_glibc_PTH_DBG.OBJ/.md")) { \ unlink(($tmpname)); \ } \ } elsif ("Linux2.6_x86_glibc_PTH_DBG.OBJ/.md" ne "Linux2.6_x86_glibc_PTH_DBG.OBJ/.md") { \ print "make: *** No rule to make target Linux2.6_x86_glibc_PTH_DBG.OBJ/.md. Stop.\n"; \ exit(1); \ }' syntax error at -e line 3, near "while" syntax error at -e line 7, near "}" Execution of -e aborted due to compilation errors. applying this change seems to make the problem go away, although we don't claim to understand why: --- ../../../../../mozilla-cvs-20060615.13.45/security/coreconf/rules.mk 2006-06-19 18:04:12.000000000 +0300 +++ ../../../../security/coreconf/rules.mk 2006-06-19 21:52:03.785859856 +0300 @@ -876,3 +876,3 @@ .DEFAULT: - @perl -e ' \ + @`perl -e ' \ open(MD, "< $(DEPENDENCIES)"); \ @@ -903,3 +903,3 @@ exit(1); \ - }' + }'` endif
*** This bug has been marked as a duplicate of 325148 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.