0

I've downloaded the source for QT 5.6.0 and I'm attempting to compile/install it on a Cygwin installation for Windows.

The Cygwin build already has Qt4 and Qt3 libraries installed. Trying to upgrade so I can install the latest QtCreator suite.

Here is my Cygwin version via uname -a:

CYGWIN_NT-10.0 J_Mick-Windoze 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64 Cygwin

When I try to compile QT 5.6.1 via running ./configure -platform cygwin-g++ -prefix $PWD/qtbase -opensource -nomake tests I get the following error:

Running configuration tests (phase 1)...
Done running configuration tests.
Creating qmake...
.In file included from /home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0/QtCore/private/qcore_unix_p.h:1:0,
                 from /home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/global/qglobal.cpp:90:
/home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/kernel/qcore_unix_p.h: In function ‘key_t qt_safe_ftok(const QByteArray&, int)’:
/home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/kernel/qcore_unix_p.h:333:12: error: ‘::ftok’ has not been declared
     return ::ftok(filename.constData(), qHash(filename, proj_id));
            ^
make: *** [qglobal.o] Error 1

Now clearly there is support for cygwin in the QT project as grepping inside configure I see the platform:

PLATFORM=cygwin-g++

...is defined. Doing some reading I read that ftok is a part of the IPC group of shared memory functions. One link regarding a similar error with a different app suggested linking in -lcygwin. I successfully added this to the L_FLAGS variable in the configure file, but it's still giving the same error, even when I specify the Cygwin as the platform via the -platform flag.

I would appreciate any advice as to how to get rid of this issue -- which I believe is attributable to some sort of missing IPC library error.

Jason R. Mick
  • 5,177
  • 4
  • 40
  • 69
  • cygwin has QT5.5 already available. Do you really need 5.6 ? – matzeri Apr 26 '16 at 17:40
  • I can run setup and grab all the qt5.5 related bits... that's my backup plan which I'm currently doing. But I'm still curious why the build system with the latest source isn't working properly. Ideally I'd grab the latest version and build it from the source. If I can figure out how out how to work around this issue hopefully I can install the latest version. I often install from source on Cygwin so nothing new there really... don't usually run into this kind of problem. – Jason R. Mick Apr 26 '16 at 17:52
  • Also, finding a solution to this is worth talking about as `qt` definitely is not the only framework to use `ftok` and other `IPC` library calls... this indicates a bunch of programs may not properly compile from source. Determining the workaround for this particular program has the broader benefit of providing a ready fix when build systems for other application sources fail with `IPC` errors... – Jason R. Mick Apr 26 '16 at 17:57
  • 1
    Take cygwin source code package for 5.5 and looks there for the build configuration. I suggest to use cygport for the build to simplify the 5.6 effort – matzeri Apr 26 '16 at 17:58
  • Okay that's a good idea... I'll try that, thanks. – Jason R. Mick Apr 26 '16 at 18:01
  • I've located the source package for qt5-base here: http://mirror.nexcess.net/cygwin/x86_64/release/mingw64-i686-qt5-base/ ...and am examining it. – Jason R. Mick Apr 26 '16 at 18:07
  • that is not for cygwin build it is for cross-build to mingw64. Use setup to install the proper source package. It will be installed in `/usr/src` – matzeri Apr 26 '16 at 18:11
  • Ah, I believe the correct src I want is `libQt5Core-devel`. I see there's a number of patches to that other mingw library... I did some quick searching and read the man page for `patch`, but didn't find a good set of documentation on the syntax/implementation of `*.patch` files. Do you know where I can find documentation regarding the `*.patch` file format? – Jason R. Mick Apr 26 '16 at 18:20
  • `man patch`. Any way install cygport and read the documentation – matzeri Apr 27 '16 at 05:47
  • Did you see my comment above? I read `man patch` but it gave little information regarding the syntax/formatting of the `*.patch` file. I could sort of extract a few details from the text, but for the most part it was solely discussing the `patch` executable's various parameter flags, purpose, known bugs, etc., not the `*.patch` file format. – Jason R. Mick Apr 28 '16 at 20:56
  • http://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html#Detailed-Unified – matzeri Apr 28 '16 at 21:41

0 Answers0