Last Comment Bug 781461 - c-c configure fails, config.status is bogus
: c-c configure fails, config.status is bogus
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: All OpenBSD
-- normal (vote)
: mozilla17
Assigned To: Mike Hommey [:glandium]
: Gregory Szorc [:gps] (away until 2017-03-20)
Depends on:
  Show dependency treegraph
Reported: 2012-08-09 01:42 PDT by Landry Breuil (:gaston)
Modified: 2012-08-19 04:05 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Work around mksh/pdksh bug in config.status.m4 (2.87 KB, patch)
2012-08-09 01:56 PDT, Mike Hommey [:glandium]
ted: review+
Details | Diff | Splinter Review

Description User image Landry Breuil (:gaston) 2012-08-09 01:42:43 PDT
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 build"

See for example

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

# head objdir/config.status                                                                                                   
# 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',}
echo blah,
Comment 1 User image Mike Hommey [:glandium] 2012-08-09 01:43:59 PDT
(In reply to Landry Breuil (:gaston) from comment #0)
> are stripped by ksh:

by ksh from openbsd.
Comment 2 User image Mike Hommey [:glandium] 2012-08-09 01:45:50 PDT
Looks like a bug in both mksh and pdksh. Not happening in dash, bash and ksh (the real ksh)
Comment 3 User image Mike Hommey [:glandium] 2012-08-09 01:56:21 PDT
Created attachment 650470 [details] [diff] [review]
Work around mksh/pdksh bug in config.status.m4
Comment 5 User image Ryan VanderMeulen [:RyanVM] 2012-08-18 16:19:51 PDT
Comment 6 User image Landry Breuil (:gaston) 2012-08-19 04:05:02 PDT
Just a sidenote, this indeed is a bug in our pdksh, and will be fixed. See for discussion.

Note You need to log in before you can comment on or make changes to this bug.