I've have this error while compiling improved trajectories
.build_release/DenseTrackStab.l:2: *** multiple target patterns. Stop.
.build_release/DenseTrackStab.l file:
-include .build_release/DenseTrackStab.d
.build_release/DenseTrackStab.l: \
.build_release/DenseTrackStab.d \
release/DenseTrackStab: .build_release/DenseTrackStab.l \
.build_release/DenseTrackStab.o \
Related
Using this tutorial I tried to install GCC with OpenACC support but unfortunately when I tried execute 'make' after this command:
$GCC5ROOT/source/gcc/configure \
--prefix= \
--target=nvptx-none \
--enable-as-accelerator-for="$target" \
--enable-languages=c,c++,fortran,lto \
--enable-checking=yes,df,fold,rtl \
--disable-multilib \
--with-sysroot=/nvptx-none \
--with-build-sysroot=$GCC5ROOT/install/nvptx-none \
--with-build-time-tools=$GCC5ROOT/install/nvptx-none/bin \
--disable-sjlj-exceptions \
--enable-newlib-io-long-long \
CC='gcc -m64'\
CXX='g++ -m64'
the following error occurs:
checking for suffix of object files... configure: error: in
`/home/nikos/Desktop/openacc/build/gcc5-accel/nvptx-none/libgcc':
configure: error: cannot compute suffix of object files: cannot
compile
I have OSX 10.11.4, Xcode 7.3.1.
Using make -- calls gcc -- calls clang, I get this error where clang is looking for a file whose name is a space!
Make error 1: clang: error: no such file or directory: ' '.
That is a space!
I have no idea how to fix this. The makefile formatting is correct.
Here is the end of the output from make:
gcc -g -v -Wall -I/usr/local/include -I/opt/local/include -I/Users/m/BioPrep \
-o mod \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: error: no such file or directory: ' '
make: *** [mod] Error 1
======================= Here is the contents of the Makefile:
# This is Makefile with all graphics code removed so that a compilation of mod can proceed
# "MakefileA" has the graphics files present but commented (#) out
CC = gcc
CFLAGS = -g -v -Wall
INCL = -I/usr/local/include -I/opt/local/include -I/Users/prowat/BioPrep
LIBS = -L/usr/local/lib -L/opt/local/lib -lX11 -lforms
mod: model.o \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
../lsoda/liblsoda.a`
cd ../mshell; make objs`
cd ../choosedisp; make objs`
cd ../connectdisps; make objs`
$(CC) $(CFLAGS) $(INCL) \
-o mod \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
model.o \
-L../lsoda -llsoda \
$(LIBS) \
-lm
=====================
Please use proper formatting: for code blocks, indent by 4 spaces. The backticks are only used for fixed-width fonts inside normal text.
You may have looked for spaces, but you need to look again. Based on the output make has shown you versus your makefile, it's pretty clear that there is at least one space after the backslash at the end of this line:
../connectdisps/opwsock.o \
You can tell this because if there were no spaces after this backslash then it would be continuing to the next line and make whould show the rest of the compile line:
model.o \
-L../lsoda -llsoda \
$(LIBS) \
-lm
Since those lines are missing from the output make provided, you can be sure that there's something about the opwsock.o line which is preventing make from recognizing the backslash/newline at the end.
I am trying to link Lapack library with my Makefile and Fortran 90 code (gfortran), but every time I type : make pkr_test (pkr_test is the name of the code)
I get the following error :
make[1]: * No rule to make target '/usr/ben/models/common/src/fitting.o'. Stop.
make[1]: Leaving directory '/usr/ben/models/common/src'
Makefile:20: recipe for target '/usr/ben/models/common/src/fitting.o' failed
make: * [/usr/ben/models/common/src/fitting.o] Error 2
I can attach the Makefile and the Makefile. In case it will help you to give me a quick solution. I actually tried to attach it but I didn't manage.
Here is the Makefile:
#
# Makefile for pqr_test
#
include ../../Makefile.in
#
MODS= $(DIR_test)wrt_two.o \
$(DIR_test)ppt_one.o \
$(DIR_test)cat_one.o \
$(DIR_test)uti_test.o \
$(DIR_test)ncdf_test.o \
$(DIR_test)quick_test.o \
$(DIR_test)ovr_one.o \
$(DIR_test)row_to.o \
$(DIR_test)fitting.o
#
OBJS=pqr_test.o
#
$(MODS) :
cd $(DIR_test) && make $(MODS)
#
pqr_test : $(MODS) $(OBJS)
cd $(DIR_test) && make $(MODS)
$(FC) $(FFLAGS) -L$(XML_LIB) -L$(NC_LIB_LOC) -L$(NC_LIB_LAPACK_LOC) -I$(NC_INCLUDE) -I$(NC_LAPACK_INCLUDE) \
-Wl,-rpath,$(NC_LIB_LOC) $(NC_LIB_LAPACK_LOC) $(MODS) $(OBJS) $(NC_LIB) $(NC_LIB_LAPACK) \
-lflib -o ../bin/pqr_test
#
pqr_test.o : pqr_test.f90
cd $(DIR_test) && make $(MODS)
$(FC) $(FFLAGS) -I$(DIR_test) -I$(XML_INCLUDE) -I$(NC_INCLUDE) -I$(NC_LAPACK_INCLUDE) -c pqr_test.f90
#
cleanup:
mv $(DIR_test)*.o $(DIR_test)../obj/
mv $(DIR_test)*.mod $(DIR_test)../mod/
mv *.o ../obj/
#
clean:
rm -f $(DIR_test)*.o
rm -f $(DIR_test)../obj/*.o
rm -f $(DIR_test)*.mod
rm -f $(DIR_test)../obj/*.o
rm -f *.o
rm -f ../obj/*.o
#
I am trying to link Lapack library with my Makefile and Fortran 90 code (gfortran), but every time I type : make pkr_test (pkr_test is the name of the code) I get the following error :
make[1]: * No rule to make target '/usr/ben/models/common/src/fitting.o'. Stop.
make[1]: Leaving directory '/usr/ben/models/common/src'
Makefile:20: recipe for target '/usr/ben/models/common/src/fitting.o' failed
make: * [/usr/ben/models/common/src/fitting.o] Error 2
The Makefile tries to build the (object) modules specified in MODS variable, including the last one, $(DIR_test)fitting.o.
It does this by doing the equivalent of calling itself, make $(DIR_test)fitting.o. The problem is that your Makefile, and the included Makefile (../../Makefile.in) don't include instructions on how to generate that file, and the implicit make rules don't success either.
As the dependency ($(DIR_test)fitting.o) cannot be built, make cannot build your specified target (pkr_test).
I have embarked on creating a package of Ruby 2.2 with Event Machine for OpenWRT Barrier Breaker. The makefile for the eventmachine package can be seen here: https://github.com/DaKaZ/ruby-openwrt/blob/master/packages/ruby-eventmachine/Makefile
I was able to successfully use the Ruby 2.2 implementation from the trunk of feeds/packages and am running OpenWRT Barrier Breaker with Ruby 2.2 on my router, but... eventmachine is throwing the following error when it builds:
In file included from /Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby.h:33:0,
from rubymain.cpp:26:
/Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/ruby.h:107:73: error: size of array 'ruby_check_sizeof_long' is negative
typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1];
^
/Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/ruby.h:111:76: error: size of array 'ruby_check_sizeof_voidp' is negative
typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
^
In file included from /Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/intern.h:35:0,
from /Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/ruby.h:1710,
from /Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby.h:33,
from rubymain.cpp:26:
/Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/st.h:52:93: error: size of array 'st_check_for_sizeof_st_index_t' is negative
typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP == (int)sizeof(st_index_t) ? 1 : -1];
^
make[4]: *** [rubymain.o] Error 1
make[3]: *** [/Volumes/OpenWrt/barrier_breaker/build_dir/target-mipsel_74kc+dsp2_uClibc-0.9.33.2/linux-brcm47xx_mips74k/ruby-eventmachine-1.0.7/.built] Error 2
make[3]: Leaving directory `/Volumes/OpenWrt/barrier_breaker/feeds/rubyopenwrt/packages/ruby-eventmachine'
make[2]: *** [package/feeds/rubyopenwrt/ruby-eventmachine/compile] Error 2
make[2]: Leaving directory `/Volumes/OpenWrt/barrier_breaker'
make[1]: *** [/Volumes/OpenWrt/barrier_breaker/staging_dir/target-mipsel_74kc+dsp2_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/Volumes/OpenWrt/barrier_breaker'
make: *** [world] Error 2
This appears to be an error in the HOST version of ruby but I can't figure out how to correctly use the cross compiled version to build eventmachine. Please help!
For anyone interested - I was able to build and run event machine and it works great, but ONLY with a custom Makefile - I could never get the auto generated files to run correctly. Here is that Makefile. I use a simple script to setup the build properly:
echo "[update feeds]"
./scripts/feeds update -a
echo "[install packages from rubyopenwrt feed]"
./scripts/feeds install -a -p rubyopenwrt
echo "[install customized ruby-eventmachine makefile]"
cp em-build-works/Makefile feeds/rubyopenwrt/packages/ruby-eventmachine
Here is the working Makefile:
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
RUBY_PKG_LIBVER:=2.2
PKG_NAME:=ruby-eventmachine
PKG_SHORT_NAME:=eventmachine
PKG_RELEASE:=1
PKG_LIBVER:=1.0.7
PKG_REV:=6dbdb97bada05d33a1f0d469a49d8c46ac2e77d0
PKG_VERSION:=$(PKG_LIBVER)
PKG_SOURCE:=$(PKG_NAME).tar.gz
PKG_SOURCE_URL:=git://github.com/eventmachine/eventmachine.git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_BUILD_DEPENDS:=
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/ruby-eventmachine
SUBMENU:=Ruby
SECTION:=lang
CATEGORY:=Languages
DEPENDS:=+ruby-socket +libstdcpp +libc +libgcc +libssl +libcrypto
TITLE:=Ruby eventmachine gem
endef
RUBY:= \
$(STAGING_DIR_HOST)/bin/ruby -I $(STAGING_DIR_HOST)/share/ri \
define Package/ruby-eventmachine/description
This package contains the ruby eventmachine gem.
endef
define Build/Configure/eventmachine
(cd $(PKG_BUILD_DIR)/ext; \
$(RUBY) extconf.rb; \
);
endef
define Build/Compile/eventmachine
$(MAKE_VARS) \
$(MAKE) -C $(PKG_BUILD_DIR)/ext \
$(MAKE_FLAGS) \
$(1);
$(CP) $(PKG_BUILD_DIR)/ext/*.so $(PKG_BUILD_DIR)/lib/
endef
define Build/Configure/fastfilereader
(cd $(PKG_BUILD_DIR)/ext/fastfilereader; \
$(RUBY) extconf.rb; \
);
endef
define Build/Compile/fastfilereader
$(MAKE_VARS) \
$(MAKE) -C $(PKG_BUILD_DIR)/ext/fastfilereader \
$(MAKE_FLAGS) \
$(1);
$(CP) $(PKG_BUILD_DIR)/ext/fastfilereader/*.so $(PKG_BUILD_DIR)/lib/
endef
define Build/Configure
$(call Build/Configure/eventmachine)
$(call Build/Configure/fastfilereader)
endef
# hack Makefiles here
define Build/Compile
$(SED) 's/-fstack-protector//' $(PKG_BUILD_DIR)/ext/fastfilereader/Makefile
$(SED) '17s/host.*/target-mips-rlx5281-linux\/usr\/include\/ruby-2.2\/mips-linux-gnu/' $(PKG_BUILD_DIR)/ext/fastfilereader/Makefile
$(call Build/Compile/fastfilereader)
$(SED) 's/-fstack-protector//' $(PKG_BUILD_DIR)/ext/Makefile
$(SED) '17s/host.*/target-mips-rlx5281-linux\/usr\/include\/ruby-2.2\/mips-linux-gnu/' $(PKG_BUILD_DIR)/ext/Makefile
$(call Build/Compile/eventmachine)
endef
define Package/ruby-eventmachine/install
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(RUBY_PKG_LIBVER)/mips-linux-gnu
$(CP) $(PKG_BUILD_DIR)/lib/eventmachine.rb $(1)/usr/lib/ruby/$(RUBY_PKG_LIBVER)/
$(CP) $(PKG_BUILD_DIR)/lib/em $(1)/usr/lib/ruby/$(RUBY_PKG_LIBVER)/
$(CP) $(PKG_BUILD_DIR)/lib/*.so $(1)/usr/lib/ruby/$(RUBY_PKG_LIBVER)/mips-linux-gnu
endef
$(eval $(call BuildPackage,ruby-eventmachine,+libopenssl))
The makefile is included below. It's just a long list of object files and two targets. The problem seems to be that the $(INC) is being ignored for the first target. For example, the output starts with "g++ -c -o main.o main.cpp" instead of "g++ -I/usr/home/jrm/tmp/proteus_beta -c -o main.o main.cpp".
TIA
PROG = proteus
# list of object files
OBJS = main.o \
dataset.o \
genetic_codes.o \
likelihood_engine.o \
options.o \
parsimony.o \
parsimony_engine.o \
seq.o \
site_collection.o \
site_pattern.o \
tools.o \
optare/crs.o \
optare/point.o \
optare/newton_1d.o \
optare/golden_section.o \
models/model.o \
models/DNA/DNA_model.o \
models/DNA/DNA_ssm.o \
models/CODON/CODON_model.o \
models/CODON/CODON_modelA.o \
models/CODON/CODON_modelB.o \
models/CODON/CODON_modelC.o \
models/CODON/CODON_modelD.o \
models/CODON/CODON_M0.o \
models/CODON/CODON_M1.o \
models/CODON/CODON_M2.o \
models/CODON/CODON_M3.o \
models/CODON/CODON_M0gtr.o \
models/CODON/CODON_FEBC1.o \
models/CODON/CODON_FEBC1b.o \
models/CODON/FESC/CODON_FESC1.o \
models/CODON/CODON_nh/CODON_M0nh1.0 \
models/CODON/CODON_nh/CODON_M1nh1.0 \
models/CODON/CODON_nh/CODON_M1nh1.0 \
models/CODON/CODON_nh/CODON_M3nh1.0 \
models/CODON/CODON_nh/CODON_M0nh2.0 \
models/CODON/CODON_nh/CODON_MmodelAnh2.0 \
matrices/matrix.o \
matrices/DNA_matrix.o \
matrices/CODON_matrix.o \
matrices/AA_matrix.o \
matrices/int_matrix.o \
matrices/str_matrix.o \
matrices/eigen.o \
incidere/slice_sampler.o \
dendrology/forestry.o \
dendrology/node.o \
dendrology/DNA_node.o \
dendrology/tree.o \
alphabetia/alphabet.o \
alphabetia/DNA_alphabet.o \
alphabetia/CODON_alphabet.o \
alphabetia/AA_alphabet.o
CC = g++
INC=-I/home/jrm/tmp/proteus_beta
.C.o:
$(CC) $< -c $(INC)
$(PROG): $(OBJS)
$(CC) -o $# $(OBJS) -lm
According to your post, you have a file named main.cpp, not a file named main.C. But you provide an implicit rule for converting .C files to .o. Make will compile main.cpp using its built-in rule for .cpp to .o compilation. You have two options to do what you want:
(1) Change your implicit rule to .cpp.o (and consider using new-style rules, i.e. %.cpp: %.o)
(2) Declare a CXXFLAGS variable (which is automatically included in Make's C++ compilation implicit rule) such as the following:
CXXFLAGS = $(INC)
and then remove your .C.o implicit rule.
The second option will simplify your makefile, and it will work with C++ files, regardless of the extension.
Do your source files end with .C or .cpp?
The compilation rule for .C.o lists $(INC) after the other parts of the rule, not where you expect the output to come:
CC = g++
INC = -I/home/jrm/tmp/proteus_beta
.C.o:
$(CC) $< -c $(INC)
You should see:
g++ file.C -c -I/home/jrm/tmp/proteus_beta
But it appears to be ignoring your rule altogether. You mention main.cpp; that will never be compiled by your rule.
So, is .C a recognized suffix? Are your source files .C files? Are you running on a case-insensitive file-system? Why are you setting the C compiler (CC) -- you've probably got case problems with your source.