作者:dvs5453401 | 来源:互联网 | 2023-05-18 15:34
IamnewtoErlang,soiamgoingthroughJoeArmstrongsbookProgrammingErlang.Inchapter25t
I am new to Erlang, so i am going through Joe Armstrong's book "Programming Erlang". In chapter 25 there's an example on how to work with rebar. I followed the instructions and created a Makefile
我是Erlang的新手,所以我要通过Joe Armstrong的书“编程Erlang”。在第25章有一个关于如何使用钢筋的例子。我按照说明创建了一个Makefile
all:
test -d deps || rebar get-deps
rebar compile -v
@erl -noshell -pa './deps/bitcask/ebin' -pa './ebin' -s myapp start
and rebar.config
和rebar.config
{deps, [
{bitcask, ".*", {git, "git://github.com/basho/bitcask.git", "master"}}
]}.
Getting the dependencies works, but compiling fails.
获得依赖项有效,但是编译失败。
The verbose output tells me that this command fails
详细输出告诉我该命令失败
cmd: cc -c $CFLAGS -g -Wall -fPIC -I"/usr/lib/erlang/lib/erl_interface-3.7.18/include" -I"/usr/lib/erlang/erts-6.2/include" c_src/bitcask_nifs.c -o c_src/bitcask_nifs.o
with this error
与这个错误
/home/user/folder/deps/bitcask/c_src/bitcask_nifs.c:22:19: fatal error: errno.h: No such file or directory
But
但
find /usr/include -name errno.h
gives me
给我
/usr/include/x86_64-linux-gnu/asm/errno.h
/usr/include/asm/errno.h
/usr/include/linux/errno.h
/usr/include/asm-generic/errno.h
So I was asking myself..
所以我问自己。
- what am I missing?
- 我缺少什么?
- how can I tell rebar about the depencies on the C libraries and where to find them?
- 如何告诉rebar关于C库的依赖关系以及在哪里找到它们?
- why isn't this configured correctly in the Makefile of bitcask?
- 为什么不能在bitcask的Makefile中正确配置它呢?
Maybe I was searching for the wrong terms, but I couldn't find any solution in the internets.
Many thanks in advance
也许我在寻找错误的术语,但是我在互联网上找不到任何解决方案。提前感谢
1 个解决方案