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.
Related
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
I have imported the veins_inet subproject when importing the veins 4.5 project (by selecting the "Search for nested projects") in Omnet++.
I have built veins and can run the Erlangen example.
However, I cannot build the veins_inet project.
The sources can be found here: https://github.com/sommer/veins/tree/master/subprojects/veins_inet
I get the following error:
make MODE=debug all
make[1]: Entering directory '/home/XX/omnetpp-5.1.1/samples/veins/subprojects/veins_inet/src'
veins_inet/VeinsInetManager.cc
veins_inet/VeinsInetManager.cc:21:41: fatal error: veins_inet/VeinsInetManager.h: No such file or directory
compilation terminated.
Makefile:97: recipe for target '../out/gcc-debug/src/veins_inet/VeinsInetManager.o' failed
make[1]: Leaving directory '/home/XX/omnetpp-5.1.1/samples/veins/subprojects/veins_inet/src'
Makefile:12: recipe for target 'all' failed
make[1]: *** [../out/gcc-debug/src/veins_inet/VeinsInetManager.o] Error 1
make: *** [all] Error 2
It seems like the header files have failed to be included.
I can bypass the "No such file or directory" errors by manually copying all necessary *.h files into the veins_inet/src/veins_inet folder and editing the *.cc and *.h files, such that the compiler finds the required header files.
I guess the issue lies in the Makefiles, or rather in the configure file, which generates the Makefiles.
veins_inet/configure:
#!/usr/bin/env python
"""
Creates Makefile(s) for building Veins_INET.
"""
import os
import sys
import subprocess
from logging import warning, error
from optparse import OptionParser
# Option handling
parser = OptionParser()
parser.add_option("--with-veins", dest="veins", help="link Veins_INET with a version of Veins installed in PATH [default: do not link with Veins]", metavar="PATH", default="../..")
parser.add_option("--with-inet", dest="inet", help="link Veins_INET with a version of the INET Framework installed in PATH [default: do not link with INET]", metavar="PATH", default="../../../inet")
(options, args) = parser.parse_args()
if args:
warning("Superfluous command line arguments: \"%s\"" % " ".join(args))
# Start with default flags
makemake_flags = ['-f', '--deep', '--no-deep-includes', '--make-so', '-I', '.', '-o', 'veins_inet', '-O', 'out']
run_libs = [os.path.join('src', 'veins_inet')]
run_neds = [os.path.join('src', 'veins_inet')]
# Add flags for Veins
if options.veins:
check_fname = os.path.join(options.veins, 'src/veins/package.ned')
expect_version = '4'
if not os.path.isfile(check_fname):
error('Could not find Veins (by looking for %s). Check the path to Veins (--with-veins=... option) and the Veins version (should be version %s)' % (check_fname, expect_version))
sys.exit(1)
veins_header_dirs = [os.path.join(os.path.relpath(options.veins, 'src'), 'src')]
veins_includes = ['-I' + s for s in veins_header_dirs]
veins_link = ["-L" + os.path.join(os.path.relpath(options.veins, 'src'), 'src'), "-lveins"]
veins_defs = []
makemake_flags += veins_includes + veins_link + veins_defs
run_libs = [os.path.relpath(os.path.join(options.veins, 'src', 'veins'))] + run_libs
run_neds = [os.path.relpath(os.path.join(options.veins, 'src', 'veins'))] + run_neds
# Add flags for INET
if options.inet:
fname = os.path.join(options.inet, '_scripts/get_version')
expect_version = '3.4.0'
try:
print 'Running "%s" to determine INET version.' % fname
version = subprocess.check_output(fname).strip()
if not version == expect_version:
warning('Unsupported INET Version. Expecting %s, found "%s"' % (expect_version, version))
else:
print 'Found INET version "%s". Okay.' % version
except OSError as e:
error('Could not determine INET Version (by running %s): %s. Check the path to INET (--with-inet=... option) and the INET version (should be version %s)' % (fname, e, expect_version))
sys.exit(1)
inet_header_dirs = [os.path.join(os.path.relpath(options.inet, 'src'), 'src')]
inet_includes = ['-I' + s for s in inet_header_dirs]
inet_link = ["-L" + os.path.join(os.path.relpath(options.inet, 'src'), 'src'), "-lINET"]
inet_defs = ["-DINET_IMPORT"]
makemake_flags += inet_includes + inet_link + inet_defs
run_libs = [os.path.relpath(os.path.join(options.inet, 'src', 'INET'))] + run_libs
run_neds = [os.path.relpath(os.path.join(options.inet, 'src'))] + run_neds
# Start creating files
if not os.path.isdir('out'):
os.mkdir('out')
f = open(os.path.join('out', 'config.py'), 'w')
f.write('run_libs = %s\n' % repr(run_libs))
f.write('run_neds = %s\n' % repr(run_neds))
f.close()
subprocess.check_call(['env', 'opp_makemake'] + makemake_flags, cwd='src')
print 'Configure done. You can now run "make".'
veins_inet/Makefile
.PHONY: all makefiles clean cleanall doxy
# if out/config.py exists, we can also create command line scripts for running simulations
ADDL_TARGETS =
ifeq ($(wildcard out/config.py),)
else
ADDL_TARGETS += run debug memcheck
endif
# default target
all: src/Makefile $(ADDL_TARGETS)
#cd src && $(MAKE)
# command line scripts
run debug memcheck: % : src/scripts/%.in.py out/config.py
#echo "Creating script \"./$#\""
#head -n1 "$<" > "$#"
#cat out/config.py >> "$#"
#tail -n+2 "$<" >> "$#"
#chmod a+x "$#"
# legacy
makefiles:
#echo
#echo '====================================================================='
#echo 'Warning: make makefiles has been deprecated in favor of ./configure'
#echo '====================================================================='
#echo
./configure
#echo
#echo '====================================================================='
#echo 'Warning: make makefiles has been deprecated in favor of ./configure'
#echo '====================================================================='
#echo
clean: src/Makefile
cd src && $(MAKE) clean
rm -f run debug memcheck
cleanall: src/Makefile
cd src && $(MAKE) MODE=release clean
cd src && $(MAKE) MODE=debug clean
rm -f src/Makefile
rm -f run debug memcheck
src/Makefile:
#echo
#echo '====================================================================='
#echo '$# does not exist.'
#echo 'Please run "./configure" or use the OMNeT++ IDE to generate it.'
#echo '====================================================================='
#echo
#exit 1
out/config.py:
#echo
#echo '====================================================================='
#echo '$# does not exist.'
#echo 'Please run "./configure" to generate it.'
#echo '====================================================================='
#echo
#exit 1
# autogenerated documentation
doxy:
doxygen doxy.cfg
doxyshow: doxy
xdg-open doc/doxy/index.html
veins_inet/src/Makefile
#
# OMNeT++/OMNEST Makefile for $(LIB_PREFIX)veins_inet
#
# This file was generated with the command:
# opp_makemake --make-so -f --deep -KINET_PROJ=../../../../inet -KVEINS_PROJ=../../.. -L$$\(INET_PROJ\)/out/$$\(CONFIGNAME\)/src -L$$\(VEINS_PROJ\)/out/$$\(CONFIGNAME\)/src -lINET -lveins
#
# Name of target to be created (-o option)
TARGET = $(LIB_PREFIX)veins_inet$(SHARED_LIB_SUFFIX)
# C++ include paths (with -I)
INCLUDE_PATH =
# Additional object and library files to link with
EXTRA_OBJS =
# Additional libraries (-L, -l options)
LIBS = $(LDFLAG_LIBPATH)$(INET_PROJ)/out/$(CONFIGNAME)/src $(LDFLAG_LIBPATH)$(VEINS_PROJ)/out/$(CONFIGNAME)/src -lINET -lveins
# Output directory
PROJECT_OUTPUT_DIR = ../out
PROJECTRELATIVE_PATH = src
O = $(PROJECT_OUTPUT_DIR)/$(CONFIGNAME)/$(PROJECTRELATIVE_PATH)
# Object files for local .cc, .msg and .sm files
OBJS = $O/veins_inet/VeinsInetManager.o $O/veins_inet/VeinsInetMobility.o
# Message files
MSGFILES =
# SM files
SMFILES =
# Other makefile variables (-K)
INET_PROJ=../../../../inet
VEINS_PROJ=../../..
#------------------------------------------------------------------------------
# Pull in OMNeT++ configuration (Makefile.inc)
ifneq ("$(OMNETPP_CONFIGFILE)","")
CONFIGFILE = $(OMNETPP_CONFIGFILE)
else
ifneq ("$(OMNETPP_ROOT)","")
CONFIGFILE = $(OMNETPP_ROOT)/Makefile.inc
else
CONFIGFILE = $(shell opp_configfilepath)
endif
endif
ifeq ("$(wildcard $(CONFIGFILE))","")
$(error Config file '$(CONFIGFILE)' does not exist -- add the OMNeT++ bin directory to the path so that opp_configfilepath can be found, or set the OMNETPP_CONFIGFILE variable to point to Makefile.inc)
endif
include $(CONFIGFILE)
# Simulation kernel and user interface libraries
OMNETPP_LIBS = -loppenvir$D $(KERNEL_LIBS) $(SYS_LIBS)
ifneq ($(TOOLCHAIN_NAME),clangc2)
LIBS += -Wl,-rpath,$(abspath $(INET_PROJ)/out/$(CONFIGNAME)/src) -Wl,-rpath,$(abspath $(VEINS_PROJ)/out/$(CONFIGNAME)/src)
endif
COPTS = $(CFLAGS) $(IMPORT_DEFINES) $(INCLUDE_PATH) -I$(OMNETPP_INCL_DIR)
MSGCOPTS = $(INCLUDE_PATH)
SMCOPTS =
# we want to recompile everything if COPTS changes,
# so we store COPTS into $COPTS_FILE and have object
# files depend on it (except when "make depend" was called)
COPTS_FILE = $O/.last-copts
ifneq ("$(COPTS)","$(shell cat $(COPTS_FILE) 2>/dev/null || echo '')")
$(shell $(MKPATH) "$O" && echo "$(COPTS)" >$(COPTS_FILE))
endif
#------------------------------------------------------------------------------
# User-supplied makefile fragment(s)
# >>>
# <<<
#------------------------------------------------------------------------------
# Main target
all: $O/$(TARGET)
$(Q)$(LN) $O/$(TARGET) .
$O/$(TARGET): $(OBJS) $(wildcard $(EXTRA_OBJS)) Makefile $(CONFIGFILE)
#$(MKPATH) $O
#echo Creating shared library: $#
$(Q)$(SHLIB_LD) -o $O/$(TARGET) $(OBJS) $(EXTRA_OBJS) $(AS_NEEDED_OFF) $(WHOLE_ARCHIVE_ON) $(LIBS) $(WHOLE_ARCHIVE_OFF) $(OMNETPP_LIBS) $(LDFLAGS)
$(Q)$(SHLIB_POSTPROCESS) $O/$(TARGET)
.PHONY: all clean cleanall depend msgheaders smheaders
.SUFFIXES: .cc
$O/%.o: %.cc $(COPTS_FILE) | msgheaders smheaders
#$(MKPATH) $(dir $#)
$(qecho) "$<"
$(Q)$(CXX) -c $(CXXFLAGS) $(COPTS) -o $# $<
%_m.cc %_m.h: %.msg
$(qecho) MSGC: $<
$(Q)$(MSGC) -s _m.cc $(MSGCOPTS) $?
%_sm.cc %_sm.h: %.sm
$(qecho) SMC: $<
$(Q)$(SMC) -c++ -suffix cc $(SMCOPTS) $?
msgheaders: $(MSGFILES:.msg=_m.h)
smheaders: $(SMFILES:.sm=_sm.h)
clean:
$(qecho) Cleaning...
$(Q)-rm -rf $O
$(Q)-rm -f $(TARGET)
$(Q)-rm -f $(call opp_rwildcard, . , *_m.cc *_m.h *_sm.cc *_sm.h)
cleanall: clean
$(Q)-rm -rf $(PROJECT_OUTPUT_DIR)
# include all dependencies
-include $(OBJS:%.o=%.d)
Has anybody solved the issue ?
To solve the problem I had to add missing "Include Paths" to the project properties:
1. Select your veins_inet project and click Project>>Properties in Omnet++
2. In the new window expand the OMNeT++ entry and select Makemake
3. select src:makemake(deep,recurse)-->veins_inet(dynamic lib)
4. Click on the Options... button
It should look like this: Properties for veins_inet window
5. Go to the Compile tab in the window that opens
6. Enter the missing include directories:
[workspace]/veins/subprojects/veins_inet/src
[workspace]/veins/src
[workspace]/inet/src
You should end up with something similar: Makemake Options window
7. Click OK in both windows
8. You should be able to build the veins_inet project without errors
if you use omnet++ 5.0 version :
IDE Project->properties->OMNET++ -> Makemake -> select src -> build makemake selected options button -> compile -> check [add all source folders under this deep makefile] :: then refresh and build project ..
I'm trying to compile library https://github.com/PetterS/SuiteSparse/tree/master/CSparse
with MinGW on Windows 7.
Makefile contents:
C:
( cd Lib ; $(MAKE) )
( cd Demo ; $(MAKE) )
all: C cov
library:
( cd Lib ; $(MAKE) )
cov:
( cd Tcov ; $(MAKE) )
clean:
( cd Lib ; $(MAKE) clean )
( cd Demo ; $(MAKE) clean )
( cd Tcov ; $(MAKE) clean )
( cd MATLAB/CSparse ; $(RM) *.o )
( cd MATLAB/Test ; $(RM) *.o )
purge:
( cd Lib ; $(MAKE) purge )
( cd Demo ; $(MAKE) purge )
( cd Tcov ; $(MAKE) purge )
( cd MATLAB/CSparse ; $(RM) *.o *.mex* )
( cd MATLAB/Test ; $(RM) *.o *.mex* )
distclean: purge
# do not install CSparse; use CXSparse instead
install:
# uninstall CSparse: do nothing
uninstall:
I'im typing in cmd.exe:
PS C:\Users\s\Desktop\CSparse> mingw32-make
( cd Lib ; C:/MinGW/bin/mingw32-make )
process_begin: CreateProcess(NULL, ( cd Lib ; C:/MinGW/bin/mingw32-make ), ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:8: recipe for target 'C' failed
mingw32-make: *** [C] Error 2
My Path variable:
C:\Program Files\PC Connectivity Solution\;C:\watcom-1.3\binnt;C:\watcom-1.3\binw;C:\Program Files\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\python27\;C:\Python27\Scripts;C:\Program Files\MiKTeX 2.9\miktex\bin\;C:\Program Files\Panda3D-1.8.1\python;C:\Program Files\Panda3D-1.8.1\bin;C:\Program Files\Autodesk\Backburner\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Skype\Phone\;C:\Program Files\MATLAB\R2014a\runtime\win32;C:\Program Files\MATLAB\R2014a\bin;C:\MinGW\bin;
I have rebooted Windows already.
I also tried to set path=C:\MinGW\bin in cmd.exe, but nothing have changed.
Can anyone tell me what I'm doing wrong?
I also tried to set path=C:\mingw32\bin in cmd.exe, but nothing have changed.
As far I'm concerned, by typing this you make PATH variable contains only path "C:\mingw32\bin".
Have look at this answer: https://stackoverflow.com/a/9546345/4776786
Try this instead in CMD:
set PATH=%PATH%;C:\mingw32\bin
By executing that command you add that directory to your current PATH variable.
But, in other hand, why you just don't use "My Computer" > "Properties" > "Advanced" > "Environment Variables" > "Path"? Doing this, system reboot will not interrupt your PATH.
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.
First of all, I am not sure that what I am going to ask is my problem. Perhaps it is something else, so, please, don't hesitate to point that out. I think that the place I went wrong is the clean target of my Makefile, but it could be something else entirely.
Here is what happens: after running make clean and then make few targets, which have their resulting files deleted during the clean don't rebuild. (In addition to my question I'd be interested in a way to cancel entirely all caching GNU/Make does, it has been a major pain since whenever I ever used it, and never had any positive consequences, not even once).
If I then run make again, some of the targets are rebuilt. If I run make one more time, the targets that depend on the targets built in the previous round are rebuilt and so on.
Here's the corresponding Makefile section:
PACKAGE = i-iterate
DOCDST = ${PACKAGE}/docs
HTMLDOCDST = ${PACKAGE}/html-docs
DOCSRC = ${PACKAGE}/info
IC = makeinfo
ICO = --force
TEXI2HTML = texi2html
TEXI2HTMLO = --split section --use-nodes
HTML2WIKI = html2wiki
HTML2WIKIO = --dialect GoogleCode
TEXI = $(wildcard $(DOCSRC)/*.texi)
INFO = $(addprefix $(DOCDST)/,$(notdir $(TEXI:.texi=.info)))
WIKIDST = ../wiki
HTML = $(wildcard $(HTMLDOCDST)/*.html)
WIKI = $(addprefix $(WIKIDST)/,$(notdir $(HTML:.html=.wiki)))
$(DOCDST)/%.info: $(DOCSRC)/%.texi
echo "info builds: $<"
$(IC) $(ICO) -o $# $<
$(TEXI2HTML) $(TEXI2HTMLO) $<
$(WIKIDST)/%.wiki: $(HTMLDOCDST)/%.html
$(HTML2WIKI) $(HTML2WIKIO) $< > $#
default: prepare $(INFO) move-html $(WIKI) rename-wiki byte-compile
cp -r lisp info Makefile README i-pkg.el ${PACKAGE}
prepare:
mkdir -p ${PACKAGE}
mkdir -p ${DOCDST}
mkdir -p ${HTMLDOCDST}
move-html:
$(shell [[ '0' -ne `find ./ -maxdepth 1 -name "*.html" | wc -l` ]] && \
mv -f *.html ${HTMLDOCDST}/)
rename-wiki:
$(shell cd ${WIKIDST} && rename 'i-iterate' 'Iterate' *.wiki)
$(shell find ${WIKIDST} -name "*.wiki" -exec sed -i \
's/\[i-iterate/\[Iterate/g;s/\.html\#/\#/g;s/</\</g;s/>/\>/g' \
'{}' \;)
byte-compile:
emacs -Q -L ./lisp -batch -f batch-byte-compile ./lisp/*.el
clean:
rm -f ./lisp/*.elc
rm -f ./*.html
rm -rf ${DOCDST}
rm -rf ${HTMLDOCDST}
rm -rf ${PACKAGE}
And here's the output:
First run
$ make
mkdir -p i-iterate
mkdir -p i-iterate/docs
mkdir -p i-iterate/html-docs
emacs -Q -L ./lisp -batch -f batch-byte-compile ./lisp/*.el
Wrote /home/wvxvw/Projects/i-iterate/trunk/lisp/i-iterate.elc
cp -r lisp info Makefile README i-pkg.el i-iterate
Second run
$ make
mkdir -p i-iterate
mkdir -p i-iterate/docs
mkdir -p i-iterate/html-docs
echo "info builds: i-iterate/info/i-iterate.texi"
info builds: i-iterate/info/i-iterate.texi
makeinfo --force -o i-iterate/docs/i-iterate.info i-iterate/info/i-iterate.texi
texi2html --split section --use-nodes i-iterate/info/i-iterate.texi
emacs -Q -L ./lisp -batch -f batch-byte-compile ./lisp/*.el
Wrote /home/wvxvw/Projects/i-iterate/trunk/lisp/i-iterate.elc
cp -r lisp info Makefile README i-pkg.el i-iterate
Third run
$ make
mkdir -p i-iterate
mkdir -p i-iterate/docs
mkdir -p i-iterate/html-docs
echo "info builds: i-iterate/info/i-iterate.texi"
info builds: i-iterate/info/i-iterate.texi
makeinfo --force -o i-iterate/docs/i-iterate.info i-iterate/info/i-iterate.texi
texi2html --split section --use-nodes i-iterate/info/i-iterate.texi
html2wiki --dialect GoogleCode i-iterate/html-docs/i-iterate_9.html > ../wiki/i-iterate_9.wiki
# ... a bunch more of the documentation pages ...
/i-iterate_5.wiki
html2wiki --dialect GoogleCode i-iterate/html-docs/i-iterate_2.html > ../wiki/i-iterate_2.wiki
emacs -Q -L ./lisp -batch -f batch-byte-compile ./lisp/*.el
Wrote /home/wvxvw/Projects/i-iterate/trunk/lisp/i-iterate.elc
cp -r lisp info Makefile README i-pkg.el i-iterate
As you can see, the $(INFO) isn't even entered on the first run, even though the directory where it outputs the file was just deleted and created anew. The exact same thing happens later when it (doesn't) rebuild the $(WIKI).
EDIT:
Here's the directory structure, text following # signs is comments.
|- info
| +- documentation.texi
|- lisp
| +- source.el
| +- binary.elc # generated during compile
|- docs # should be deleted and created during the build
| +- documentation.info
|- html-docs # should be deleted and created during the build
| +- documentation.html
|- i-iterate # sources are copied here for distribution
| |- info
| | +- documentation.texi
| |- lisp
| | +- source.el
An update to the original Makefile, but the problem isn't solved
TEXI = $(wildcard $(DOCSRC)/*.texi)
INFO = $(addprefix $(DOCDST)/,$(notdir $(TEXI:.texi=.info)))
WIKIDST = ../wiki
$(DOCDST)/%.info: $(DOCSRC)/%.texi
#echo "info builds: $<"
$(IC) $(ICO) -o $# $<
$(TEXI2HTML) $(TEXI2HTMLO) $<
# This rule is not applied! :(
$(WIKIDST)/%.wiki: $(HTMLDOCDST)/%.html
#echo "Wiki: $<"
$(HTML2WIKI) $(HTML2WIKIO) $< > $#
default: prepare $(INFO) move-html rename-wiki byte-compile
cp -r lisp info Makefile README i-pkg.el ${PACKAGE}
prepare:
mkdir -p ${PACKAGE}
mkdir -p ${DOCDST}
mkdir -p ${HTMLDOCDST}
move-html:
$(shell [[ '0' -ne `find ./ -maxdepth 1 -name "*.html" | wc -l` ]] && \
mv -f *.html ${HTMLDOCDST}/)
$(eval HTML := $(wildcard $(HTMLDOCDST)/*.html))
$(eval WIKI := $(addprefix $(WIKIDST)/,$(notdir $(HTML:.html=.wiki))))
#echo "HTML: $(HTML)" # prints as expected
#echo "WIKI: $(WIKI)" # prints as expected
rename-wiki: $(WIKI) # this dependency never triggers
# the $(WIKIDST)/%.wiki rule
#echo "Renaming: `ls $(HTMLDOCDST)`" # the files are there
$(shell cd ${WIKIDST} && rename 'i-iterate' 'Iterate' *.wiki)
$(shell find ${WIKIDST} -name "*.wiki" -exec sed -i \
's/\[i-iterate/\[Iterate/g;s/\.html\#/\#/g;s/</\</g;s/>/\>/g' \
'{}' \;)
Trying to execute $(WIKI) in this way doesn't trigger the correspondent rule for some reason.
And if I change rename-wiki to look something like:
rename-wiki: ../wiki/file.wiki
I get "no rule to build the target. Even though $(WIKIDIST)/%.wiki is the rule to build the target.
EDIT2:
Finally, I could achieve what I want in doing it like so:
move-html:
$(shell [[ '0' -ne `find ./ -maxdepth 1 -name "*.html" | wc -l` ]] && \
mv -f *.html $(HTMLDOCDST)/)
$(foreach html, $(wildcard $(HTMLDOCDST)/*.html), \
$(HTML2WIKI) $(HTML2WIKIO) $(html) > \
$(addprefix $(WIKIDST)/, $(notdir $(html:.html=.wiki))))
Needless to mention how much I like the solution and the language that makes one devise one.
There are several problems here. This may take a few iterations.
First, when you make clean you delete i-iterate/ and everything in it, including i-iterate/info/whatever.texi. Since there are no texi files, Make deduces that no info files need be made; $(INFO) is an empty list.
I gather that by some black magic the emacs command creates an info/ directory full of texi files out of the ether, which Make then copies into i-iterate/ (in the default rule). Is that correct? If it is correct, then we should do this before the $(INFO) step. I suspect that the same is true of the $(WIKI) step, but let's not get ahead of ourselves.