Closed boozedog closed 12 years ago
I can't replicate this issue. OS?
Ubuntu 12.04 (development branch)
I was surprised to see this: OSError: [Errno 2] No such file or directory: '/Users/brian/node_xslt/build'
Where is it getting the brian in the path?
That is where I developed node_xslt, but I don't know how it's showing up in the build process. Could you post the contents of the wscript file?
Davids-MacBook-Pro:package david$ cat wscript
import subprocess
srcdir = '.'
blddir = 'build'
VERSION = '0.1.3'
def set_options(opt):
opt.tool_options('compiler_cxx')
def configure(conf):
conf.check_tool('compiler_cxx')
conf.check_tool('node_addon')
conf.check(lib=['xml2', 'xslt'], uselib_store='M', mandatory=True)
conf.env.set_variant('Release')
def build(bld):
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
obj.target = 'node_xslt'
obj.source = 'node_xslt.cc'
obj.cxxflags = subprocess.Popen(["xml2-config", "--cflags"], stdout=subprocess.PIPE).communicate()[0].strip().split()
obj.lib = ['xml2', 'xslt']
obj.libpath = ['/usr/lib']
Davids-MacBook-Pro:package david$ pwd
/Users/david/.npm/node_xslt/0.1.5/package
Can you try removing the "VERSION = '0.1.3'" line and rerunning "node-waf configure build"?
Done ... didn't seem to help:
Davids-MacBook-Pro:package david$ node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for library ['xml2', 'xslt'] : yes
'configure' finished successfully (0.184s)
Waf: Entering directory `/Users/brian/node_xslt/build'
Waf: Leaving directory `/Users/brian/node_xslt/build'
Traceback (most recent call last):
File "/usr/local/bin/node-waf", line 16, in <module>
Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare
prepare_impl(t, cwd, ver, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl
main()
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 188, in main
fun(ctx)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 386, in build
return build_impl(bld)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 405, in build_impl
bld.compile()
File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 268, in compile
os.chdir(self.bldnode.abspath())
OSError: [Errno 2] No such file or directory: '/Users/brian/node_xslt/build'
Davids-MacBook-Pro:package david$ pwd
/Users/david/.npm/node_xslt/0.1.5/package
It looks like somehow that directory got cached by node-waf. Try "node-waf distclean configure build"
Worked! So did I do something wrong? How can I avoid this issue next time?
No. I think I was supposed to clean out the build directory before publishing to npm, but I didn't so it had node-waf's cache from my system there.
Anyways I added "node-waf distclean" to run before install, so that should prevent it from happening in the future again.
Sweet. Thanks as always for your help!