Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Autotools with CygWin
Autotools with CygWin [message #7388] Tue, 31 March 2009 11:03 Go to next message
Eclipse UserFriend
Originally posted by: paul.mcconkey.net

Hi

I have spent some time trying to get an autotools project to work with
Eclipse using CygWin, but not successfully.

The project (vlc) configures fine from CygWin bash, but the closest I have
come to getting it to configure using the Autoconf plug-in is a pretty
general error that configuration has failed.

I know very little about CygWin and less about autotools and I have now
abandoned the attempt and I am configuring from bash and just using a
standard c make project.

I'd like to have another go, so if anyone has some experience with this type
of setup any pointers would be gratefully received.

Cheers,

Paul.
Re: Autotools with CygWin [message #7399 is a reply to message #7388] Tue, 31 March 2009 16:19 Go to previous messageGo to next message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
Paul McConkey wrote:

> Hi

> I have spent some time trying to get an autotools project to work with
> Eclipse using CygWin, but not successfully.

> The project (vlc) configures fine from CygWin bash, but the closest I have
> come to getting it to configure using the Autoconf plug-in is a pretty
> general error that configuration has failed.

> I know very little about CygWin and less about autotools and I have now
> abandoned the attempt and I am configuring from bash and just using a
> standard c make project.

> I'd like to have another go, so if anyone has some experience with this type
> of setup any pointers would be gratefully received.

Hi Paul,

The Autotools plugin hasn't been tested with CygWin but we don't restrict
it from being used there. If you could provide a bit more information,
that would be helpful. For example, is the configuration script in the
top-level directory of the project? Can you elaborate on the contents of
the configuration console? It is possible that there is a path issue that
isn't being prepared for.

-- Jeff
Re: Autotools with CygWin [message #7408 is a reply to message #7399] Fri, 03 April 2009 09:46 Go to previous message
Eclipse UserFriend
Originally posted by: paul.mcconkey.net

> The Autotools plugin hasn't been tested with CygWin but we don't restrict
> it from being used there.

Hi Jeff,

Thanks for the response, it encouraged me to spend another day seeing how I
could get this to work. I have had better luck, but I still have some
problems, which I am fairly sure are down to some problems with path
construction and executable search paths (PATH env variable).

I've made some notes below on what I did, which may help others in future,
but for now I am going to go back to using command line autotools to
configure and I'll just use Eclipse to edit, make and debug.

To try and get VLC bulding:
I have checked out a copy of the project into a new folder (called vlc) in
my Eclipse workspace using git and then created a new GNU C Autotools
Project from File->New->Project..., specifying the vlc folder.

The project has a configure script in the workspace/vlc folder, and the
script works fine when I run it from the CygWin shell (bash). I have a short
shell script that I run that sets up the environment first, shown below in
case it is relevant:

PATH=/usr/win32/bin:$PATH \
PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
LDFLAGS=-L/usr/win32/lib \
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
../configure \
--host=i686-pc-mingw32 \
--There follows a load of project specific settings ...

I have added the environment variables in the script above to the
Environment property page under Project Properties->C/C++ Build. Oddly, the
script above works fine with bash, but using Eclipse gives errors to do
with:

1. Double quotes are not required in the Eclipse environment vars and if ""
is added it is just passed through. So I removed the "s fro my CC, CXX,
CCFLAGS & CPPFLAGS vars.

2. The configuration script fails to get the version of gcc as my CC
variable includes a switch and the version call gest translated into
gcc -mno_cygwin -V which fails as -V must be the first switch. So I
moved -mno_cygwin to CPPFLAGS.

I then added the switches for the configuration script to the C/C++
Build->Settings->Tool Settings property page under configure->Features and
packages and enabled maintainer mode.

Delete build from Build Directory - the project doesn't use a build folder.

Now, when Eclipse is behaving and the console is able to find and launch the
autotools binaries, it looks as if my configure works OK. Or at least it is
mostly OK. When the makefile is executed the build is mostly OK but I think
that some strangeness has occurred when configuring. At one point one of the
defines in config.h was output on two lines:

#define VLC_COMPILE_HOST "Paul
"

I'm not sure that I changed anything to fix this, but a distclean and
rebuild then produced the correct output. I have tried a few small changes
to the environment vars and now my build is failing again with Eclispe
unable to find sh. At this point I lost my presence of mind and gave up!

Cheers,

Paul.
Re: Autotools with CygWin [message #565888 is a reply to message #7388] Tue, 31 March 2009 16:19 Go to previous message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
Paul McConkey wrote:

> Hi

> I have spent some time trying to get an autotools project to work with
> Eclipse using CygWin, but not successfully.

> The project (vlc) configures fine from CygWin bash, but the closest I have
> come to getting it to configure using the Autoconf plug-in is a pretty
> general error that configuration has failed.

> I know very little about CygWin and less about autotools and I have now
> abandoned the attempt and I am configuring from bash and just using a
> standard c make project.

> I'd like to have another go, so if anyone has some experience with this type
> of setup any pointers would be gratefully received.

Hi Paul,

The Autotools plugin hasn't been tested with CygWin but we don't restrict
it from being used there. If you could provide a bit more information,
that would be helpful. For example, is the configuration script in the
top-level directory of the project? Can you elaborate on the contents of
the configuration console? It is possible that there is a path issue that
isn't being prepared for.

-- Jeff
Re: Autotools with CygWin [message #565907 is a reply to message #7399] Fri, 03 April 2009 09:46 Go to previous message
Paul McConkey is currently offline Paul McConkeyFriend
Messages: 10
Registered: July 2009
Junior Member
> The Autotools plugin hasn't been tested with CygWin but we don't restrict
> it from being used there.

Hi Jeff,

Thanks for the response, it encouraged me to spend another day seeing how I
could get this to work. I have had better luck, but I still have some
problems, which I am fairly sure are down to some problems with path
construction and executable search paths (PATH env variable).

I've made some notes below on what I did, which may help others in future,
but for now I am going to go back to using command line autotools to
configure and I'll just use Eclipse to edit, make and debug.

To try and get VLC bulding:
I have checked out a copy of the project into a new folder (called vlc) in
my Eclipse workspace using git and then created a new GNU C Autotools
Project from File->New->Project..., specifying the vlc folder.

The project has a configure script in the workspace/vlc folder, and the
script works fine when I run it from the CygWin shell (bash). I have a short
shell script that I run that sets up the environment first, shown below in
case it is relevant:

PATH=/usr/win32/bin:$PATH \
PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
LDFLAGS=-L/usr/win32/lib \
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
../configure \
--host=i686-pc-mingw32 \
--There follows a load of project specific settings ...

I have added the environment variables in the script above to the
Environment property page under Project Properties->C/C++ Build. Oddly, the
script above works fine with bash, but using Eclipse gives errors to do
with:

1. Double quotes are not required in the Eclipse environment vars and if ""
is added it is just passed through. So I removed the "s fro my CC, CXX,
CCFLAGS & CPPFLAGS vars.

2. The configuration script fails to get the version of gcc as my CC
variable includes a switch and the version call gest translated into
gcc -mno_cygwin -V which fails as -V must be the first switch. So I
moved -mno_cygwin to CPPFLAGS.

I then added the switches for the configuration script to the C/C++
Build->Settings->Tool Settings property page under configure->Features and
packages and enabled maintainer mode.

Delete build from Build Directory - the project doesn't use a build folder.

Now, when Eclipse is behaving and the console is able to find and launch the
autotools binaries, it looks as if my configure works OK. Or at least it is
mostly OK. When the makefile is executed the build is mostly OK but I think
that some strangeness has occurred when configuring. At one point one of the
defines in config.h was output on two lines:

#define VLC_COMPILE_HOST "Paul
"

I'm not sure that I changed anything to fix this, but a distclean and
rebuild then produced the correct output. I have tried a few small changes
to the environment vars and now my build is failing again with Eclispe
unable to find sh. At this point I lost my presence of mind and gave up!

Cheers,

Paul.
Previous Topic:Autotools with CygWin
Next Topic:eclipse and Linux
Goto Forum:
  


Current Time: Thu Apr 25 08:34:05 GMT 2024

Powered by FUDForum. Page generated in 0.03602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top