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

Example fails to compile with Error 127 #6

Open
fireproofsocks opened this issue Oct 20, 2021 · 1 comment
Open

Example fails to compile with Error 127 #6

fireproofsocks opened this issue Oct 20, 2021 · 1 comment

Comments

@fireproofsocks
Copy link
Contributor

fireproofsocks commented Oct 20, 2021

I thought I would give the examples a try, but there seems to be a hitch:

❯ mix run examples/hello_world.exs
cd c_src/termbox && CFLAGS=-fPIC ./waf configure --prefix=. && ./waf
/bin/sh: ./waf: No such file or directory
make: *** [c_src/termbox/build/src/libtermbox.a] Error 127
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. Try running the
commands "gcc --version" and / or "make --version". If these programs
are not installed, you will be prompted to install them.

I do have gcc and make installed:

❯ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
❯ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

In case it matters, here's my elixir version:

❯ elixir --version
Erlang/OTP 23 [erts-11.1.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Elixir 1.11.2 (compiled with Erlang/OTP 23)

I'm on Mac OS 11.6

It seems that the git clone command did not pull down any files from c_src/termbox/ -- I'm not sure what I'm looking at there (a submodule?) but in the Github UI it resolves to https://github.com/nsf/termbox/tree/0178b0123e176b9c4656177c07af832bc141b03f

@fireproofsocks
Copy link
Contributor Author

This repository includes submodules, so when cloning it, you must make sure you also clone the submodules.

For me running git version 2.30.1, I was able to pull down everything I needed by adding --recursive as a flag to my git clone command:

git clone --recursive [email protected]:ndreynolds/ex_termbox.git

Other versions of git may require different arguments.

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

1 participant