c-c configure fails, config.status is bogus

RESOLVED FIXED in mozilla17

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gaston, Assigned: glandium)

Tracking

unspecified
mozilla17
All
OpenBSD
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Since some days c-c configure fails on OpenBSD with

creating ./config.status
Traceback (most recent call last):
  File "./config.status", line 8, in <module>
    sys.path.append(os.path.join(topsrcdir, mozilla, 'build'))
NameError: name 'mozilla' is not defined
*** Fix above errors and then restart with               "gmake -f client.mk build"

See for example
http://buildbot.rhaalovely.net/builders/comm-central-i386/builds/240/steps/configure/logs/stdio

The generated config.status has 'mozilla' quotes removed, coming from m-c build/autoconf/config.status.m4 ?

# head objdir/config.status                                                                                                   
#!/usr/local/bin/python2.7
# coding=utf-8

import os, sys
topsrcdir = '''/var/buildslave-mozilla/comm-central-amd64/build'''
if not os.path.isabs(topsrcdir):
    topsrcdir = os.path.normpath(os.path.join(os.path.dirname(__file__), topsrcdir))
sys.path.append(os.path.join(topsrcdir, mozilla, 'build'))
from ConfigStatus import config_status


This is with sh being run from pdksh @(#)PD KSH v5.2.14 99/07/13.2

Likely because the quotes in configure line :

    topsrcdir = os.path.normpath(os.path.join(os.path.dirname(__file__), topsrcdir))
sys.path.append(os.path.join(topsrcdir, ${COMM_BUILD:+'mozilla',} 'build'))
from ConfigStatus import config_status

are stripped by ksh:

# FOO=bar  
# cat <<EOF
> echo ${FOO:+'blah',}
> EOF
echo blah,
#
(In reply to Landry Breuil (:gaston) from comment #0)
> are stripped by ksh:

by ksh from openbsd.
Looks like a bug in both mksh and pdksh. Not happening in dash, bash and ksh (the real ksh)
Created attachment 650470 [details] [diff] [review]
Work around mksh/pdksh bug in config.status.m4
Attachment #650470 - Flags: review?(ted.mielczarek)
Attachment #650470 - Flags: review?(ted.mielczarek) → review+
Assignee: nobody → mh+mozilla
https://hg.mozilla.org/integration/mozilla-inbound/rev/e5080772cee8
https://hg.mozilla.org/mozilla-central/rev/e5080772cee8
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
(Reporter)

Comment 6

5 years ago
Just a sidenote, this indeed is a bug in our pdksh, and will be fixed. See http://marc.info/?l=openbsd-tech&m=134451592625002&w=2 for discussion.
You need to log in before you can comment on or make changes to this bug.