i am installing asterisk server on my laptop with ubuntu16.04. during installation 'make dep' gives following error:
for dir in pjlib/build pjlib-util/build pjnath/build third_party/build pjmedia/build pjsip/build pjsip-apps/build ; do \
if make -C $dir dep; then \
true; \
else \
exit 1; \
fi; \
done
make[1]: Entering directory '/usr/src/asterisk-13.16.0/pjproject/pjlib/build'
make -f /usr/src/asterisk-13.16.0/pjproject/build/rules.mak APP=PJLIB app=pjlib depend
make[2]: Entering directory '/usr/src/asterisk-13.16.0/pjproject/pjlib/build'
.pjlib-x86_64-unknown-linux-gnu.depend:1: *** missing separator. Stop.
make[2]: Leaving directory '/usr/src/asterisk-13.16.0/pjproject/pjlib/build'
Makefile:88: recipe for target 'depend' failed
make[1]: *** [depend] Error 2
make[1]: Leaving directory '/usr/src/asterisk-13.16.0/pjproject/pjlib/build'
Makefile:14: recipe for target 'dep' failed
make: *** [dep] Error 1
where makefile line 88 and line 14 are(respectively):
$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib depend
export PJLIB_SONAME := libpj.$(SHLIB_SUFFIX)
what could be the reason???
Make wants to have hard tabs in its makefiles. This seems to be a bug in the asterix sources. Maybe you habe to fill a bugticket. This makefile seems to reside in
/usr/src/asterisk-13.16.0/pjproject/pjlib/build.
It is named "makefile". You can check this for yourself. The problem is at line 88 of that file.
But building from source usually means only a
make configure --prefix=<dir to install>
make
I doubt this has been overseen. Maybe just a "make configure; make" is sufficent for your needs
Related
I have got the source files from insight-weekly-CVS-7.0.50-20091130. I have got the following errors. Thanks for your help.
config.status: executing bfd_stdint.h commands ./config.status: line 2602: cmp: command not found
config.status: executing default commands
mingw32-make[3]: Nothing to be done for 'info'.
mingw32-make[3]: Leaving directory 'C:/insight-weekly-CVS-7.0.50-20091130/src/bfd/po'
mingw32-make[3]: Entering directory 'C:/insight-weekly-CVS-7.0.50-20091130/src/bfd'
mingw32-make[3]: Nothing to be done for 'info-am'.
mingw32-make[3]: Leaving directory 'C:/insight-weekly-CVS-7.0.50-20091130/src/bfd'
mingw32-make[2]: *** [Makefile:1546: info-recursive] Error 1
mingw32-make[2]: Leaving directory 'C:/insight-weekly-CVS-7.0.50-20091130/src/bfd'## Heading ##
mingw32-make[1]: *** [Makefile:3333: all-bfd] Error 2
mingw32-make[1]: Leaving directory 'C:/insight-weekly-//CVS-7.0.50-20091130/src'
mingw32-make: *** [Makefile:854: all] Error 2
I have a python script that process files in a directory on Linux Mint. Part of the code is like the following:
path_to_dir = "/home/user/Im a folder with libs to install/"
if os.path.isdir(path_to_dir):
print "it can locate the directory"
os.chdir(path_to_dir) # everything ok here :D
subprocess.call(['./configure'], shell = True)
subprocess.call(['make'], shell = True)
subprocess.call(['make install'], shell = True) # problem happens here
When executing subprocess.call(['make install'], shell = True) it throws this error:
/bin/bash: /home/user/Im: No such file or directory
make[3]: *** [install-libLTLIBRARIES] Error 127
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
How can I deal with spaces in paths when executing subprocess.call(['make install'], shell = True)? (I'm using Python 2.7)
Edit: I found out the source of the errors: the Makefile of the libraries I'm using (downloaded from somewhere on Internet) don't support spaces in the path.
I tested the answer given here using this code in the terminal located in the path "/home/user/Im a folder with libs to install/" and using a root account:
./configure
make
make install /home/user/Im\ a\ folder\ with\ libs\ to\ install/Makefile
It gives me the same error:
/bin/bash: /home/user/Im: No such file or directory
[install-libLTLIBRARIES] Error 127
make[3]: se sale del directorio «/home/user/Im a folder with libs to install/»
make[2]: *** [install-am] Error 2
make[2]: se sale del directorio «/home/user/Im a folder with libs to install/»
make[1]: *** [install-recursive] Error 1
make[1]: se sale del directorio «/home/user/Im a folder with libs to install/»
make: *** [install-recursive] Error 1
It can locate the folder, but it seems that, internally, it passes the path to Linux bash with no scape characters.
I'm accepting nafas as the answer because he helped me to locate the source of the problem.
You should be able to replace spaces with their escaped versions.
Try:
path_to_dir = path_to_dir.replace(" ", "\\ ")
Also, think about replacing all special characters like '&', '<', '>', '|', '*', '?', etc. in the string which are not permitted in filename and must be escaped
path_to_dir = path_to_dir.replace(" ", "\\ ").replace("?", "\\?").replace("&", "\\&").replace("(", "\\(").replace(")", "\\)").replace("*", "\\*").replace("<", "\\<").replace(">", "\\>")
skip the spaces using \
e.g. :
Im\ a\ folder\ with\ libs\ to\ install
I have clone the latest linux source from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
And compile this kernel using (make O=/usr/local/kernel).
But when i install the kernel the following error getting,
# make O=/usr/local/kernel modules_install install
make[1]: Entering directory `/usr/local/kernel'
rm: invalid option -- '0'
Try 'rm --help' for more information.
make[1]: *** [_modinst_] Error 1
make: *** [sub-make] Error 2
I faced the same issue today (24/1/20) and after a bit of searching, I decided to remove the # in front of each line in modinst target in Makefile. The problem was immediately visible to me. If you add space in extra version, the space will appear in your folder name. So, if you write extra version as
EXTRAVERSION= -test[un-noticed-space-here]
Your module folder name will also have that space. To avoid it, I tried the following
Made sure that there are no spaces at the end of version lines in Makefile
Did "make kernelversion" and made sure that it is devoid of any space character
Did a
echo -n `make kernelversion`| wc
and reconfirmed above point by comparing wc output and the count of characters from previous step
I'm trying to build trace-cmd.git from source; the worst is, I had already built this once on this same machine, succesfully; however didn't keep any notes, and cannot tell what could have happened in the meantime.
So now I'm trying to rebuild, and I get the dreaded:
trace-cmd$ make
make: *** No rule to make target `/media/disk/trace-cmd/event-parse.c', needed by `event-parse.o'. Stop.
Ok, let's see what the debug says:
trace-cmd$ make -d
...
Successfully remade target file `trace_python_dir'.
Pruning file `tc_version.h'.
Considering target file `libparsevent.a'.
Considering target file `event-parse.o'.
Pruning file `/media/disk/src/trace-cmd/event-parse.c'. ## THIS EXISTS!
Pruning file `.event-parse.d'.
Considering target file `/media/disk/trace-cmd/event-parse.c'. ## THIS DOESN'T???
File `/media/disk/trace-cmd/event-parse.c' does not exist.
...
Trying pattern rule with stem `event-parse.w'.
Trying implicit prerequisite `/media/disk/trace-cmd/SCCS/s.event-parse.w'.
Trying pattern rule with stem `event-parse'.
Rejecting impossible implicit prerequisite `/media/disk/trace-cmd/event-parse.w'.
No implicit rule found for `/media/disk/trace-cmd/event-parse.c'.
Finished prerequisites of target file `/media/disk/trace-cmd/event-parse.c'.
Must remake target `/media/disk/trace-cmd/event-parse.c'.
make: *** No rule to make target `/media/disk/trace-cmd/event-parse.c', needed by `event-parse.o'. Stop.
OK, what is going on? Of course the actual file exists:
trace-cmd$ ls -la /media/disk/src/trace-cmd/event-parse.c
-rw-r--r-- 1 user user 121563 2013-03-20 19:03 /media/disk/src/trace-cmd/event-parse.c
... but this is /media/disk/src/trace-cmd/event-parse.c!! And:
make already found it once;
yet make decided to, for some reason, drop the /src/ from the path,
... and that file obviously doesn't exist:
trace-cmd$ ls /media/disk/trace-cmd/event-parse.c
ls: cannot access /media/disk/trace-cmd/event-parse.c: No such file or directory
Can someone explain me, for what possible reason could make decide to drop a part of the path, such that it cannot find a file, that it originally had a correct reference to?
Got it - thought I'd focus on that .event-parse.d file:
trace-cmd$ head -n 4 .event-parse.d
event-parse.o: /media/disk/trace-cmd/event-parse.c \
/usr/include/stdio.h /usr/include/features.h /usr/include/bits/predefs.h \
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h \
... and indeed, that is the wrong path there... What happens if I delete this .d file?
trace-cmd$ rm .event-parse.d
trace-cmd$ make
COMPILE FPIC event-parse.o
make: *** No rule to make target `/media/disk/trace-cmd/trace-seq.c', needed by `trace-seq.o'. Stop.
Oh, my. There must be more of them:
trace-cmd$ ls .*.d
.event-parse.d .plugin_kmem.d .trace-filter.d .trace-options.d .trace-seq.d
.kbuffer-parse.d .plugin_kvm.d .trace-ftrace.d .trace-output.d .trace-split.d
.kernel-shark.d .plugin_mac80211.d .trace-graph.d .trace-plot-cpu.d .trace-stack.d
...
... and indeed, there are; apparently cached files from previous compilation, where indeed I compiled in another directory. And if I delete them all:
trace-cmd$ rm .*.d
trace-cmd$ make
...
gcc --shared event-parse.o trace-seq.o parse-filter.o parse-utils.o trace-util.o trace-input.o trace-ftrace.o trace-output.o trace-recorder.o trace-restore.o trace-usage.o trace-blk-hack.o kbuffer-parse.o ctracecmd_wrap.o -o ctracecmd.so
Note: to build the gui, type "make gui"
to build man pages, type "make doc"
Well, that seemingly worked; I'm back to being happy again :)
Cheers!
I am new to Linux and makefiles. I have a makefile which generates .a files.
When I run the makefile, I get the following error. I have no idea from which part of the code, the error occurs.
[oracle#dyl02703app004 erm]# make -f erm_make_ida all
.... Compiling /home/wholesale/children/dev5/comps/erm/obj/ermparseyac.c
cc -g -DANSI -D -DTRACE_ON -DIDA_VERSION='"ISP-RG-V5.10.7GEN2A"' -DNO_MCP -DBUILDING_ERP -I/home/wholesale/children/dev5/comps/erm/include -I/home/wholesale/children/dev5/comps/erm/src -I/home/wholesale/children/dev5/comps/erm/module_test -I/home/wholesale/children/dev5/comps/erm/include -I/home/wholesale/children/dev5/comps/cfm/include -c /home/wholesale/children/dev5/comps/erm/src/ermparseyac.c -o /home/wholesale/children/dev5/comps/erm/obj/ermparseyac.o
<command line>:1:1: error: macro names must be identifiers
make: *** [/home/wholesale/children/dev5/comps/erm/obj/ermparseyac.o] Error 1
Any suggestions...?
You have a -D flag with no name. Look in your makefile to see what is causing it.