I am trying to build a project in Linux and I have many errors of this style:
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nlmsg_hdr#libnl_3'.
I have looked at many of the similar threads available but none have worked for me. I have libnl-3-dev and libnl-genl-3-dev installed, but when executing the "make" command I have like 20 erros similar to the above with different references but the same "libnl-route-3.so".
I'm new to Makefiles, I have tried to modified it to see if the result changed, but there have not been improvements.
I leave below the Makefile, it is quite long, and execution shows the errors when it reaches the "server" part.
In order to build, I first "qmake" and then "make", any help is appreciated. It seems that libnl3 package is in /usr/include/libnl3/netlink, I think that the problem is that it is not linked correctly but I have not been able to do it.
MAKEFILE = Makefile
first: make_first
QMAKE = /usr/lib/qt5/bin/qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall
QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
TAR = tar -cf
COMPRESS = gzip -9f
DISTNAME = ost1.0.0
DISTDIR = /home/pi/Desktop/CAF/Ostinato/ostinato_master/.tmp/ost1.0.0
SUBTARGETS = \
client \
server \
sub-common-ostproto-pro \
sub-common-ostprotogui-pro \
sub-rpc-pbrpc-pro \
sub-extra
server-qmake_all: sub-common-ostproto-pro-qmake_all sub-rpc-pbrpc-pro-qmake_all FORCE
#test -d server/ || mkdir -p server/
cd server/ && $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro
cd server/ && $(MAKE) -f Makefile.drone qmake_all
server: sub-common-ostproto-pro \
sub-rpc-pbrpc-pro FORCE
#test -d server/ || mkdir -p server/
cd server/ && ( test -e Makefile.drone || $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro ) && $(MAKE) -f Makefile.drone
server-make_first: sub-common-ostproto-pro-make_first sub-rpc-pbrpc-pro-make_first FORCE
#test -d server/ || mkdir -p server/
cd server/ && ( test -e Makefile.drone || $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro ) && $(MAKE) -f Makefile.drone
server-all: sub-common-ostproto-pro-all sub-rpc-pbrpc-pro-all FORCE
#test -d server/ || mkdir -p server/
cd server/ && ( test -e Makefile.drone || $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro ) && $(MAKE) -f Makefile.drone all
server-clean: sub-common-ostproto-pro-clean sub-rpc-pbrpc-pro-clean FORCE
#test -d server/ || mkdir -p server/
cd server/ && ( test -e Makefile.drone || $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro ) && $(MAKE) -f Makefile.drone clean
server-distclean: sub-common-ostproto-pro-distclean sub-rpc-pbrpc-pro-distclean FORCE
#test -d server/ || mkdir -p server/
cd server/ && ( test -e Makefile.drone || $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro ) && $(MAKE) -f Makefile.drone distclean
server-install_subtargets: sub-common-ostproto-pro-install_subtargets sub-rpc-pbrpc-pro-install_subtargets FORCE
#test -d server/ || mkdir -p server/
cd server/ && ( test -e Makefile.drone || $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro ) && $(MAKE) -f Makefile.drone install
server-uninstall_subtargets: sub-common-ostproto-pro-uninstall_subtargets sub-rpc-pbrpc-pro-uninstall_subtargets FORCE
#test -d server/ || mkdir -p server/
cd server/ && ( test -e Makefile.drone || $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro ) && $(MAKE)
server-distdir: FORCE
#test -d server/ || mkdir -p server/
cd server/ && ( test -e Makefile.drone || $(QMAKE) -o Makefile.drone /home/pi/Desktop/CAF/Ostinato/ostinato_master/server/drone.pro ) && $(MAKE) -e -f Makefile.drone distdir DISTDIR=$(DISTDIR)/server
The command output:
make[1]: Entering directory '/home/pi/Desktop/CAF/Ostinato/ostinato_master/server'
g++ -Wl,-O1 -o drone devicemanager.o device.o emuldevice.o drone_main.o drone.o portmanager.o abstractport.o pcapport.o pcapsession.o pcaptransmitter.o pcaprxstats.o pcaptxstats.o pcaptxthread.o bsdhostdevice.o bsdport.o linuxhostdevice.o linuxport.o params.o winhostdevice.o winpcapport.o myservice.o pcapextra.o packetbuffer.o version.o moc_drone.o moc_pcaptransmitter.o moc_myservice.o -lpcap -L../common -lostproto -L../rpc -lpbrpc -lnl-3 -lnl-route-3 -lm -lprotobuf -lQt5Network -lQt5Script -lQt5Xml -lQt5Core -lpthread -latomic
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_ticks2us#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nla_parse_nested#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nla_get_u32#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_cache_pickup#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_cache_mngt_register#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_addr_get_prefixlen#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `__type2str#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_cache_alloc_and_fill#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_us2ticks#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_geterror#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nla_get_string#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_str2af#libnl_3'
/usr/bin/ld: //usr/local/lib/libnl-route-3.so: undefined reference to `nl_addr_build#libnl_3'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile.drone:220: drone] Error 1
make[1]: Leaving directory '/home/pi/Desktop/CAF/Ostinato/ostinato_master/server'
make: *** [Makefile:79: server-make_first] Error 2
Related
Good day.
I am attempting to compile a vulnerable vsftpd version for a University assignment. I'm having troubling compiling the source code onto the lxc container launched to host the vulnerable ftp server. The following message is spat at me when I attempt to execute the make command:
/usr/bin/ld: cannot find : No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:24: vsftpd] Error 1
Despite my many years writing code I am quite new to C++ in general, however I gather this might have something to do with line 24 of the Makefile, which is highlighted below:
# Makefile for systems with GNU tools
CC = gcc
INSTALL = install
IFLAGS = -idirafter dummyinc
#CFLAGS = -g
CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
LIBS = `./vsf_findlibs.sh`
LINK = -Wl,-s, -lcrypt
OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
tunables.o ftpdataio.o secbuf.o ls.o \
postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o \
banner.o filestr.o parseconf.o secutil.o \
ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o \
tcpwrap.o ipaddrparse.o access.o features.o readwrite.o opts.o \
ssl.o sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o
.c.o:
$(CC) -c $*.c $(CFLAGS) $(IFLAGS)
vsftpd: $(OBJS)
24th line >>>> $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS) $(LDFLAGS)
install:
if [ -x /usr/local/sbin ]; then \
$(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
else \
$(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
if [ -x /usr/local/man ]; then \
$(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
$(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
elif [ -x /usr/share/man ]; then \
$(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
$(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
else \
$(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
$(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
if [ -x /etc/xinetd.d ]; then \
$(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
clean:
rm -f *.o *.swp vsftpd
Despite my researching I do not understand how to resolve this.
Thanks in advance.
Installing the libmysqlclient should resolve this issue. On Ubuntu, run:
sudo apt-get install libmysqlclient-dev
I am trying to run code of a GitHub repository. Link --> https://github.com/ViDA-NYU/urban-pulse#windows-7-8-10
This first build executes a MakeFile through a mingw32-make command on cmd.exe. That execution is showing a "syntax error: unexpected end of file" error.
(https://drive.google.com/open?id=1CJErtpVviLCileL0xPNaHyBnkVoqJBWf).
https://drive.google.com/open?id=1CJErtpVviLCileL0xPNaHyBnkVoqJBWf
I tried to execute it with MinGW mingw32-make and MSYS make but none worked. I have installed MinGW from the official website.
Here is the MakeFile up to line 43. The name of the file is "MakeFile"
#############################################################################
# Makefile for building: ComputePulse
# Generated by qmake (3.0) (Qt 5.6.2)
# Project: ComputePulse.pro
# Template: subdirs
# Command: C:\Users\Kanishk\Anaconda3\Library\bin\qmake.exe -o Makefile ComputePulse.pro
#############################################################################
MAKEFILE = Makefile
first: make_first
QMAKE = C:\Users\Kanishk\Anaconda3\Library\bin\qmake.exe
DEL_FILE = del
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
COPY = copy /y
COPY_FILE = copy /y
COPY_DIR = xcopy /s /q /y /i
INSTALL_FILE = copy /y
INSTALL_PROGRAM = copy /y
INSTALL_DIR = xcopy /s /q /y /i
DEL_FILE = del
SYMLINK = $(QMAKE) -install ln -f -s
DEL_DIR = rmdir
MOVE = move
SUBTARGETS = \
sub-Scalars-Scalars-pro \
sub-PulseJNI-Pulse-pro
sub-Scalars-Scalars-pro-qmake_all: FORCE
#if not exist Scalars\ mkdir Scalars\ & if not exist Scalars\ exit 1
cd Scalars\ && $(QMAKE) E:\BTP\urban-pulse-master\ComputePulse\Scalars\Scalars.pro -o Makefile
#set MAKEFLAGS=$(MAKEFLAGS)
cd Scalars\ && $(MAKE) -f Makefile qmake_all
sub-Scalars-Scalars-pro: FORCE
#if not exist Scalars\ mkdir Scalars\ & if not exist Scalars\ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd Scalars\ && ( if not exist Makefile $(QMAKE) E:\BTP\urban-pulse-master\ComputePulse\Scalars\Scalars.pro -o Makefile ) && $(MAKE) -f Makefile
sub-Scalars-Scalars-pro-make_first: FORCE
#if not exist Scalars\ mkdir Scalars\ & if not exist Scalars\ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd Scalars\ && ( if not exist Makefile $(QMAKE) E:\BTP\urban-pulse-master\ComputePulse\Scalars\Scalars.pro -o Makefile ) && $(MAKE) -f Makefile
The execution is expected to create two executables named Scalars and Pulse. Information is also available on the link above.
I am using UBUNTU 12.04 and trying to install multicube explorer for Design Space Exploration.
I am new with these makefile and linux internals.
I follow these steps for installation
./configure
make
and then I get error message. Following is the log (command line reformatted for readability).
root#root:/home/snu/Desktop/m3explorer# make
g++ -L. -L/usr/lib/x86_64-linux-gnu -lxml2 -ldl \
-Wl,--no-as-needed,-export-dynamic -pthread \
m3_commands.o m3_env.o m3_point.o m3_sim_utils.o \
m3_database.o m3_grammar.o m3_map.o m3_opt_utils.o \
m3_pointer_trash.o m3_tokens.o m3_object.o m3_shell.o \
m3_vector.o m3_driver_utils.o m3_parser.o m3_shell_variables.o \
m3_list.o m3_object_utils.o m3_arg.o m3_common_utils.o \
m3_exception.o m3_design_space.o m3_doe_utils.o m3_gen_html.o \
m3_xdr_api.o m3_rsm.o -o m3explorer
m3_commands.o: In function `prs_command_db_export_xml(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
m3_commands.cc:(.text+0x379c): undefined reference to `xmlKeepBlanksDefault'
m3_commands.cc:(.text+0x37a6): undefined reference to `xmlThrDefIndentTreeOutput'
m3_commands.cc:(.text+0x37b0): undefined reference to `xmlThrDefTreeIndentString'
m3_commands.cc:(.text+0x37ba): undefined reference to `xmlNewDoc'
m3_commands.cc:(.text+0x37d0): undefined reference to `xmlNewNode'
m3_commands.cc:(.text+0x37f0): undefined reference to `xmlNewProp'
m3_commands.cc:(.text+0x3809): undefined reference to `xmlNewProp'
m3_commands.cc:(.text+0x3822): undefined reference to `xmlDocSetRootElement'
m3_commands.cc:(.text+0x3a6c): undefined reference to `xmlNewChild'
m3_commands.cc:(.text+0x3a8b): undefined reference to `xmlNewChild'
m3_commands.cc:(.text+0x3aaa): undefined reference to `xmlNewChild'
m3_commands.cc:(.text+0x3aea): undefined reference to `xmlNewChild'
m3_commands.cc:(.text+0x3b19): undefined reference to `xmlNewProp'
m3_commands.cc:(.text+0x3cb2): undefined reference to `xmlNewChild'
m3_commands.cc:(.text+0x3d75): undefined reference to `xmlNewProp'
m3_commands.cc:(.text+0x3d98): undefined reference to `xmlNewProp'
m3_commands.cc:(.text+0x3e94): undefined reference to `xmlNewProp'
m3_commands.cc:(.text+0x3f30): undefined reference to `xmlNewChild'
m3_commands.cc:(.text+0x3f5f): undefined reference to `xmlNewProp'
m3_commands.cc:(.text+0x3fad): undefined reference to `xmlNewProp'
m3_commands.cc:(.text+0x407e): undefined reference to `xmlSaveFileEnc'
m3_opt_utils.o: In function `opt_select_optimizer(m3_env*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
m3_opt_utils.cc:(.text+0x51): undefined reference to `dlopen'
m3_opt_utils.cc:(.text+0x71): undefined reference to `dlsym'
m3_driver_utils.o: In function `drv_select_driver(m3_env*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
m3_driver_utils.cc:(.text+0x51): undefined reference to `dlopen'
m3_driver_utils.cc:(.text+0x71): undefined reference to `dlsym'
m3_driver_utils.cc:(.text+0x109): undefined reference to `dlerror'
m3_common_utils.o: In function `m3_look_for_filename_in_search_path(m3_env*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
m3_common_utils.cc:(.text+0x403): undefined reference to `dlopen'
m3_common_utils.cc:(.text+0x430): undefined reference to `dlclose'
m3_doe_utils.o: In function `doe_select_doe(m3_env*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
m3_doe_utils.cc:(.text+0x51): undefined reference to `dlopen'
m3_doe_utils.cc:(.text+0x71): undefined reference to `dlsym'
collect2: ld returned 1 exit status
make: *** [m3explorer] Error 1
Following is the makefile contents
# Makefile for Multicube Explorer
#
# (C) Politecnico di Milano and V. Zaccaria
DSTDIR = /home/snu/Desktop/m3explorer
SRCDIR = /home/snu/Desktop/m3explorer/src
INCDIR = /home/snu/Desktop/m3explorer/src
GPLDIR = /home/snu/Desktop/m3explorer/gpl
OTHERCFLAGS =
OTHERCXXFLAGS = -D__M3EXPLORER_VERSION__=\"release_1_1\" -I/usr/include/libxml2
OTHERLINKFLAGS = -L. -L/usr/lib/x86_64-linux-gnu -lxml2
GPLCXXFLAGS =
GPLLINKFLAGS =
IMAGE = /home/snu/Desktop/m3explorer/image
BUILDSHEPARD = no
BUILDSPLINE= no
BUILDNEURAL= nn
BUILDRBF= no
BUILDREGRESSION= no
CXX=g++
AR=ar cr
RANLIB=ranlib
SHLIB_LD=g++ -fPIC
CFLAGS= $(OTHERCFLAGS) -I$(INCDIR)
#CFLAGS= -Wall -g -I/usr/include/libxml2 commented by Tarun. If you want to uncomment. then comment next line
CXXFLAGS= $(OTHERCXXFLAGS) -I$(INCDIR)
#CXXFLAGS=-lxml2 commented by Tarun. If you want to uncomment. then comment next line
GPLCXXFLAGS += $(OTHERCXXFLAGS)
OS_NAME = $(shell uname -s)
ifeq ("$(OS_NAME)", "SunOS")
CXXFLAGS += -D__SOLARIS__
CXXSOFLAGS = -shared -fPIC
endif
ifeq ("$(OS_NAME)", "Darwin")
CXXFLAGS += -g -D__MAC_OSX__
CXXSOFLAGS = -fno-common -bundle -flat_namespace -undefined suppress
endif
ifeq ("$(OS_NAME)", "Linux")
CXXFLAGS += -pthread
CXXSOFLAGS = -g -shared -fPIC
OTHERLINKFLAGS += -ldl -Wl,--no-as-needed,-export-dynamic -pthread #--no-as-needed, is added by tarun
endif
#####################################
# CREATE SYMBOLIC TARGETS #
#####################################
M3EXPLORER_TARGETS = m3_commands.o m3_env.o m3_point.o m3_sim_utils.o m3_database.o m3_grammar.o m3_map.o m3_opt_utils.o m3_pointer_trash.o m3_tokens.o m3_object.o m3_shell.o m3_vector.o m3_driver_utils.o m3_parser.o m3_shell_variables.o m3_list.o m3_object_utils.o m3_arg.o m3_common_utils.o m3_exception.o m3_design_space.o m3_doe_utils.o m3_gen_html.o m3_xdr_api.o m3_rsm.o
M3EXPLORER_INCLUDES = m3_commands.h m3_driver_utils.h m3_list.h m3_object_utils.h m3_parser.h m3_shell_variables.h m3_database.h m3_env.h m3_map.h m3_opt_utils.h m3_point.h m3_sim_utils.h m3_driver.h m3_object.h m3_optimizer.h m3_pointer_trash.h m3_vector.h m3_arg.h m3_common_utils.h m3_exception.h m3_design_space.h m3_doe.h m3_doe_utils.h drivers/libm3_xml_driver.h m3_gen_html.h m3_xdr_api.h m3_rsm.h
M3EXPLORER_INCDIR_INCLUDES = $(patsubst %.h, $(INCDIR)/%.h, $(M3EXPLORER_INCLUDES))
OPTIMIZERS_SRC = libm3_pareto_doe.cc libm3_aprs.cc libm3_mosa.cc libm3_mopso.cc libm3_nsga_II.cc libm3_linear_scan.cc libm3_femo.cc libm3_semo.cc libm3_gemo.cc
OPTIMIZERS_TARGET = $(patsubst %.cc, %.so, $(OPTIMIZERS_SRC))
DOE_SRC = libm3_full_doe.cc libm3_random_doe.cc libm3_two_level_ff.cc libm3_two_level_ff_extended.cc libm3_scrambled_doe.cc
DOE_TARGET = $(patsubst %.cc, %.so, $(DOE_SRC))
DRIVERS_SRC = libm3_test_driver.cc libm3_xml_driver.cc libm3_dtlz_driver.cc
# libm3_counter_driver.cc
DRIVERS_TARGET = $(patsubst %.cc, %.so, $(DRIVERS_SRC))
# Tells make to search for sources into SRCDIR, SRCDIR/optimizers and SRCDIR/drivers
VPATH=$(SRCDIR):$(SRCDIR)/optimizers:$(SRCDIR)/drivers:$(SRCDIR)/doe:$(SRCDIR)/../gpl:$(SRCDIR)/../gpl/splines:$(SRCDIR)/../gpl/rbf
TARGET = m3explorer
#####################################
# CREATE RSM TARGETS #
#####################################
RSM_TARGETS=
ifeq ("$(BUILDSHEPARD)", "yes")
RSM_TARGETS += sh_i
CXXFLAGS += -D__M3_COMPILE_SHEPARD_RSM__
endif
ifeq ("$(BUILDSPLINE)", "yes")
RSM_TARGETS += spline
CXXFLAGS += -D__M3_COMPILE_SPLINE_RSM__
endif
ifeq ("$(BUILDNEURAL)", "yes")
RSM_TARGETS += nn
CXXFLAGS += -D__M3_COMPILE_NEURAL_RSM__
endif
ifeq ("$(BUILDRBF)", "yes")
RSM_TARGETS += rbf_interpolator
CXXFLAGS += -D__M3_COMPILE_RBF_RSM__
endif
ifeq ("$(BUILDREGRESSION)", "yes")
RSM_TARGETS += regressor
CXXFLAGS += -D__M3_COMPILE_REGRESSION_RSM__
endif
#####################################
# CREATE BUILD TARGETS #
#####################################
all: $(TARGET) $(OPTIMIZERS_TARGET) $(DRIVERS_TARGET) $(DOE_TARGET) $(RSM_TARGETS)
#############################
# ENGINE BUILD #
#############################
m3explorer: $(M3EXPLORER_TARGETS)
$(CXX) $(OTHERLINKFLAGS) $^ -o $#
%.o: %.cc $(M3EXPLORER_INCDIR_INCLUDES)
$(CXX) -c $< -o $# $(CXXFLAGS)
%.so: %.cc $(M3EXPLORER_INCDIR_INCLUDES)
$(CXX) $< -o $# $(CXXSOFLAGS) $(CXXFLAGS)
m3_grammar.o: $(SRCDIR)/m3_grammar.yy
cp $(SRCDIR)/m3_grammar.yy .
bison -d $(SRCDIR)/m3_grammar.yy -o bof.cc
cp bof*h* m3_grammar.h
cp bof*cc m3_grammar.cc
$(CXX) -c m3_grammar.cc -o $# $(CXXFLAGS)
m3_tokens.o: $(SRCDIR)/m3_tokens.ll
flex $(SRCDIR)/m3_tokens.ll
mv lex.yy.c m3_tokens.cc
$(CXX) -c m3_tokens.cc -o $# -I. $(CXXFLAGS)
#############################
# RSM BUILD #
#############################
XDR_DEPS= gpl_xdr_api.o gpl_xdr_api.h
gpl_xdr_api.o: gpl_xdr_api.cc gpl_xdr_api.h
$(CXX) -c $< -o $# $(GPLCXXFLAGS) -I$(GPLDIR)
sh_i: sh_i.cc $(XDR_DEPS)
$(CXX) -o gpl_xdr_api.o $# $< $(GPLCXXFLAGS) $(GPLLINKFLAGS) -I$(GPLDIR)
nn: cascade.c $(XDR_DEPS)
$(CXX) -o gpl_xdr_api.o -lpthread $# $< $(GPLCXXFLAGS) $(GPLLINKFLAGS) -I$(GPLDIR)
SPLINE_OBJ=converter.o parameters.o spline.o r_wrapper.o spline_script.o
SPLINE_INC=r_wrapper.hpp spline_script.hpp converter.hpp parameters.h
$(SPLINE_OBJ): %.o: %.cc $(SPLINE_INC)
$(CXX) -c $< -o $# $(GPLCXXFLAGS) -I$(GPLDIR)
spline: $(SPLINE_OBJ) $(XDR_DEPS)
$(CXX) -o $# $^ $(GPLCXXFLAGS) $(GPLLINKFLAGS) -I$(GPLDIR)
RBF_OBJ=bvp.o diff_op.o interpolator.o linalg.o utils.o ddm.o error.o func.o rbf.o interpolatorRBF.o
RBF_INC= bvp.hpp ddm.hpp diff_op.hpp error.hpp func.hpp interpolator.hpp linalg.hpp rbf.hpp utils.hpp
$(RBF_OBJ): %.o: %.cpp $(RBF_INC)
$(CXX) -c $< -o $# $(GPLCXXFLAGS) -I$(GPLDIR)
rbf_interpolator: $(RBF_OBJ) $(XDR_DEPS)
$(CXX) -o $# $^ $(GPLCXXFLAGS) $(GPLLINKFLAGS) -I$(GPLDIR)
regressor: regressor.cc $(XDR_DEPS)
$(CXX) -o gpl_xdr_api.o $# $< $(GPLCXXFLAGS) $(GPLLINKFLAGS) -I$(GPLDIR)
#############################
# CLEAN BUILD #
#############################
clean:
rm -f *.o $(TARGET) *.cc *.hh *.so *.h *.yy
rm -rf m3explorer* test*_output tmp
dist-clean:
rm -f *.o $(TARGET) *.cc *.hh *.so *.scr *.xml *.scr do_tests *.h *.yy doxygen.cfg makefile config.status
rm -rf m3explorer* test*_output tmp $(RSM_TARGETS)
ifeq ("$(OS_NAME)", "Darwin")
dist:
tar --directory $(SRCDIR)/../.. -c -v -z -f m3explorer_release_1_1_src.tar.gz m3explorer --exclude "*.svn*" --exclude "build"
endif
ifeq ("$(OS_NAME)", "Linux")
dist:
tar --exclude="*.svn*" --directory $(SRCDIR)/../.. -c -v -z -f m3explorer_release_1_1_src.tar.gz m3explorer
endif
doc:
doxygen $(DSTDIR)/doxygen.cfg
ifeq ("$(OS_NAME)", "Linux")
bin-dist: install doc
tar --exclude="*.svn*" --directory $(IMAGE)/.. -c -v -z -f m3explorer_release_1_1_linux_$(shell uname -r)_bin.tar.gz $(shell cd $(IMAGE) && pwd | xargs basename)
endif
ifeq ("$(OS_NAME)", "Linux")
doc-dist: install doc
tar --exclude="*.svn*" --directory $(IMAGE) -c -v -z -f m3explorer_release_1_1_docs.tar.gz $(shell cd $(IMAGE)/doc && pwd | xargs basename)
endif
#############################
# INSTALL BUILD #
#############################
# Note add: install -m 744 $(SRCDIR)/../tests/*.ref $(IMAGE)/tests
# install -m 744 $(SRCDIR)/../tests/stub_test.py $(IMAGE)/tests
install: all
#mkdir -p $(IMAGE)
#mkdir -p $(IMAGE)/bin
#mkdir -p $(IMAGE)/lib
#mkdir -p $(IMAGE)/schemas
#mkdir -p $(IMAGE)/scripts
#mkdir -p $(IMAGE)/examples
#mkdir -p $(IMAGE)/examples/simple_sim
#mkdir -p $(IMAGE)/examples/beverage_can
#mkdir -p $(IMAGE)/examples/mpeg
#mkdir -p $(IMAGE)/rsm
#mkdir -p $(IMAGE)/tests
#mkdir -p $(IMAGE)/html
#mkdir -p $(IMAGE)/latex
#mkdir -p $(IMAGE)/html/template_results_page_files
install -m 744 $(DSTDIR)/*.so $(IMAGE)/lib
install -m 744 $(DSTDIR)/multicube_design_space_test*.xml $(IMAGE)/tests
install -m 744 $(DSTDIR)/debug_*scr $(IMAGE)/tests
install -m 744 $(DSTDIR)/create_*scr $(IMAGE)/tests
install -m 744 $(DSTDIR)/do_tests $(IMAGE)/tests
install -m 744 $(SRCDIR)/../html/*.html $(IMAGE)/html
install -m 744 $(SRCDIR)/../latex/*.tex $(IMAGE)/latex
install -m 744 $(SRCDIR)/../html/template_results_page_files/* $(IMAGE)/html/template_results_page_files
install -m 744 $(SRCDIR)/../schemas/*.xsd $(IMAGE)/schemas
install -m 744 $(SRCDIR)/../scripts/*.scr $(IMAGE)/scripts
install -m 744 $(SRCDIR)/../scripts/*.xml $(IMAGE)/examples/mpeg
install -m 744 $(SRCDIR)/../scripts/full_*.gz $(IMAGE)/examples/mpeg
install -m 744 $(SRCDIR)/../scripts/*mpeg* $(IMAGE)/examples/mpeg
install -m 744 $(SRCDIR)/../tests/test*output.ref $(IMAGE)/tests
install -m 744 $(SRCDIR)/../tests/db7.xml.ref $(IMAGE)/tests
install -m 744 $(SRCDIR)/../tests/test_xml*.scr $(IMAGE)/tests
install -m 744 $(SRCDIR)/../tests/test_ff*.scr $(IMAGE)/tests
install -m 744 $(SRCDIR)/../tests/mpeg_dse.scr $(IMAGE)/tests
install -m 744 $(SRCDIR)/../tests/mpeg_export_xml.scr $(IMAGE)/tests
install -m 744 $(SRCDIR)/../tests/pareto_mpeg4.db $(IMAGE)/tests
install -m 744 $(SRCDIR)/../tests/stub_*.py $(IMAGE)/tests
install -m 744 $(SRCDIR)/../tests/simple_sim/simple_sim.py $(IMAGE)/examples/simple_sim
install -m 744 $(SRCDIR)/../tests/simple_sim/simple_sim_scr.scr $(IMAGE)/examples/simple_sim
install -m 744 $(DSTDIR)/simple_sim_ds.xml $(IMAGE)/examples/simple_sim
install -m 744 $(SRCDIR)/../tests/beverage_can/beverage_can.py $(IMAGE)/examples/beverage_can
install -m 744 $(SRCDIR)/../tests/beverage_can/beverage_can_scr.scr $(IMAGE)/examples/beverage_can
install -m 744 $(DSTDIR)/beverage_can_ds.xml $(IMAGE)/examples/beverage_can
install -m 744 $(SRCDIR)/../gpl/*xdr* $(IMAGE)/rsm
#mkdir -p $(IMAGE)/include
install -m 744 $(DSTDIR)/m3explorer $(IMAGE)/bin
#for hdr in $(INCDIR)/*.h ; do \
if cmp -s $$hdr $(IMAGE)/include/`basename $$hdr`; then : ; else \
echo "Installing $$hdr to $(IMAGE)/include"; \
install -m 644 $$hdr $(IMAGE)/include; \
fi; \
done
if [ -e $(DSTDIR)/sh_i ] ; then \
install -m 744 $(DSTDIR)/sh_i $(IMAGE)/rsm; \
fi ; \
if [ -e $(DSTDIR)/nn ] ; then \
install -m 744 $(DSTDIR)/nn $(IMAGE)/rsm; \
fi ; \
if [ -e $(DSTDIR)/spline ] ; then \
install -m 744 $(DSTDIR)/spline $(IMAGE)/rsm; \
fi ; \
if [ -e $(DSTDIR)/rbf_interpolator ] ; then \
install -m 744 $(DSTDIR)/rbf_interpolator $(IMAGE)/rsm; \
fi ; \
if [ -e $(DSTDIR)/regressor ] ; then \
install -m 744 $(DSTDIR)/regressor $(IMAGE)/rsm; \
fi ; \
chmod a+x $(IMAGE)/bin/*
chmod a+x $(IMAGE)/lib/*
chmod a+x $(IMAGE)/rsm/*
chmod a+x $(IMAGE)/tests/do_tests
install-doc: install doc
What can be the possible cause of error and how to solve it? I have checked with many earlier posts from blog. But couldn't solve it.
List libraries after the object files, not before them. Rewrite the build rule which is currently:
m3explorer: $(M3EXPLORER_TARGETS)
$(CXX) $(OTHERLINKFLAGS) $^ -o $#
as:
m3explorer: $(M3EXPLORER_TARGETS)
$(CXX) -o $# $^ $(OTHERLINKFLAGS)
Personally, I'd include $(CXXFLAGS) in the link line too:
m3explorer: $(M3EXPLORER_TARGETS)
$(CXX) $(CXXFLAGS) -o $# $^ $(OTHERLINKFLAGS)
I've download LEDA link
but when I do make install ther is a problem: directory incl/LEDA/INCLUDE does not exist.
This is the makefile
SHELL=/bin/sh
cc = $(shell basename $(CURDIR))
sys = $(shell cmd/leda.sys)
instdir = /LEDA/INSTALL/$(sys)/$(cc)
default: lib
kernel:
./kernel_config
$(MAKE) lib xlman
all: lib tests
install: FORCE
cp -r -L incl /LEDA/INSTALL/$(sys)
if [ -f leda.lib ]; then cp leda.lib $(instdir); fi
if [ -f leda.dll ]; then cp leda.dll $(instdir); fi
if [ -f libleda.a ]; then cp libleda.a $(instdir); fi
if [ -f libleda.so ]; then cp libleda.so $(instdir); fi
FORCE: lib
#------------------------------------------------------------------------------
# libraries
#------------------------------------------------------------------------------
lib: .license
#if [ -f .license -a -d src ]; then $(MAKE) -C src; fi
#if [ -f .license -a -d src1 ]; then $(MAKE) -C src1; fi
#if [ -f .license -a -f closelib ]; then ./closelib; fi
#if [ -f .license -a -f static.mk ]; then $(MAKE) static; fi
#if [ -f .license -a -f shared.mk ]; then $(MAKE) shared; fi
touch:
#if [ -f .license -a -d src ]; then $(MAKE) -C src touch; fi
#if [ -f .license -a -d src1 ]; then $(MAKE) -C src1 touch; fi
#if [ -f .license -a -f static.mk ]; then $(MAKE) static; fi
#if [ -f .license -a -f shared.mk ]; then $(MAKE) shared; fi
nogui: .license
mv libleda.a libleda.a.gui
mv libleda.so libleda.so.gui
mv src/graphics src/graphics_
mv src1/graphics src1/graphics_
$(MAKE) touch
mv src/graphics_ src/graphics
mv src1/graphics_ src1/graphics
mv libleda.a libleda.so no_gui
mv libleda.a.gui libleda.a
mv libleda.so.gui libleda.so
gui: .license
$(MAKE) touch
lib0: .license
#if [ -f .license -a -d src ]; then $(MAKE) -C src; fi
#if [ -f .license -a -f closelib ]; then ./closelib; fi
#if [ -f .license -a -f static.mk ]; then $(MAKE) static; fi
#if [ -f .license -a -f shared.mk ]; then $(MAKE) shared; fi
lib1: .license
#if [ -f .license -a -d src1 ]; then $(MAKE) -C src1; fi
#if [ -f .license -a -f closelib ]; then ./closelib; fi
#if [ -f .license -a -f static.mk ]; then $(MAKE) static; fi
#if [ -f .license -a -f shared.mk ]; then $(MAKE) shared; fi
libL1:
cp libL.a libL1.a
mv src/system/_leda.o src/system/_leda_orig.o
$(MAKE) -C src/system -i L=L1 DFLAGS=-DLEDA_CHECK_LICENSE
mv src/system/_leda_orig.o src/system/_leda.o
agd:
$(MAKE) -C AGD
#if [ -f AGD/static.mk ]; then $(MAKE) -f AGD/static.mk; fi
#if [ -f AGD/shared.mk ]; then $(MAKE) -f AGD/shared.mk; fi
shared: .license
#if [ -f .license ]; then \
if [ -f shared.mk ]; then \
echo "$(MAKE) -f shared.mk"; $(MAKE) -f shared.mk; \
if [ -f libAGD.a ]; then \
echo "$(MAKE) -f shared.mk agd"; $(MAKE) -f shared.mk agd; fi; \
else echo "Not configured to build shared libs."; fi; fi
static: .license
#if [ -f .license ]; then $(MAKE) -f static.mk; fi
.license:
#/bin/sh confdir/util/unix/license.sh
#------------------------------------------------------------------------------
# programs
#------------------------------------------------------------------------------
xlman: .license
#if [ -f .license ]; then \
echo "$(MAKE) -C demo/xlman "; $(MAKE) -C demo/xlman; fi
static_xlman: .license
#if [ -f .license ]; then \
echo "$(MAKE) -C demo/xlman "; $(MAKE) -C demo/xlman static_xlman; fi
demos: .license
#if [ -f .license ]; then \
if [ -d demo ]; then $(MAKE) -C demo; fi; fi
tests: .license
#if [ -f .license ]; then \
if [ -d test ]; then $(MAKE) -C test; fi; fi
#------------------------------------------------------------------------------
# manual
#------------------------------------------------------------------------------
man: .license
#if [ -f .license ]; then \
echo "$(MAKE) -C Manual/MANUAL ";\
$(MAKE) -C Manual/MANUAL; fi
pdfman: .license
#if [ -f .license ]; then \
echo "$(MAKE) -C Manual/MANUAL pdf";\
$(MAKE) -C Manual/MANUAL pdf; fi
dvi: .license
#if [ -f .license ]; then \
echo "$(MAKE) -C Manual/MANUAL dvi";\
$(MAKE) -C Manual/MANUAL dvi; fi
#------------------------------------------------------------------------------
# cleaning up
#------------------------------------------------------------------------------
del:
#if [ -d src ]; then $(MAKE) -C src clean; fi
#if [ -d src1 ]; then $(MAKE) -C src1 clean; fi
#if [ -d prog ]; then $(MAKE) -C prog del; fi
#if [ -d test ]; then $(MAKE) -C test del; fi
#if [ -d demo ]; then $(MAKE) -C demo del; fi
rm -f lib*.a lib*.so lib*.sl lib*.lib leda.dll leda.lib
clean:
#if [ -d src ]; then $(MAKE) -C src clean; fi
#if [ -d src1 ]; then $(MAKE) -C src1 clean; fi
#if [ -d prog ]; then $(MAKE) -C prog clean; fi
#if [ -d test ]; then $(MAKE) -C test clean; fi
#if [ -d demo ]; then $(MAKE) -C demo clean; fi
and this the install guide
********************************************************************
* *
* LEDA *
* *
* UNIX OBJECT CODE INSTALLATION *
* *
********************************************************************
Remark: This file describes the situation in a LEDA package.
1. Files and Directories
------------------------
To compile and link your programs with LEDA, the LEDA main directory
should contain at least the following files and subdirectories:
Readme.txt Readme File
Install/unix.txt this file
incl/ the LEDA include directory
libleda.a (libleda.so) basic library
The static library has extension .a. If a shared library is provided
it has extension .so.
2. Preparations
---------------
Unpacking the LEDA distribution file
LEDA-<ver>-<sys>-<cc>.tar.gz will create the LEDA root
directory "LEDA-<ver>-<sys>-<cc>". You might want to rename
it or move it to some different place. Let <LEDA> denote the final
complete path name of the LEDA root directory.
To install and use the Unix object code of LEDA you have to modify
your environment as follows:
a) LEDAROOT:
Set the environment variable LEDAROOT to the LEDA root directory:
csh/tcsh: setenv LEDAROOT <LEDA>
sh/bash: LEDAROOT=<LEDA>
export LEDAROOT
b) Command Search Path:
Include $LEDAROOT/Manual/cmd into your command search path
(environment variable path (csh) or PATH (sh)) and call rehash (if
required by your system).
c) Shared Library: (for solaris, linux, irix, osf1)
If you planning to use shared libraries include $LEDAROOT into the
LD_LIBRARY_PATH search path. Then go to $LEDAROOT and type
make shared. This will construct the shared libraries from the static
libraries.
Please note: Building the shared library is not supported on each
platform.
d) xlman and demos: Go to $LEDAROOT and type make xlman to compile
and link LEDA's interactive manual reader xlman. Now you can start
xlman for reading and printing manual pages, starting demo programs
and browsing more release notes.
3. Compiling and linking application programs
---------------------------------------------
a) Use the -I compiler flag to tell the compiler where to find the
LEDA header files.
CC (g++) -I$LEDAROOT/incl -c file.c
b) Use the -L compiler flag to tell the compiler where to find the
library (libleda.a/so)
CC (g++) -L$LEDAROOT file.o -lleda -lX11 -lm
If using windows on solaris systems you might have to link
with the system socket library and the network services library as
well:
CC (g++) ... -lleda -lX11 -lsocket -lnsl -lm
c) Compile and link simultaneously with
CC (g++) -I$LEDAROOT/incl -L$LEDAROOT file.c -lleda -lX11 -lm
You may want to ask your system adminstrator to install the header
files and library in the system's default directories.
Then you no longer have to specify header and library search paths on
the compiler command line.
4. Example programs and demos
-----------------------------
The source code of all example and demo programs can be found in
$LEDAROOT/test and $LEDAROOT/demo. Goto $LEDAROOT/test or
$LEDAROOT/demo and type "make" to compile and link all test or demo
programs, respectively.
5. User Manual
--------------
Postscript, PDF, and HTML versions of the manual are available at
http://www.algorithmic-solutions.com
I need a Shared Library. But I cant'understend how install it. I'm new from LEDA end makefile. Can you help me end explein step by step?
If i put make share the risult is:
Not configured to build shared libs.
What can I do?
The makefile branches out into two other makefiles, depending on what library you have (static (should always be there) or shared). Your output suggests that you don't have an appropriate shared library in any of the places the makefile is searching in. Did you add the variable $LEDAROOT to LD_LIBRARY_PATH (under sh/bash:export LD_LIBRARY_PATH="$LEDAROOT:$LD_LIBRARY_PATH") as suggested in the installation guide (section 2.c.)?
Otherwise it might be worth a try to build with make static. Only after this build has successfully finished,make install will be able to work.
I run a make command on a CPP code. I get error messages like:
/home/itaymoav/dev/phpext/sitel/build/entities.cpp: In function ‘void googleset_free_storage(void*)’:
As can be seen, except showing me the entry point of the function with errors, it does not give me anymore data. Is there a flag or some other way to get proper error messages?
MakeFile -> I know it is big...
srcdir = /home/itaymoav/dev/phpext/build
builddir = /home/itaymoav/dev/phpext/build
top_srcdir = /home/itaymoav/dev/phpext/build
top_builddir = /home/itaymoav/dev/phpext/build
EGREP = /bin/grep -E
SED = /bin/sed
CONFIGURE_COMMAND = './configure' '--enable-entities'
CONFIGURE_OPTIONS = '--enable-entities'
SHLIB_SUFFIX_NAME = so
SHLIB_DL_SUFFIX_NAME = so
ZEND_EXT_TYPE = zend_extension
RE2C = exit 0;
AWK = gawk
ENTITIES_SHARED_LIBADD = -lstdc++
shared_objects_entities = entities.lo GoogleSet.lo
PHP_PECL_EXTENSION = entities
PHP_MODULES = $(phplibdir)/entities.la
PHP_ZEND_EX =
all_targets = $(PHP_MODULES) $(PHP_ZEND_EX)
install_targets = install-modules install-headers
prefix = /usr
exec_prefix = $(prefix)
libdir = ${exec_prefix}/lib
prefix = /usr
phplibdir = /home/itaymoav/dev/phpext/build/modules
phpincludedir = /usr/include/php5
CC = cc
CFLAGS = -g -O2
CFLAGS_CLEAN = $(CFLAGS)
CPP = cc -E
CPPFLAGS = -DHAVE_CONFIG_H
CXX = g++
CXXFLAGS = -g -O2
CXXFLAGS_CLEAN = $(CXXFLAGS)
EXTENSION_DIR = /usr/lib/php5/20090626+lfs
PHP_EXECUTABLE = /usr/bin/php
EXTRA_LDFLAGS =
EXTRA_LIBS =
INCLUDES = -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
LFLAGS =
LDFLAGS =
SHARED_LIBTOOL =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
SHELL = /bin/bash
INSTALL_HEADERS =
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
all: $(all_targets)
#echo
#echo "Build complete."
#echo "Don't forget to run 'make test'."
#echo
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $#
-#$(LIBTOOL) --silent --mode=install cp $# $(phptempdir)/$# >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $# && cp $# libs/libphp$(PHP_MAJOR_VERSION).so
install: $(all_targets) $(install_targets)
install-sapi: $(OVERALL_TARGET)
#echo "Installing PHP SAPI module: $(PHP_SAPI)"
-#$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-#if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
#$(INSTALL_IT)
install-modules: build-modules
#test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
#echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
#rm -f modules/*.la >/dev/null 2>&1
#$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
install-headers:
-#if test "$(INSTALL_HEADERS)"; then \
for i in `echo $(INSTALL_HEADERS)`; do \
i=`$(top_srcdir)/build/shtool path -d $$i`; \
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
done; \
$(mkinstalldirs) $$paths && \
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
for i in `echo $(INSTALL_HEADERS)`; do \
if test "$(PHP_PECL_EXTENSION)"; then \
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
else \
src=$$i; \
fi; \
if test -f "$(top_srcdir)/$$src"; then \
$(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
elif test -f "$(top_builddir)/$$src"; then \
$(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
else \
(cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
fi \
done; \
fi
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
PHP_TEST_SHARED_EXTENSIONS = ` \
if test "x$(PHP_MODULES)" != "x"; then \
for i in $(PHP_MODULES)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
done; \
fi; \
if test "x$(PHP_ZEND_EX)" != "x"; then \
for i in $(PHP_ZEND_EX)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
done; \
fi`
PHP_DEPRECATED_DIRECTIVES_REGEX = '^(define_syslog_variables|register_(globals|long_arrays)?|safe_mode|magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
test: all
-#if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
if test "$$INI_SCANNED_PATH"; then \
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
$(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
clean:
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
.PHONY: all clean install distclean test
.NOEXPORT:
entities.lo: /home/itaymoav/dev/phpext/build/entities.cpp
$(LIBTOOL) --mode=compile $(CXX) -I. -I/home/itaymoav/dev/phpext/build $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/itaymoav/dev/phpext/build/entities.cpp -o entities.lo
GoogleSet.lo: /home/itaymoav/dev/phpext/build/GoogleSet.cpp
$(LIBTOOL) --mode=compile $(CXX) -I. -I/home/itaymoav/dev/phpext/build $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/itaymoav/dev/phpext/build/GoogleSet.cpp -o GoogleSet.lo
$(phplibdir)/entities.la: ./entities.la
$(LIBTOOL) --mode=install cp ./entities.la $(phplibdir)
./entities.la: $(shared_objects_entities) $(ENTITIES_SHARED_DEPENDENCIES)
$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $# -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_entities) $(ENTITIES_SHARED_LIBADD)
You will have to examine your Makefile and any rules files it includes. Find the rule for compiling .cpp into .o and see what sort of filtering it is doing on your compile output. If it is intentionally restricting the output of the compiler to make normal compiles less verbose it will probably have a flag you can set to override that. The Linux kernel (and many related Makefiles) use a QUIET flag for this purpose, so you can do make QUIET='' to disable the terse output and see everything.
If the build rule is hiding errors there is probably a bug in it. If you can find it and add it to your question someone may know how to fix it.
The line you quoted is not the real error message. It is just the first of two lines. The following line contains the really interesting stuff.
And only in the rare case that there isn't a second line should you worry. Because then somebody wrapped the compiler to suppress some of its error messages.