0

I am currently trying to compile the Julia Language interpreter on Snow Leopard—it has been giving me a heck of a time, but I think that I almost have got it down.

The latest hurdle has been the following error:

make: *** No rule to make target `jltypes.o', needed by `/Users/arman/julia/usr/lib/libjulia-release.dylib'.  Stop.

The relevant parts of the makefile appear to be the following:

SRCS = \
jltypes gf ast builtins module codegen interpreter \
alloc dlload sys init task array dump toplevel jl_uv jlapi profile
...
OBJS = $(SRCS:%=%.o)
...
%.o: %.c $(HEADERS)
    @$(PRINT_CC) $(CC) $(CPPFLAGS) $(CFLAGS) $(SHIPFLAGS) -DNDEBUG -c $< -o $@
%.do: %.c $(HEADERS)
    @$(PRINT_CC) $(CC) $(CPPFLAGS) $(CFLAGS) $(DEBUGFLAGS) -c $< -o $@
%.o: %.cpp $(HEADERS)
    @$(PRINT_CC) $(CXX) $(call exec,$(LLVM_CONFIG) --cxxflags) $(CPPFLAGS) $(CXXFLAGS) $(SHIPFLAGS) -c $< -o $@
%.do: %.cpp $(HEADERS)
    @$(PRINT_CC) $(CXX) $(call exec,$(LLVM_CONFIG) --cxxflags) $(CPPFLAGS) $(CXXFLAGS) $(DEBUGFLAGS) -c $< -o $@
...
$(BUILD)/$(JL_LIBDIR)/libjulia-release.$(SHLIB_EXT): julia.expmap $(OBJS) flisp/libflisp.a support/libsupport.a $(LIBUV)
@$(PRINT_LINK) $(CXX) $(SHIPFLAGS) $(OBJS) $(RPATH_ORIGIN) -shared -o $@ $(LDFLAGS) $(LIBS) $(SONAME)
$(INSTALL_NAME_CMD)libjulia-release.$(SHLIB_EXT) $@

Everything seems to be properly in place. As I understand it, when looking for the rule for jltypes.o, Make should use the %.o rule; however, clearly it cannot find a rule at all.

What makes me crazy is that it compiles just fine on Lion. I've compared the makefiles, their includes, and the Make program itself, but to no avail. This is my first intimate experience with makefiles, so thank you in advance for your patience and help and let me know if I need to include any other information.

4

1 回答 1

2

没有%.o规则。有一个%.o: %.c $(HEADERS)(及其配套的 cpp)规则。这意味着它可以使用它来构建jltypes.o 以及jltypes.c$(HEADERS)是否可以找到它们。由于源文件可能在两个系统上都存在,我认为标题列表的计算方式不同(并且错误)。

请注意,makepp的 cvs 版本最近刚刚获得了一个新的选项变量MAKEPP_DEBUG,该变量导致它仅写入有关这些内容的详细信息。实用程序可以查看它们makepplog

makepp 还有很多。除了做 GNU make 能做的几乎所有事情,还有很多有用的东西,你甚至可以用一些 Perl 编程来扩展你的 makefile。

于 2013-08-25T14:31:08.763 回答