Welcome to the Builder Academy

Question Unable to configure on pulling down from github

More
18 Jul 2015 16:47 #5445 by aredcloak19
Ok with my laptop, I running cygwin and I just redownloaded just in case that I edited something that I shouldn't have, but I get the same error. This is the configure. Any help would be greatly appreciated.
Code:
$ ./configure ./configure: line 2: $'\r': command not found ./configure: line 9: $'\r': command not found ./configure: line 14: $'\r': command not found ./configure: line 48: $'\r': command not found ./configure: line 55: $'\r': command not found ./configure: line 58: syntax error near unexpected token `$'do\r'' '/configure: line 58: `do

I'm the one that people say, "How did you break this and what did you do to break it."

Please Log in or Create an account to join the conversation.

More
19 Jul 2015 03:54 #5446 by krell
It looks like you have carriage return characters in your code. Can you strip that string out with a search and replace in your editor?

Please Log in or Create an account to join the conversation.

More
28 Jul 2015 09:29 - 28 Jul 2015 10:36 #5467 by aredcloak19
I've tried, but I keep getting a new line error within it. I'm still trying things, but I can't seem to figure it out.

after starting over

With a fresh pull from github and the few spaces that were easy to fix for the windows version. By the way it doesn't do this on Linux only windows. I have it running on a vm of Linux Mint and works perfectly fine.
Code:
$ ./configure ./configure: line 53: syntax error near unexpected token `$'do\r'' '/configure: line 53: `do


After actually asking someone in another code base. I got it to work. The solution was converting the configure and autorun file to unix with that code below.
Code:
dos2unix configure dos2unix autorun

This is what my configure file looks like with the modification and still with the error in line 53.
Code:
#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; ----- omitted ----

I'm the one that people say, "How did you break this and what did you do to break it."
Last edit: 28 Jul 2015 10:36 by aredcloak19. Reason: adding the autorun to it because you get the same error with the carriages

Please Log in or Create an account to join the conversation.

More
28 Jul 2015 13:10 #5468 by krell

aredcloak19 wrote: After actually asking someone in another code base. I got it to work. The solution was converting the configure and autorun file to unix with that code below.

Code:
dos2unix configure dos2unix autorun


Yeah, dos2unix() would strip the trailing /r's off the code and leave only /n's which C compilers expect.

This is what my configure file looks like with the modification and still with the error in line 53.


I'm not sure I understand. Is it working now or are you still getting errors? What is your new error in that case?

Please Log in or Create an account to join the conversation.

More
28 Jul 2015 19:16 #5469 by aredcloak19
Its working now with the dos2unix command. I can bootup now and do everything that everyone can normally do.

Alexandra

I'm the one that people say, "How did you break this and what did you do to break it."

Please Log in or Create an account to join the conversation.

More
28 Jul 2015 20:17 #5470 by krell

Please Log in or Create an account to join the conversation.

Time to create page: 0.336 seconds