make install issue with "Update the copy of waf to current 1.5"

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

make install issue with "Update the copy of waf to current 1.5"

adrianc
When trying to build Samba from source I got the following error upon
make install.  I realize I should have done this as root but I'm
reporting an issue with the error reporting.

/home/alcinnz/Documents/samba/wscript: error: Traceback (most recent
call last):
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Utils.py", line
647, in recurse
     exec(compile(txt, file_path, 'exec'), dc)
   File "/home/alcinnz/Documents/samba/wscript_build", line 46, in
<module>
     bld.RECURSE('dynconfig')
   File "./buildtools/wafsamba/samba_utils.py", line 472, in RECURSE
     return ctx.add_subdirs(relpath)
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Build.py", line
993, in add_subdirs
     self.recurse(dirs, 'build')
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Utils.py", line
634, in recurse
     f(self)
   File "/home/alcinnz/Documents/samba/dynconfig/wscript", line 421, in
build
     bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}");
   File "./buildtools/wafsamba/wafsamba.py", line 866, in INSTALL_DIRS
     bld.install_dir(os.path.join(destdir, d))
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Build.py", line
840, in install_dir
     Utils.check_dir(destpath)
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Utils.py", line
426, in check_dir
     raise Errors.WafError('Cannot create the folder %r' % path, ex=e)
NameError: global name 'Errors' is not defined

Investigating a bit I find that Errors didn't exist and that WafError
existed in the same module. So taking the namespace off that error I
got:

/home/alcinnz/Documents/samba/wscript: error: Traceback (most recent
call last):
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Utils.py", line
647, in recurse
     exec(compile(txt, file_path, 'exec'), dc)
   File "/home/alcinnz/Documents/samba/wscript_build", line 46, in
<module>
     bld.RECURSE('dynconfig')
   File "./buildtools/wafsamba/samba_utils.py", line 472, in RECURSE
     return ctx.add_subdirs(relpath)
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Build.py", line
993, in add_subdirs
     self.recurse(dirs, 'build')
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Utils.py", line
634, in recurse
     f(self)
   File "/home/alcinnz/Documents/samba/dynconfig/wscript", line 421, in
build
     bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}");
   File "./buildtools/wafsamba/wafsamba.py", line 866, in INSTALL_DIRS
     bld.install_dir(os.path.join(destdir, d))
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Build.py", line
840, in install_dir
     Utils.check_dir(destpath)
   File
"/home/alcinnz/Documents/samba/third_party/waf/wafadmin/Utils.py", line
426, in check_dir
     raise WafError('Cannot create the folder %r' % path, ex=e)
TypeError: __init__() got an unexpected keyword argument 'ex'

This suggests a mis-merge rather than a typo in:

commit 2ab6c10f843c2bd703528bf5b753d8a74e97cf3a
Author: Jelmer Vernooij <[hidden email]>
Date:   Sat Mar 7 15:31:17 2015 +0100

     Update the copy of waf to current 1.5

     After making the update, this commit reverts the upstream addition
of
     LDVERSION support in Python.py, which is necessary for Python 3
     support in waf. This change conflicts with the last remaining
     Samba-specific change in waf to help with cross-compilation.

     Change-Id: Iedfdc0199e9d10dfbd910c4eab50c23f984b6e2d
     Signed-Off-By: Jelmer Vernooij <[hidden email]>

     Reviewed-by: Andrew Bartlett <[hidden email]>

Bringing waf up to date appears to fix the issue.
Reply | Threaded
Open this post in threaded view
|

Re: make install issue with "Update the copy of waf to current 1.5"

Andrew Bartlett
Thanks Adrian,

Jelmer,

I've looked with Adrian at the delta between what we have in third-party
and the latest waf 1.5 release, and the differences are not what are
mentioned in the commit (that I reviewed!).  That is, I can't see
anything about LDVERSION or big changes in Python.py, but other files
seem to have odd differences.

On Fri, 2015-05-01 at 13:21 +1200, [hidden email] wrote:

