Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error when building on Antergos #113

Open
adds68 opened this issue Nov 22, 2018 · 7 comments
Open

Compilation error when building on Antergos #113

adds68 opened this issue Nov 22, 2018 · 7 comments

Comments

@adds68
Copy link

adds68 commented Nov 22, 2018

error: failed to run custom build command for termbox-sys v0.2.11
process didn't exit successfully: /home/adds68/git-repos/amp/src/amp-0.5.2/target/release/build/termbox-sys-4917c904e931f5ce/build-script-build (exit code: 101)
--- stdout
running: "rm" "-rf" ".termbox"
running: "git" "clone" "https://github.com/nsf/termbox" ".termbox"
waf configure: setting CFLAGS to: -m64 -fPIC
running: "./waf" "configure" "--prefix=/"
Traceback (most recent call last):
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Node.py", line 285, in ant_iter
raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Scripting.py", line 98, in waf_entry_point
run_commands()
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Scripting.py", line 155, in run_commands
parse_options()
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Scripting.py", line 128, in parse_options
Context.create_context('options').execute()
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Options.py", line 138, in execute
super(OptionsContext,self).execute()
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Context.py", line 92, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Context.py", line 133, in recurse
user_function(self)
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/wscript", line 11, in options
opt.load('compiler_c')
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Context.py", line 89, in load
fun(self)
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Tools/compiler_c.py", line 36, in options
opt.load_special_tools('c_*.py',ban=['c_dumbpreproc.py'])
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Context.py", line 296, in load_special_tools
lst=self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var)
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Node.py", line 334, in ant_glob
ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]
File "/home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Node.py", line 334, in
ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]
RuntimeError: generator raised StopIteration

--- stderr
Cloning into '.termbox'...
thread 'main' panicked at 'assertion failed: cmd.stdout(Stdio::inherit()).stderr(Stdio::inherit()).status().unwrap().success()', /home/adds68/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/build.rs:88:5
note: Run with RUST_BACKTRACE=1 for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
==> ERROR: A failure occurred in build().
Aborting...

@robbinhan
Copy link

+1

@wblondel
Copy link

wblondel commented Nov 22, 2018

Same problem, and same trace!

$ rustc --version
rustc 1.30.1

$ git --version
git version 2.19.1

$ python --version
Python 3.7.1

$ cmake --version
cmake version 3.12.4

@pbgc
Copy link

pbgc commented Nov 22, 2018

This seems a problem with Termbox and not with Amp.
Did you saw #110 ? Your python needs to resolve to python 2.x. to be able to compile Termbox.

@wblondel
Copy link

Ok, thanks, now we know what is the problem.

I found a solution on the ArchWiki: https://wiki.archlinux.org/index.php/python#Python_2
Read from "Finally, you may not be able to control the script calls, but there is a way to trick the environment. "

I followed the instructions and it worked.

@jmacdonald
Copy link
Owner

Thanks for the assist, @pbgc! The termion branch, once merged, will fix this by removing termbox as a dependency. 🙂

@craftyguy
Copy link

craftyguy commented Nov 22, 2018

This is because termbox includes an older version of waf which does not have Python 3.7 support...
nsf/termbox#117

IMHO, "just use python 2.7" seems like a terrible solution. (termbox builds with Python 3.6, for example)

@jmacdonald
Copy link
Owner

@craftyguy you can use Python 3.6! The trick is that Arch's python package points to 3.7, and there's no easy way to point to <= 3.6. I'll update its build script to bring in python2 as a build dependency and alias it during the build. Then it can be installed temporarily with makepkg -sri, at least until we've moved away from termbox and it's no longer a dependency at all. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants