1

I'm using Cygwin on Windows 7, 64-bit. I downloaded the 4.8.3. source and followed the instructions here, putting <qtdir>/bin in PATH along with the path to my chosen compiler. Configure fails immediately,

$ ./configure

Creating qmake. Please wait... g++ -c -o makefile.o -pipe -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/cygdrive/c/Qt/4.8.3/include -I/cygdrive/c/Qt/4.8.3/include/QtCore -I/cygdrive/c/Qt/4.8.3/src/corelib/global -I/cygdrive/c/Qt/4.8.3/src/corelib/xml -I/cygdrive/c/Qt/4.8.3/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/cygdrive/c/Qt/4.8.3/mkspecs/cygwin-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED generators/makefile.cpp

In file included from ./option.h:45:0, from generators/makefile.h:45, from generators/makefile.cpp:42: ./project.h:45:25: fatal error: qstringlist.h: No such file or directory compilation terminated. make: *** [makefile.o] Error 1

Discussions here and here identify the problem as being with Perl; however Perl is on my system and on the path. To be sure I went and downloaded/installed ActivePerl, after which I added Perl64/bin to the path. Same result. Would very much appreciate some help out with this.

Edit, for completeness:

$ whereis perl

perl: /bin/perl.exe /usr/bin/perl.exe /usr/share/perl /cygdrive/c/Perl64/bin/perl.exe /cygdrive/c/Perl64/bin/perl516.dll

$ echo $PATH

/cygdrive/c/Perl64/bin:/cygdrive/c/gcc/bin:/bin: ... /cygdrive/c/Qt/4.8.3/bin

Edit: The line that fails is:

#include <qstringlist.h>

This specific error goes away if I replace with an absolute path. (Of course, numerous other errors then arise.) Yet

$whereis qstringlist.h

qstringlist: /cygdrive/c/Qt/4.8.3/include/QtCore/qstringlist.h

which is explicitly -I included in the g++ command, and FWIW

$echo $PATH

... /cygdrive/c/Qt/4.8.3/include/QtCore

Edit: Adding -I/cygdrive/c/Qt/4.8.3/include/QtCore as an explicit option to ./configure does nothing. Seriously, what is going on here...

Update: This question is now effectively worth 250 rep., see here.

Community
  • 1
  • 1
Matt Phillips
  • 9,465
  • 8
  • 44
  • 75
  • to me the problem seems to be that the compiler is set to cygwin-g++ and it complains that it doesn't know how to create projects for this type of compiler – Mihai Sebea Nov 04 '12 at 10:30
  • @MihaiSebea Indeed I am trying to compile under cygwin-g++ but could you explain more where you think the problem is arising for it? cygwin-g++ is included in Qt's `mkspecs` directory. Moreover it happens whether I include `-platform cygwin-g++` or not, I would have expected `mingw` to be the default. – Matt Phillips Nov 04 '12 at 10:36
  • Phillis As far as i can tell cygwin is supported only under linux .. http://lists.qt.nokia.com/pipermail/qt-interest/2009-September/012377.html since on windows there is a different folder structure that is not supported . – Mihai Sebea Nov 04 '12 at 10:46
  • 2
    @MihaiSebea http://www.cygwin.com/ Cygwin is a Windows program. – Matt Phillips Nov 04 '12 at 10:49

2 Answers2

1

Please, take a look to supported platforms, there you have instructions on supported compilers, which could give you hints on your problem.

As far as i read, in recent windows you need MSVC, and I don't see anything about cygwin.

kikeenrique
  • 2,589
  • 2
  • 25
  • 46
  • I hadn't seen this, that's pretty interesting. However, ultimately you should be able to build Qt from source from any compiler no? So the fact that they haven't specifically tested it for g++ doesn't mean you shouldn't be able to do it. In the installation instructions they specifically discuss how you can pick alternate platforms. That you can't get g++ to see the path that qstringlist.h is on is pretty hard to believe. – Matt Phillips Nov 08 '12 at 14:53
  • BTW, Have you used just plain ./configure or have you used any modifiers? Check: http://qt-project.org/doc/qt-4.8/configure-options.html and http://qt-project.org/doc/qt-4.8/install-win.html. For example: configure -platform win32-g++ – kikeenrique Nov 08 '12 at 15:11
  • Yes I supply the cygwin-g++ or win32-g++ arguments for the `-platform` option and get the above result. `./configure` probably defaults to one of these. – Matt Phillips Nov 08 '12 at 15:31
  • 2
    and ./configure.exe? Here someone said it helped him :http://osdir.com/ml/MinGW-users/2012-04/msg00092.html – kikeenrique Nov 08 '12 at 15:38
  • And I would recommend taking a look to http://cygwinports.org/, they seem to have patches to compile QT. http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/qt4;a=summary – kikeenrique Nov 08 '12 at 15:40
  • Ok I'm away from my machine right now but I will look into all of these. – Matt Phillips Nov 08 '12 at 17:33
  • 1
    @kikeenrique 9 years later, just wanted to say thank you. After struggling with this issue for ~a week and not finding answers anywhere, tracking down configure.exe and using that instead of the script finally helped. Thank you so much! – ArchAlessus Jul 29 '21 at 11:47
0

What is the exact configure lines you are using? Try this:

./configure -I/cygdrive/c/Qt/4.8.3/include/

If it is still complaining about not being able to find the headers, then that is bizarre indeed. Another option you can try is:

INCLUDE_PATH=/cygdrive/c/Qt/4.8.3/include/ ./configure
Michael
  • 3,151
  • 2
  • 22
  • 27