> commit 2ab6c10f843c2bd703528bf5b753d8a74e97cf3a
> Author: Jelmer Vernooij <[hidden email]>
> Date:   Sat Mar 7 15:31:17 2015 +0100
>
>      Update the copy of waf to current 1.5
>
>      After making the update, this commit reverts the upstream addition
> of
>      LDVERSION support in Python.py, which is necessary for Python 3
>      support in waf. This change conflicts with the last remaining
>      Samba-specific change in waf to help with cross-compilation.
>
>      Change-Id: Iedfdc0199e9d10dfbd910c4eab50c23f984b6e2d
>      Signed-Off-By: Jelmer Vernooij <[hidden email]>
>
>      Reviewed-by: Andrew Bartlett <[hidden email]>
>
> Bringing waf up to date appears to fix the issue.

Given this, what would break if we just re-sync with Waf 1.5 again?

Andrew Bartlett

--
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




Reply | Threaded
Open this post in threaded view
|

Re: make install issue with "Update the copy of waf to current 1.5"

Jelmer Vernooij
On Fri, May 01, 2015 at 05:44:17PM +1200, Andrew Bartlett wrote:
> Thanks Adrian,
>
> Jelmer,
>
> I've looked with Adrian at the delta between what we have in third-party
> and the latest waf 1.5 release, and the differences are not what are
> mentioned in the commit (that I reviewed!).  That is, I can't see
> anything about LDVERSION or big changes in Python.py, but other files
> seem to have odd differences.
The upstream change to add LDVERSION was reverted, meaning it is *not*
included in this commit.

What odd differences are you seeing?

Cheers,

Jelmer

>
> On Fri, 2015-05-01 at 13:21 +1200, [hidden email] wrote:
>
> > commit 2ab6c10f843c2bd703528bf5b753d8a74e97cf3a
> > Author: Jelmer Vernooij <[hidden email]>
> > Date:   Sat Mar 7 15:31:17 2015 +0100
> >
> >      Update the copy of waf to current 1.5
> >
> >      After making the update, this commit reverts the upstream addition
> > of
> >      LDVERSION support in Python.py, which is necessary for Python 3
> >      support in waf. This change conflicts with the last remaining
> >      Samba-specific change in waf to help with cross-compilation.
> >
> >      Change-Id: Iedfdc0199e9d10dfbd910c4eab50c23f984b6e2d
> >      Signed-Off-By: Jelmer Vernooij <[hidden email]>
> >
> >      Reviewed-by: Andrew Bartlett <[hidden email]>
> >
> > Bringing waf up to date appears to fix the issue.
>
> Given this, what would break if we just re-sync with Waf 1.5 again?
>
> Andrew Bartlett
>
> --
> Andrew Bartlett
> http://samba.org/~abartlet/
> Authentication Developer, Samba Team  http://samba.org
> Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: make install issue with "Update the copy of waf to current 1.5"

Andrew Bartlett
On Fri, 2015-05-01 at 14:37 +0000, Jelmer Vernooij wrote:

> On Fri, May 01, 2015 at 05:44:17PM +1200, Andrew Bartlett wrote:
> > Thanks Adrian,
> >
> > Jelmer,
> >
> > I've looked with Adrian at the delta between what we have in third-party
> > and the latest waf 1.5 release, and the differences are not what are
> > mentioned in the commit (that I reviewed!).  That is, I can't see
> > anything about LDVERSION or big changes in Python.py, but other files
> > seem to have odd differences.
> The upstream change to add LDVERSION was reverted, meaning it is *not*
> included in this commit.
>
> What odd differences are you seeing?

Jelmer,

None of the differences looked like LDVERSION.

Adrain,

Can you please attach the diff we created?

Andrew Bartlett

--
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba


Reply | Threaded
Open this post in threaded view
|

Re: make install issue with "Update the copy of waf to current 1.5"

Jelmer Vernooij
On Sat, May 02, 2015 at 09:36:47PM +1200, Andrew Bartlett wrote:

