Can not run configure with cygwin gcc

1,877 views
Skip to first unread message

Dale Pepoon

unread,
Jan 20, 2014, 9:58:48 PM1/20/14
to cppu...@googlegroups.com, dpe...@one.net
I am unable to get the CppUTest configure command to run.  I get the following errors...

command not found

Dale@GateWayComputer ~
$ cd c:

Dale@GateWayComputer /cygdrive/c
$ cd githome

Dale@GateWayComputer /cygdrive/c/githome
$ cd cpputest

Dale@GateWayComputer /cygdrive/c/githome/cpputest
$ cd cpputest

Dale@GateWayComputer /cygdrive/c/githome/cpputest/cpputest
$ configure
-bash: configure: command not found

Dale@GateWayComputer /cygdrive/c/githome/cpputest/cpputest
$ ls
aclocal.m4      CppUTest.vcproj         Makefile_using_MakefileWorker
AUTHORS         CppUTest.vcxproj        makeVc6.bat
build           cpputest_doxy_gen.conf  makeVS2008.bat
builds          CppUTest_VS2008.sln     makeVS2010.bat
ChangeLog       CppUTest_VS2010.sln     missing
cmake           cpputest-hist.txt       NEWS
CMakeLists.txt  depcomp                 platforms
compile         docs                    project
config.guess    Doxyfile                README
config.h.cmake  examples                README.md
config.h.in     include                 README_CppUTest_for_C.txt
config.sub      INSTALL                 README_InstallCppUTest.txt
configure       install-sh              README_UsersOfPriorVersions.txt
configure.ac    lib                     scripts
COPYING         ltmain.sh               src
CppUTest.dsp    m4                      test-driver
CppUTest.dsw    Makefile.am             tests
CppUTest.mak    Makefile.in             valgrind.suppressions
cpputest.pc.in  Makefile_CppUTestExt

Dale@GateWayComputer /cygdrive/c/githome/cpputest/cpputest
$

As you can see from the ls command the configure file is there in the current directory.
This happened first on a Windows 8 box, so i tried it on Windows XP and got the same result.

I am new to the cygwin gcc world so I am guessing that it is something simple that I am not doing....

Here are the steps that I have taken.
- Download and install GIT
- use GIT to clone CppUTest Repository.  (The content of the repository ended up one directory lower than I expected on this box.  On Windows 8 box I used SourceTree and it ended up where I expected it)
- use cygwin setup-x86.exe to download and install the cygwin packegs.
under the Devel category I have the following packages on the Windows XP box:
- binutils
- cmake
- gcc-core
- gcc-g++
- gdb
- libatomic1
- libcloog-isl4
- libgcc1
- libgomp1
- libssp0
- libstc++6
- nake
- makedepend
- mcpp
- win32api-headers
- win32api-runtime

- add c:\cygwin\bin to the windows path command..

Let me know if there are any questions.  Any help would be greatly appreciated.

Thanks
dp

Message has been deleted

Dale Pepoon

unread,
Jan 20, 2014, 10:05:26 PM1/20/14
to cppu...@googlegroups.com, dpe...@one.net
Additionally if I use the  ./configure  command as I have seen some refer to...(I do not know what the difference is)  I get the following:
Dale@GateWayComputer /cygdrive/c/githome/cpputest/cpputest
$ ./configure
./configure: line 18: $'\r': command not found
./configure: line 33: syntax error near unexpected token `newline'
'/configure: line 33: `     ;;

Ryan Hartlage

unread,
Jan 20, 2014, 10:19:38 PM1/20/14
to cppu...@googlegroups.com
Dale,

The configure/make business in CppUTest is from GNU's autotools.  I'm not an expert, but you *might* need to install autoconf, automake, and libtool in Cygwin.

Also, the difference between "./configure" and "configure" is that the "./" says to look in the current folder (".") to execute the command.  This is needed if "." is not on your execution path: http://en.wikipedia.org/wiki/PATH_%28variable%29

Ryan


--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dale Pepoon

unread,
Jan 21, 2014, 12:55:00 AM1/21/14
to cppu...@googlegroups.com
Ryan,
Thanks for the quick reply...
I tried adding the additional packages.  Looks like I got a lot of other packages as well due to dependencies.  However there was no change in the results that I was getting.

However, I have found the source of the problem and the solution.
Problem:
  It seemed that the script processor was complaining about '\r" and unexpected newlines.
  With a few edits I was able to get past the first and second error but then there were more errors of the same type.

Solution.
  Respond properly to the GIT Setup prompt "Configuring the line ending conversions".....
There are three options:
1) Checkout Windows style, commit Unix-style line ending (Default)
2) Checkout as-is, commit Uniix-style line ending
3) Checkout as-is, commit as-is

Originally I selected option 1, which I believe caused my problem.
I changed to option 2 and re-cloned the cpputest repository.
I was able to run the ./configure without error.

So I am on my way to the next step.

BTW, what is the recommended selection for this option?
option 2 seems to be the best option for the script that is run by cygwin.
What is the best for the code that will be used in eclipse on Windows?

Thanks
dp

A. Robert S.

unread,
Jan 21, 2014, 11:56:08 AM1/21/14
to cppu...@googlegroups.com
Dale,
 
In my experience, you get all necessary packages by just installing GCC-core, GCC-C++ and GDB (if all you want is simply compile, not change the configure script itself). The cygwin installer adds the necessary packages automatically. Obviously, that wasn't true for your existing installation... But this shouldn't really be an issue with a fresh installation of Cygwin 1.7.17.
 
The Cygwin bash has a quirk (in my opinion), because:
 
$ ./configure
 
will work but
 
$ configure
 
will not. The same goes of course for ANY *nix command or shell script! Other shells will accept both (e.g. msys).
 
Cheers,
Robert

On Tuesday, January 21, 2014 6:55:00 AM UTC+1, Dale Pepoon wrote:
Reply all
Reply to author
Forward
0 new messages