不同的makefile产生不同的错误输出?

时间:2015-12-19 11:52:28

标签: c++ eclipse makefile eclipse-cdt

我正在开发一个并行地图​​/减少项目。我写的第一个<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <HorizontalScrollView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/horizontalScrollView"> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="match_parent"> <TextView android:layout_width="800dp" android:layout_height="100dp" android:text="New Text" android:id="@+id/textView2" android:background="#0000ff" android:gravity="center"/> <TextView android:layout_width="500dp" android:layout_height="100dp" android:text="New Text" android:id="@+id/textView4" android:background="#ff0000" android:gravity="center"/> </LinearLayout> </HorizontalScrollView> </LinearLayout> this one

然后我按照this教程(在我的链接问题中建议),这是新的makefile

makefile

以下是问题:当我执行第一个makefile生成的二进制文件时,会打印以下(正确的)错误消息:

#
# 'make depend' uses makedepend to automatically generate dependencies 
#               (dependencies are added to end of Makefile)
# 'make'        build executable file 'mycc'
# 'make clean'  removes all .o and executable files
#

#Fastflow and Boost paths
FF_ROOT     = /home/luca/fastflow
BOOST_ROOT  = /home/luca/boost_1_59_0

# compiler
CC = icpc -mmic

# compiler flag
CXX = $(CC) -std=c++11 -DNO_DEFAULT_MAPPING

# compile-time flags
CFLAGS =

# header files other than /usr/include
INCLUDES = -I$(FF_ROOT)  -I$(BOOST_ROOT)

# define any libraries to link into executable:
LIBS = -pthread

#optimization flags
OPTFLAGS = -O3 -finline-functions -DNDEBUG -g -O0

# define the C source files
SRCS = Main.cpp

# define the C object files 
OBJS = $(SRCS:.cpp=.o)

# define the executable file 
MAIN = mapreduce


.PHONY: all depend clean

all:    $(MAIN)
    @echo  Simple compiler named mycc has been compiled

$(MAIN): $(OBJS) 
    $(CXX) $(CFLAGS) $(INCLUDES) $(OPTFLAGS) -o $(MAIN) $(OBJS) $(LIBS)

.cpp.o:
    $(CXX) $(CFLAGS) $(INCLUDES) -c $<  -o $@

clean:
    $(RM) *.o *~ $(MAIN)

depend: $(SRCS)
    makedepend $(INCLUDES) $^

# DO NOT DELETE THIS LINE -- make depend needs it

Main.o: /home/luca/fastflow/ff/pipeline.hpp
Main.o: /home/luca/fastflow/ff/svector.hpp /usr/include/stdlib.h
Main.o: /usr/include/features.h /usr/include/stdc-predef.h
Main.o: /usr/include/alloca.h /home/luca/fastflow/ff/fftree.hpp
Main.o: /home/luca/fastflow/ff/node.hpp
Main.o: /home/luca/fastflow/ff/platforms/platform.h
Main.o: /home/luca/fastflow/ff/platforms/liblfds.h /usr/include/assert.h
Main.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h
Main.o: /usr/include/wchar.h /home/luca/fastflow/ff/cycle.h
Main.o: /usr/include/time.h /home/luca/fastflow/ff/utils.hpp
Main.o: /usr/include/string.h /home/luca/fastflow/ff/spin-lock.hpp
Main.o: /home/luca/fastflow/ff/sysdep.h /home/luca/fastflow/ff/config.hpp
Main.o: /home/luca/fastflow/ff/buffer.hpp /home/luca/fastflow/ff/ubuffer.hpp
Main.o: /home/luca/fastflow/ff/dynqueue.hpp /home/luca/fastflow/ff/mapper.hpp
Main.o: /home/luca/fastflow/ff/mapping_utils.hpp /usr/include/errno.h
Main.o: /home/luca/fastflow/ff/barrier.hpp
Main.o: /home/luca/fastflow/ff/ocl/clEnvironment.hpp
Main.o: /home/luca/fastflow/ff/farm.hpp /home/luca/fastflow/ff/lb.hpp
Main.o: /home/luca/fastflow/ff/gt.hpp /home/luca/fastflow/ff/multinode.hpp
Main.o: MapReduceJob.hpp TaskScheduler.hpp InterValueTask.hpp
Main.o: InterValueResult.hpp Result.hpp Task.hpp RecordReader.hpp
Main.o: MapReduceWorker.hpp MapResult.hpp LineRecordReader.hpp
Main.o: TextInputFormat.hpp /home/luca/fastflow/ff/parallel_for.hpp
Main.o: /home/luca/fastflow/ff/parallel_for_internals.hpp /usr/include/math.h
Main.o: InputFormat.hpp MapTask.hpp

这是通过执行新的二进制文件打印的(奇数)错误消息:

ERROR: FARM, try to add zero workers!

成瘾 Eclipse CDT调试器可以正常使用旧的makefile,而使用新的makefile时会打印出这条错误消息:

mapreduce: /home/luca/fastflow/ff/farm.hpp:1753: ff::ff_Farm<IN_t, OUT_t>::ff_Farm(std::vector<std::unique_ptr<ff::ff_node> >&&, ff::ff_node&, bool) [with IN_t = char; OUT_t = char]: Assertion `nw>0' failed.
Aborted (core dumped)

我是否对新的makefile做错了什么?

0 个答案:

没有答案