> On Fri, 2015-05-01 at 14:37 +0000, Jelmer Vernooij wrote:
> > On Fri, May 01, 2015 at 05:44:17PM +1200, Andrew Bartlett wrote:
> > > Thanks Adrian,
> > >
> > > Jelmer,
> > >
> > > I've looked with Adrian at the delta between what we have in third-party
> > > and the latest waf 1.5 release, and the differences are not what are
> > > mentioned in the commit (that I reviewed!).  That is, I can't see
> > > anything about LDVERSION or big changes in Python.py, but other files
> > > seem to have odd differences.
> > The upstream change to add LDVERSION was reverted, meaning it is *not*
> > included in this commit.
> >
> > What odd differences are you seeing?
>
> Jelmer,
>
> None of the differences looked like LDVERSION.
Yes, that's expected. LDVERSION was added upstream (and wasn't present
in Samba's copy of waf), and we chose to not include that change when
we updated from upstream.

E.g. I ran:

* ran buildtools/bin/updatew-waf.sh
* revert staged changes for Python.py

Cheers,

Jelmer
Reply | Threaded
Open this post in threaded view
|

Re: make install issue with "Update the copy of waf to current 1.5"

Jelmer Vernooij
On Sat, May 02, 2015 at 10:51:38AM +0000, Jelmer Vernooij wrote:

> On Sat, May 02, 2015 at 09:36:47PM +1200, Andrew Bartlett wrote:
> > On Fri, 2015-05-01 at 14:37 +0000, Jelmer Vernooij wrote:
> > > On Fri, May 01, 2015 at 05:44:17PM +1200, Andrew Bartlett wrote:
> > > > Thanks Adrian,
> > > >
> > > > Jelmer,
> > > >
> > > > I've looked with Adrian at the delta between what we have in third-party
> > > > and the latest waf 1.5 release, and the differences are not what are
> > > > mentioned in the commit (that I reviewed!).  That is, I can't see
> > > > anything about LDVERSION or big changes in Python.py, but other files
> > > > seem to have odd differences.
> > > The upstream change to add LDVERSION was reverted, meaning it is *not*
> > > included in this commit.
> > >
> > > What odd differences are you seeing?
> >
> > Jelmer,
> >
> > None of the differences looked like LDVERSION.
> Yes, that's expected. LDVERSION was added upstream (and wasn't present
> in Samba's copy of waf), and we chose to not include that change when
> we updated from upstream.
>
> E.g. I ran:
>
> * ran buildtools/bin/updatew-waf.sh
> * revert staged changes for Python.py

Andrew and I had a quick look at this together offline today. It looks
like this is a regression in upstream waf1.5 that was introduced by
6f106cb9f5c9d2ea933dda68481220c85c5495d6 in Dec 2014
(Issue 1514 - check_dir backport).

This is the current (non-whitespace) diff between upstream waf 1.5 and our copy:

diff --git a/third_party/waf/wafadmin/Tools/python.py b/third_party/waf/wafadmin/Tools/python.py
index cd96b65..a8a4aa0 100644
--- a/third_party/waf/wafadmin/Tools/python.py
+++ b/third_party/waf/wafadmin/Tools/python.py
@@ -195,19 +195,6 @@ LDVERSION = %r
  python_LIBDIR, python_LIBPL, INCLUDEPY, Py_ENABLE_SHARED, python_MACOSX_DEPLOYMENT_TARGET,
  python_LDVERSION))
 
- # Allow some python overrides from env vars for cross-compiling
- os_env = dict(os.environ)
-
- override_python_LDFLAGS = os_env.get('python_LDFLAGS', None)
- if override_python_LDFLAGS is not None:
- conf.log.write("python_LDFLAGS override from environment = %r\n" % (override_python_LDFLAGS))
- python_LDFLAGS = override_python_LDFLAGS
-
- override_python_LIBDIR = os_env.get('python_LIBDIR', None)
- if override_python_LIBDIR is not None:
- conf.log.write("python_LIBDIR override from environment = %r\n" % (override_python_LIBDIR))
- python_LIBDIR = override_python_LIBDIR
-
  if python_MACOSX_DEPLOYMENT_TARGET:
  conf.env['MACOSX_DEPLOYMENT_TARGET'] = python_MACOSX_DEPLOYMENT_TARGET
  conf.environ['MACOSX_DEPLOYMENT_TARGET'] = python_MACOSX_DEPLOYMENT_TARGET

Cheers,

Jelmer