I followed the instruction in this page, but "cd tg && ./configure" command throws the following errors:
./configure: line 14: $'\r': command not found
./configure: line 29: syntax error near unexpected token `newline'
'/configure: line 29: ` ;;
no idea where should I look for the problem.
Related
I was building a C automake project. Running "aclocal" is showing the following error.
$ aclocal
' is already registered with AC_CONFIG_FILES./usr/src/ports/autoconf2.5/autoconf2.5-2.69-3.noarch/src/autoconf-2.69/lib/autoconf/status.m4:288: AC_CONFIG_FILES is
expanded from...
configure.ac:890: the top level
autom4te-2.69: /usr/bin/m4 failed with exit status: 1
aclocal-1.15: error: echo failed with exit status: 1
I am using Cygwin on windows 10.
The configure.ac has the following from the line 886 to the end.
# ----------------------------------------------------------------------
# Create output files
#
echo $SLIM_VERSION > VERSION
AC_OUTPUT(Makefile \
src/Makefile \
src/genconfig \
src/verifier/Makefile \
src/utility/Makefile \
src/test/Makefile \
lib/Makefile \
ext/Makefile \
test/Makefile \
test/system_check/Makefile \
third_party/Makefile \
third_party/zdelta-2.1/Makefile \
third_party/google-perftools-1.8.3/Makefile \
third_party/google-perftools-1.8.3/src/google/tcmalloc.h \
third_party/google-perftools-1.8.3/src/windows/google/tcmalloc.h \
doc/Makefile \
doc/slim.1)
As suggested, I used "dos2unix" on every "*.am" files and "configure.ac", but running "make" is showing the following error.
configure.ac:596: the top level
cd ../.. && /bin/sh ./config.status third_party/zdelta-2.1/Makefile depfiles
config.status: creating third_party/zdelta-2.1/Makefile
config.status: executing depfiles commands
source='deflate.c' object='deflate.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
gcc -DHAVE_CONFIG_H -I. -I../../src -Wall -export-dynamic -O3 -fopenmp -c -o deflate.o deflate.c
../../depcomp:行2: $'\r': 未找到命令
../../depcomp:行5: $'\r': 未找到命令
../../depcomp:行10: $'\r': 未找到命令
../../depcomp:行15: $'\r': 未找到命令
../../depcomp:行20: $'\r': 未找到命令
../../depcomp:行25: $'\r': 未找到命令
../../depcomp:行27: $'\r': 未找到命令
../../depcomp:行64: 未预期的符号 `$'in\r'' 附近有语法错误
'./../depcomp:行64: `case "$depmode" in
make[2]: *** [Makefile:419:deflate.o] 错误 2
make[2]: 离开目录“/cygdrive/c/LaViT2_8_9/lmntal/slim-lightweight-
hlground/third_party/zdelta-2.1”
make[1]: *** [Makefile:386:all-recursive] 错误 1
make[1]: 离开目录“/cygdrive/c/LaViT2_8_9/lmntal/slim-lightweight-
hlground/third_party”
make: *** [Makefile:425:all-recursive] 错误 1
Here,
行2: $'\r': 未找到命令
means
line 2: $'\r': cannot find the command
Could anyone help me fix this issue?
It's effectively certain that your issue is caused by DOS newlines.
The giveaway is this error:
' is already registered with AC_CONFIG_FILES./usr/src/ports/autoconf2.5/autoconf2.5-2.69-3.noarch/src/autoconf-2.69/lib/autoconf/status.m4:288: AC_CONFIG_FILES is
The line beginning with ' is already registered with implies that the cursor was sent back to the beginning of the line partway through writing the line to the console -- the exact behavior of printing a string read from a DOS-format text file while it expecting it to be in UNIX format.
Configuring git to check out text files in UNIX format
git config --global core.autocrlf false
git config --global core.eol lf
I am trying to compile the simpleLite.c example from the ARToolKit5 examples page. If I run the .app file, it works fine. I wanted to see if I could modify anything in the file, so I tried to make the file again but I get the errors:
./Makefile.in: line 49: ../../include: is a directory
./Makefile.in: line 50: ../../lib: is a directory
./Makefile.in: line 51: ../../bin: is a directory
./Makefile.in: line 54: LIB_DIR: command not found
./Makefile.in: line 54: LIB_DIR: command not found
./Makefile.in: line 54: -L/#SYSTEM#: No such file or directory
./Makefile.in: line 55: -lARgsub_lite: command not found
./Makefile.in: line 56: INC_DIR: command not found
./Makefile.in: line 56: #CFLAG#: command not found
./Makefile.in: line 58: OBJS: command not found
./Makefile.in: line 59: HEADERS: command not found
./Makefile.in: line 61: BIN_DIR: command not found
./Makefile.in: line 61: all:: command not found
./Makefile.in: line 63: BIN_DIR: command not found
./Makefile.in: line 63: OBJS: command not found
./Makefile.in: line 63: /simpleLite:: No such file or directory
./Makefile.in: line 64: BIN_DIR: command not found
./Makefile.in: line 64: OBJS: command not found
./Makefile.in: line 64: LDFLAG: command not found
./Makefile.in: line 64: LIBS: command not found
clang: error: no such file or directory: 'simpleLite.o'
clang: error: no input files
./Makefile.in: line 66: HEADERS: command not found
./Makefile.in: line 66: simpleLite.o:: command not found
./Makefile.in: line 67: CFLAG: command not found
simpleLite.c:68:10: fatal error: 'AR/config.h' file not found
#include <AR/config.h>
^~~~~~~~~~~~~
1 error generated.
./Makefile.in: line 69: clean:: command not found
./Makefile.in: line 71: BIN_DIR: command not found
./Makefile.in: line 73: allclean:: command not found
./Makefile.in: line 75: BIN_DIR: command not found
./Makefile.in: line 78: distclean:: command not found
The folder contains three files, a makefile.in, a .plist file and the .c source code. The AR/config.h folder exists elsewhere in the ARToolKit5 archive (ARToolKit5/include/AR).
Normally, I'd assume I need to specify the path from the source folder, but there are also include statements like # include <GLUT/glut.h>, which aren't throwing errors.
I'm fairly new/rusty to C development, so I'm not sure what even to look up to fix this issue. Can anyone point me in the right direction? Do I need to specify the header paths, or is it something less obvious?
I'm trying to setup thrift-0.9.2 for scribe on Ubuntu 14.04 and I'm running into the following problem during the build process. Does anyone know how to fix this?
/bin/bash ../../libtool --tag=CXX --mode=link g++ -Wall -Wextra -pedantic -g -O2 -std=c++11 -o thrift thrift-main.o thrift-md5.o thrift-t_generator.o thrift-t_typedef.o thrift-parse.o thrift-t_c_glib_generator.o thrift-t_cpp_generator.o thrift-t_java_generator.o thrift-t_json_generator.o thrift-t_as3_generator.o thrift-t_csharp_generator.o thrift-t_py_generator.o thrift-t_rb_generator.o thrift-t_perl_generator.o thrift-t_php_generator.o thrift-t_erl_generator.o thrift-t_cocoa_generator.o thrift-t_st_generator.o thrift-t_ocaml_generator.o thrift-t_hs_generator.o thrift-t_xsd_generator.o thrift-t_html_generator.o thrift-t_js_generator.o thrift-t_javame_generator.o thrift-t_delphi_generator.o thrift-t_go_generator.o thrift-t_gv_generator.o thrift-t_d_generator.o thrift-t_lua_generator.o -lfl libparse.a
../../libtool: eval: line 6459: unexpected EOF while looking for matching `"'
../../libtool: eval: line 6460: syntax error: unexpected end of file
I'm trying to setup thrift v0.10.0 and have ran into the same problem just like yours:
../../../libtool: eval: line 6458: unexpected EOF while looking for matching `"'
../../../libtool: eval: line 6459: syntax error: unexpected end of file
In libtool, line 6458 and line 6459 is:
6457 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
6458 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
6459
and i changed " to ', then it comes:
6457 eval sys_lib_search_path='\$sys_lib_search_path_spec'
6458 eval sys_lib_dlsearch_path='\$sys_lib_dlsearch_path_spec'
6459
Until now, i have fixed the problem, maybe you can have a try!
I'm a bit of a beginner with using ubuntu/C/SDL, so i'm unsure how to do this.
I have a project where i have to simulate a bird flock with the boids algorithm. I have done the algorithm, in the respect that you could put in a target array (e.g. a 2 number array containing the X and Y position of the target point) as input, and you get the position of each member of the flock as output. Put this in an infinite loop, and the positions of the birds will be continuously updated.
I'm now supposed to use the mouse pointer to get that target array. I've been supplied with a SDL framework somebody else has programmed. The instructions to get it working where:
Change the values in the makefile for LIBS INCLUDES and CXXFLAGS, with the values found by typing sdl-config --libs, and sdl-config --cflags into the command window.
If i type sdl-config --libs into the command window, i get:
-L/usr/lib/i386-linux-gnu -lSDL
Typing sdl-config --cflags yields:
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
I typed those in as posted below, but i cant compile the main program. Compiling with "gcc main.c -o exe" gives the error message:
main.c:4:17: fatal error: SDL.h: No such file or directory
compilation terminated.
I also tried to execute the makefile with ./Makefile, and get a list of errors starting with:
./Makefile: line 1: CXX: command not found
./Makefile: line 4: LIBS: command not found
./Makefile: line 5: INCLUDES: command not found
./Makefile: line 6: CXXFLAGS: command not found
./Makefile: line 8: GETSCANS: command not found
./Makefile: line 9: GETSCANS_OBJS: command not found
How do i get it working?
main.c:
Ok, apparently you have to type "make" into the command window aswell.
I am getting this error while running this command
[root#himanshi busybox-1.20.2]# make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- CONFIG_PREFIX=/home/himanshi/beagleboard_xm/target install
/home/himanshi/beagleboard_xm/build/busybox-1.20.2/scripts/gcc-version.sh: line 11: arm-unknown-linux-gnueabi-gcc: command not found
CC applets/applets.o
/bin/sh: arm-unknown-linux-gnueabi-gcc: command not found
make[1]: *** [applets/applets.o] Error 127
make: *** [applets_dir] Error 2
Infact I am getting error COMMAND NOT FOUND for this also::
make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi-
Please assist me for solving this problem.
Thank you
Himanshi
you should put the path of arm-unknown-linux-gnueabi-gcc in the PATH environment variable like this:
PATH=$PATH:/path/to/compiler
export PATH