Make error compiling qt v3.3.8 from source
-
wrote on 16 May 2018, 15:47 last edited by
Hi,
For some particular software, it requires this particular version as dependency. I got the qt v3.3.8 from the archive.
I was able to run ./configure in the source directory successfully. However, on running make I got an error. Below is the output of the make command:
make[1]: Entering directory '/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8' cd qmake && make make[2]: Entering directory '/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8/qmake' make[2]: 'qmake' is up to date. make[2]: Leaving directory '/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8/qmake' cd src/moc && make make[2]: Entering directory '/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8/src/moc' make[2]: Nothing to be done for 'first'. make[2]: Leaving directory '/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8/src/moc' cd src && make make[2]: Entering directory '/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8/src' g++ -c -pipe -Wall -W -O2 -fPIC -DQT_SHARED -DQT_NO_DEBUG -DQT_NO_CUPS -DQT_NO_NIS -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DQT_NO_XINERAMA -DQT_NO_XCURSOR -DQT_NO_XRANDR -DQT_NO_XRENDER -DQT_NO_XFTFREETYPE -DQT_NO_IMAGEIO_MNG -DQT_NO_IMAGEIO_JPEG -DQT_NO_STYLE_MAC -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_COMPACT -DQT_NO_STYLE_POCKETPC -I/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8/mkspecs/linux-g++ -I. -I3rdparty/libpng -I3rdparty/zlib -I../include -I/usr/X11R6/include -I.moc/release-shared/ -o .obj/release-shared/qapplication_x11.o kernel/qapplication_x11.cpp In file included from ../include/qmap.h:46:0, from kernel/qmime.h:43, from kernel/qevent.h:45, from kernel/qobject.h:45, from kernel/qwidget.h:43, from kernel/qdesktopwidget.h:40, from kernel/qapplication.h:42, from kernel/qapplication_x11.cpp:64: ../include/qvaluelist.h:88:13: error: ‘ptrdiff_t’ does not name a type typedef ptrdiff_t difference_type; ^ ../include/qvaluelist.h:164:13: error: ‘ptrdiff_t’ does not name a type typedef ptrdiff_t difference_type; ^ In file included from ../include/qmap.h:46:0, from kernel/qmime.h:43, from kernel/qevent.h:45, from kernel/qobject.h:45, from kernel/qwidget.h:43, from kernel/qdesktopwidget.h:40, from kernel/qapplication.h:42, from kernel/qapplication_x11.cpp:64: ../include/qvaluelist.h:424:13: error: ‘ptrdiff_t’ does not name a type typedef ptrdiff_t difference_type; ^ In file included from kernel/qmime.h:43:0, from kernel/qevent.h:45, from kernel/qobject.h:45, from kernel/qwidget.h:43, from kernel/qdesktopwidget.h:40, from kernel/qapplication.h:42, from kernel/qapplication_x11.cpp:64: ../include/qmap.h:107:13: error: ‘ptrdiff_t’ does not name a type typedef ptrdiff_t difference_type; ^ ../include/qmap.h:223:13: error: ‘ptrdiff_t’ does not name a type typedef ptrdiff_t difference_type; ^ In file included from kernel/qmime.h:43:0, from kernel/qevent.h:45, from kernel/qobject.h:45, from kernel/qwidget.h:43, from kernel/qdesktopwidget.h:40, from kernel/qapplication.h:42, from kernel/qapplication_x11.cpp:64: ../include/qmap.h:604:13: error: ‘ptrdiff_t’ does not name a type typedef ptrdiff_t difference_type; ^ kernel/qapplication_x11.cpp: In function ‘void qt_init_internal(int*, char**, Display*, Qt::HANDLE, Qt::HANDLE)’: kernel/qapplication_x11.cpp:2009:8: warning: ‘KeySym XKeycodeToKeysym(Display*, KeyCode, int)’ is deprecated [-Wdeprecated-declarations] XKeycodeToKeysym(appDpy, map->modifiermap[mapIndex], 0); ^ In file included from kernel/qt_x11_p.h:66:0, from kernel/qinputcontext_p.h:63, from kernel/qapplication_x11.cpp:92: /usr/include/X11/Xlib.h:1687:15: note: declared here extern KeySym XKeycodeToKeysym( ^ kernel/qapplication_x11.cpp:2009:8: warning: ‘KeySym XKeycodeToKeysym(Display*, KeyCode, int)’ is deprecated [-Wdeprecated-declarations] XKeycodeToKeysym(appDpy, map->modifiermap[mapIndex], 0); ^ In file included from kernel/qt_x11_p.h:66:0, from kernel/qinputcontext_p.h:63, from kernel/qapplication_x11.cpp:92: /usr/include/X11/Xlib.h:1687:15: note: declared here extern KeySym XKeycodeToKeysym( ^ kernel/qapplication_x11.cpp:2009:62: warning: ‘KeySym XKeycodeToKeysym(Display*, KeyCode, int)’ is deprecated [-Wdeprecated-declarations] XKeycodeToKeysym(appDpy, map->modifiermap[mapIndex], 0); ^ In file included from kernel/qt_x11_p.h:66:0, from kernel/qinputcontext_p.h:63, from kernel/qapplication_x11.cpp:92: /usr/include/X11/Xlib.h:1687:15: note: declared here extern KeySym XKeycodeToKeysym( ^ kernel/qapplication_x11.cpp:2039:8: warning: ‘KeySym XKeycodeToKeysym(Display*, KeyCode, int)’ is deprecated [-Wdeprecated-declarations] XKeycodeToKeysym( appDpy, map->modifiermap[ mapIndex ], 0 ); ^ In file included from kernel/qt_x11_p.h:66:0, from kernel/qinputcontext_p.h:63, from kernel/qapplication_x11.cpp:92: /usr/include/X11/Xlib.h:1687:15: note: declared here extern KeySym XKeycodeToKeysym( ^ kernel/qapplication_x11.cpp:2039:8: warning: ‘KeySym XKeycodeToKeysym(Display*, KeyCode, int)’ is deprecated [-Wdeprecated-declarations] XKeycodeToKeysym( appDpy, map->modifiermap[ mapIndex ], 0 ); ^ In file included from kernel/qt_x11_p.h:66:0, from kernel/qinputcontext_p.h:63, from kernel/qapplication_x11.cpp:92: /usr/include/X11/Xlib.h:1687:15: note: declared here extern KeySym XKeycodeToKeysym( ^ kernel/qapplication_x11.cpp:2039:66: warning: ‘KeySym XKeycodeToKeysym(Display*, KeyCode, int)’ is deprecated [-Wdeprecated-declarations] XKeycodeToKeysym( appDpy, map->modifiermap[ mapIndex ], 0 ); ^ In file included from kernel/qt_x11_p.h:66:0, from kernel/qinputcontext_p.h:63, from kernel/qapplication_x11.cpp:92: /usr/include/X11/Xlib.h:1687:15: note: declared here extern KeySym XKeycodeToKeysym( ^ kernel/qapplication_x11.cpp: In member function ‘int QApplication::x11ProcessEvent(XEvent*)’: kernel/qapplication_x11.cpp:3690:33: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection) ^ kernel/qapplication_x11.cpp:3703:33: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection) ^ kernel/qapplication_x11.cpp: In member function ‘bool QETWidget::translateMouseEvent(const XEvent*)’: kernel/qapplication_x11.cpp:4118:51: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] bool hor = ( (btn == Button4 || btn == Button5) && (state&AltButton) || ^ kernel/qapplication_x11.cpp: In member function ‘bool QETWidget::translateKeyEventInternal(const XEvent*, int&, QString&, int&, char&, int&, QEvent::Type&, bool)’: kernel/qapplication_x11.cpp:5158:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] if (qt_use_rtl_extensions && type == QEvent::KeyPress) ^ kernel/qapplication_x11.cpp:5228:26: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] if ( key == XK_Shift_L && directionKeyEvent == XK_Control_L || ^ kernel/qapplication_x11.cpp:5231:33: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] } else if ( key == XK_Shift_R && directionKeyEvent == XK_Control_R || ^ kernel/qapplication_x11.cpp: In function ‘int isPaintOrScrollDoneEvent(Display*, XEvent*, XPointer)’: kernel/qapplication_x11.cpp:5521:3: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] && ev->xclient.message_type == qt_qt_scrolldone ) ^ Makefile:1462: recipe for target '.obj/release-shared/qapplication_x11.o' failed make[2]: *** [.obj/release-shared/qapplication_x11.o] Error 1 make[2]: Leaving directory '/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8/src' Makefile:40: recipe for target 'sub-src' failed make[1]: *** [sub-src] Error 2 make[1]: Leaving directory '/home/insanity/software/misc/qt-src/qt-x11-free-3.3.8' Makefile:8: recipe for target 'init' failed make: *** [init] Error 2
Hoping someone can help here...
-
ptrdiff_t is defined in cstddef: http://en.cppreference.com/w/cpp/types/ptrdiff_t
Looks like this old software does need some adjustments to compile wirh a recent compiler. -
Hi,
You might also need an older version of the Xorg libraries. Or update the corresponding code.
-
wrote on 18 May 2018, 17:50 last edited by
What version are we talking about?
-
A version that's about as old as Qt 3.3.8 which means that dates back 14 years ago. Note that it might be a more recent version. You'll have to check when the symbols you need were modified.
-
wrote on 25 Apr 2019, 06:08 last edited by
@deostroll Hi, I have the same issue. Did you ever solve this?