Compilation problem



  • Hi all,

    I'm trying to compile Qt (5.5.1) from git source. It works fine in debug using, but in release mode the compilation fails.

    Here's the configure line for debug mod:

    COMMONOPTS="-opensource -confirm-license -c++11 -shared -largefile -accessibility -no-pulseaudio -no-alsa -no-gtkstyle -nomake examples -nomake tests -no-nis -no-cups -no-iconv -no-icu -no-dbus -opengl -no-libinput -no-gstreamer -qt-xcb"
    
    ./configure -prefix ${HOME}/opt/Qt/5.5.1/debug -debug -qml-debug ${COMMONOPTS}
    

    while in release mode I've used:

    ./configure -prefix ${HOME}/opt/Qt/5.5.1/release -release -no-qml-debug ${COMMONOPTS}
    

    Note the difference between the two is only -debug -qml-debug vs -release -no-qml-debug.

    In release mode I get compilation errors from something which looks like unicode. But isn't unicode disabled in my build? Here's the error:

    [...]
    g++ -c -Wall -Wextra -Wreturn-type -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-se
    lf -pipe -fno-stack-protector -fno-strict-aliasing -O3 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -pthread -fno-exceptions -D_REENTRANT -MMD -DQT_NO_MTDEV -DQT_NO_TSLIB
     -DQT_NO_LIBINPUT -DBUILDING_QT__=1 -DNDEBUG -DENABLE_3D_RENDERING=1 -DENABLE_ACCELERATED_2D_CANVAS=1 -DENABLE_BLOB=1 -DENABLE_CANVAS_PATH=1 -DENABLE_CHANNEL_MESSAGING=1 -DENABLE_CSS_BOX_DEC
    ORATION_BREAK=1 -DENABLE_CSS_COMPOSITING=1 -DENABLE_CSS_EXCLUSIONS=1 -DENABLE_CSS_FILTERS=1 -DENABLE_CSS_IMAGE_SET=1 -DENABLE_CSS_REGIONS=1 -DENABLE_CSS_SHAPES=1 -DENABLE_CSS_STICKY_POSITION
    =1 -DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=1 -DENABLE_DATALIST_ELEMENT=1 -DENABLE_DETAILS_ELEMENT=1 -DENABLE_DEVICE_ORIENTATION=1 -DENABLE_DOWNLOAD_ATTRIBUTE=1 -DENABLE_FAST_MOBILE_SCR
    OLLING=1 -DENABLE_FILTERS=1 -DENABLE_FTPDIR=1 -DENABLE_FULLSCREEN_API=1 -DENABLE_GEOLOCATION=1 -DENABLE_GESTURE_EVENTS=1 -DENABLE_ICONDATABASE=1 -DENABLE_IFRAME_SEAMLESS=1 -DENABLE_INDEXED_D
    ATABASE=1 -DENABLE_INPUT_TYPE_COLOR=1 -DENABLE_INSPECTOR=1 -DENABLE_INSPECTOR_SERVER=1 -DENABLE_JAVASCRIPT_DEBUGGER=1 -DENABLE_LEGACY_NOTIFICATIONS=1 -DENABLE_LEGACY_VIEWPORT_ADAPTION=1 -DEN
    ABLE_LEGACY_VENDOR_PREFIXES=1 -DENABLE_LEGACY_WEB_AUDIO=1 -DENABLE_LINK_PREFETCH=1 -DENABLE_METER_ELEMENT=1 -DENABLE_MHTML=1 -DENABLE_NOTIFICATIONS=1 -DENABLE_ORIENTATION_EVENTS=1 -DENABLE_P
    AGE_VISIBILITY_API=1 -DENABLE_PROGRESS_ELEMENT=1 -DENABLE_RESOLUTION_MEDIA_QUERY=1 -DENABLE_REQUEST_ANIMATION_FRAME=1 -DENABLE_SHARED_WORKERS=1 -DENABLE_SMOOTH_SCROLLING=1 -DENABLE_SQL_DATAB
    ASE=1 -DENABLE_SUBPIXEL_LAYOUT=1 -DENABLE_SVG=1 -DENABLE_SVG_FONTS=1 -DENABLE_TOUCH_ADJUSTMENT=1 -DENABLE_TOUCH_EVENTS=1 -DENABLE_VIDEO_TRACK=1 -DENABLE_VIEW_MODE_CSS_MEDIA=1 -DENABLE_WEB_SO
    CKETS=1 -DENABLE_WEB_TIMING=1 -DENABLE_WORKERS=1 -DENABLE_XHR_TIMEOUT=1 -DWTF_USE_TILED_BACKING_STORE=1 -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1 -DHAVE_QTQUICK=1 -DHAVE_QTPRINTSUPPORT=1 -DHA
    VE_QSTYLE=1 -DHAVE_QTTESTLIB=1 -DHAVE_QTPOSITIONING=1 -DHAVE_QTSENSORS=1 -DWTF_USE_LIBXML2=1 -DWTF_USE_ZLIB=1 -DWTF_USE_LIBJPEG=1 -DWTF_USE_LIBPNG=1 -DHAVE_XCOMPOSITE=1 -DHAVE_XRENDER=1 -DHA
    VE_GLX=1 -DHAVE_FONTCONFIG=1 -DENABLE_NETSCAPE_PLUGIN_API=1 -DWTF_USE_PLUGIN_BACKEND_XLIB=1 -DPLUGIN_ARCHITECTURE_X11=1 -DENABLE_PLUGIN_PROCESS=1 -DWTF_USE_3D_GRAPHICS=1 -DENABLE_WEBGL=1 -DE
    NABLE_VIDEO=1 -DWTF_USE_GSTREAMER=1 -DWTF_USE_NATIVE_FULLSCREEN_VIDEO=1 -DHAVE_SQLITE3=1 -DENABLE_GAMEPAD=1 -DWTF_USE_GRAPHICS_SURFACE=1 -DWTF_USE_GLX=1 -DENABLE_TOUCH_SLIDER=1 -DWTF_USE_LEV
    ELDB=1 -DWTF_USE_WCHAR_UNICODE=1 -DWTF_USE_GLIB=1 -DENABLE_BATTERY_STATUS=0 -DENABLE_CANVAS_PROXY=0 -DENABLE_CSP_NEXT=0 -DENABLE_CSS_GRID_LAYOUT=0 -DENABLE_CSS_HIERARCHIES=0 -DENABLE_CSS_IMA
    GE_ORIENTATION=0 -DENABLE_CSS_IMAGE_RESOLUTION=0 -DENABLE_CSS_SHADERS=0 -DENABLE_CSS_VARIABLES=0 -DENABLE_CSS3_CONDITIONAL_RULES=0 -DENABLE_CSS3_TEXT=0 -DENABLE_CSS3_TEXT_LINE_BREAK=0 -DENAB
    LE_DASHBOARD_SUPPORT=0 -DENABLE_DATAGRID=0 -DENABLE_DATA_TRANSFER_ITEMS=0 -DENABLE_DIRECTORY_UPLOAD=0 -DENABLE_FILE_SYSTEM=0 -DENABLE_FONT_LOAD_EVENTS=0 -DENABLE_HIGH_DPI_CANVAS=0 -DENABLE_I
    NPUT_SPEECH=0 -DENABLE_INPUT_TYPE_DATE=0 -DENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=0 -DENABLE_INPUT_TYPE_DATETIMELOCAL=0 -DENABLE_INPUT_TYPE_MONTH=0 -DENABLE_INPUT_TYPE_TIME=0 -DENABLE_INPUT_T
    YPE_WEEK=0 -DENABLE_LEGACY_CSS_VENDOR_PREFIXES=0 -DENABLE_MATHML=0 -DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=0 -DENABLE_MEDIA_STREAM=0 -DENABLE_MICRODATA=0 -DENABLE_MOUSE_CURSOR_SCAL
    E=0 -DENABLE_NAVIGATOR_CONTENT_UTILS=0 -DENABLE_NETWORK_INFO=0 -DENABLE_NOSNIFF=0 -DENABLE_PROXIMITY_EVENTS=0 -DENABLE_QUOTA=0 -DENABLE_RESOURCE_TIMING=0 -DENABLE_SCRIPTED_SPEECH=0 -DENABLE_
    SECCOMP_FILTERS=0 -DENABLE_SHADOW_DOM=0 -DENABLE_STYLE_SCOPED=0 -DENABLE_TEMPLATE_ELEMENT=0 -DENABLE_TEXT_AUTOSIZING=0 -DENABLE_THREADED_HTML_PARSER=0 -DENABLE_TOUCH_ICON_LOADING=0 -DENABLE_
    USER_TIMING=0 -DENABLE_VIBRATION=0 -DENABLE_WEB_AUDIO=0 -DENABLE_XSLT=0 -DSTATICALLY_LINKED_WITH_WTF -DBUILDING_JavaScriptCore -DBUILDING_WEBKIT -DQT_ASCII_CAST_WARNINGS -DQT_NO_EXCEPTIONS -
    D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I. -I../../Source -I../WTF -Iassembler -Ibytecode -Ibytecompiler -Iheap -Idfg -Idebugger -Idisassembler -Iinterprete
    r -Ijit -Illint -Iparser -Iprofiler -Iruntime -Itools -Iyarr -IAPI -IForwardingHeaders -Igenerated -I${HOME}/qt5.git/qtwebkit/Source/JavaScriptCore/generated/LLIntOffsets
    Extractor -Idisassembler/udis86 -I../../Source -I${HOME}/qt5.git/qtwebkit/Source/include -I../WTF -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/incl
    ude -I${HOME}/qt5.git/qtbase/include -I${HOME}/qt5.git/qtbase/include/QtCore -I.moc -I${HOME}/qt5.git/qtbase/mkspecs/linux-g++ -o
    .obj/yarr/YarrInterpreter.o yarr/YarrInterpreter.cpp
    In file included from ../WTF/wtf/unicode/Unicode.h:34:0,
                     from ../WTF/wtf/text/ASCIIFastPath.h:31,
                     from ../WTF/wtf/text/WTFString.h:28,
                     from yarr/YarrPattern.h:35,
                     from yarr/YarrInterpreter.h:29,
                     from yarr/YarrInterpreter.cpp:28:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘bool WTF::Unicode::isAlphanumeric(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:136:58: error: ‘iswalnum’ was not declared in this scope
     inline bool isAlphanumeric(UChar c) { return !!iswalnum(c); }
                                                              ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘bool WTF::Unicode::isDigit(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:137:51: error: ‘iswdigit’ was not declared in this scope
     inline bool isDigit(UChar c) { return !!iswdigit(c); }
                                                       ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘bool WTF::Unicode::isLetter(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:138:52: error: ‘iswalpha’ was not declared in this scope
     inline bool isLetter(UChar c) { return !!iswalpha(c); }
                                                         ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘bool WTF::Unicode::isLower(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:139:51: error: ‘iswlower’ was not declared in this scope
     inline bool isLower(UChar c) { return !!iswlower(c); }
                                                       ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘bool WTF::Unicode::isPrintableChar(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:140:59: error: ‘iswprint’ was not declared in this scope
     inline bool isPrintableChar(UChar c) { return !!iswprint(c); }
                                                               ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘bool WTF::Unicode::isPunct(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:141:51: error: ‘iswpunct’ was not declared in this scope
     inline bool isPunct(UChar c) { return !!iswpunct(c); }
                                                       ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘bool WTF::Unicode::isSpace(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:142:51: error: ‘iswspace’ was not declared in this scope
     inline bool isSpace(UChar c) { return !!iswspace(c); }
                                                       ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘bool WTF::Unicode::isUpper(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:143:51: error: ‘iswupper’ was not declared in this scope
     inline bool isUpper(UChar c) { return !!iswupper(c); }
                                                       ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘UChar WTF::Unicode::foldCase(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:148:51: error: ‘towlower’ was not declared in this scope
     inline UChar foldCase(UChar c) { return towlower(c); }
                                                       ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘UChar WTF::Unicode::toLower(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:149:50: error: ‘towlower’ was not declared in this scope
     inline UChar toLower(UChar c) { return towlower(c); }
                                                      ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘UChar WTF::Unicode::toUpper(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:150:50: error: ‘towupper’ was not declared in this scope
     inline UChar toUpper(UChar c) { return towupper(c); }
                                                      ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘UChar WTF::Unicode::toTitleCase(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:151:54: error: ‘towupper’ was not declared in this scope
     inline UChar toTitleCase(UChar c) { return towupper(c); }
                                                          ^
    In file included from ../WTF/wtf/PossiblyNull.h:29:0,
                     from ../WTF/wtf/FastMalloc.h:25,
                     from ./config.h:56,
                     from yarr/YarrInterpreter.cpp:27:
    ../WTF/wtf/unicode/Unicode.h: At global scope:
    ../WTF/wtf/Assertions.h:314:35: error: static assertion failed: UCharIsTwoBytes
     #define COMPILE_ASSERT(exp, name) static_assert((exp), #name)
                                       ^
    ../WTF/wtf/unicode/Unicode.h:39:1: note: in expansion of macro ‘COMPILE_ASSERT’
     COMPILE_ASSERT(sizeof(UChar) == 2, UCharIsTwoBytes);
     ^
    In file included from ../WTF/wtf/unicode/Unicode.h:34:0,
                     from ../WTF/wtf/text/ASCIIFastPath.h:31,
                     from ../WTF/wtf/text/WTFString.h:28,
                     from yarr/YarrPattern.h:35,
                     from yarr/YarrInterpreter.h:29,
                     from yarr/YarrInterpreter.cpp:28:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘UChar WTF::Unicode::toLower(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:149:53: warning: control reaches end of non-void function [-Wreturn-type]
     inline UChar toLower(UChar c) { return towlower(c); }
                                                         ^
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h: In function ‘UChar WTF::Unicode::toUpper(UChar)’:
    ../WTF/wtf/unicode/wchar/UnicodeWchar.h:150:53: warning: control reaches end of non-void function [-Wreturn-type]
     inline UChar toUpper(UChar c) { return towupper(c); }
                                                         ^
    make[3]: *** [.obj/yarr/YarrInterpreter.o] Error 1
    make[3]: Leaving directory `${HOME}/qt5.git/qtwebkit/Source/JavaScriptCore'
    make[2]: *** [sub-Target-pri-install_subtargets-ordered] Error 2
    make[2]: Leaving directory `${HOME}/qt5.git/qtwebkit/Source/JavaScriptCore'
    make[1]: *** [sub-Source-JavaScriptCore-JavaScriptCore-pro-install_subtargets-ordered] Error 2
    make[1]: Leaving directory `${HOME}/qt5.git/qtwebkit'
    make: *** [module-qtwebkit-install_subtargets] Error 2
    

    Any idea what could be wrong?

    Thanks!


  • Qt Champions 2016

    Hello,
    I believe unicode is enabled by default, it's one of the nice features of Qt. Have you found a switch for the configure script to disable unicode, maybe try it with it (if available)? Have you tried disabling webkit?
    Also, I think 5.5.1 is available precompiled, so maybe consider downloading it directly.

    Kind regards.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you do your release configuration/build in the same folder as your debug build ? If so, you need to first clean the source folder before configuring/building again.

    If you want to avoid that, use an out of source build.



  • @kshegunov Thanks for the reply!

    I started from the precompiled binaries, but for a project I need to compile Qt from source. I did used a flag to disable unicode in my build and this was the source of my surprise: My $COMMONOPTS shown above contains -no-iconv -no-icu which I believed should have disabled it. I'm not sure that my build disables webkit or not; the options in $COMMONOPTS are all I could find from ./configure --help. It takes me ~15 minutes to build Qt so I suspect it is disabled ;)

    @SGaist Thanks! You identified the issue ;)

    I'm placing my build options in $COMMONOPTS to be able to have a debug and release build, installed in ${HOME}/opt/Qt/5.5.1/debug or ${HOME}/opt/Qt/5.5.1/release as required. But I built both in the source directory, starting with debug which compiled and installed successfully. I though re-running configure with the the release flag will let recompile everything, but it seems something went wrong. Note that I could not run make clean in the source directory. There seemed to be an infitine loop where make would tell me some files were not there. Sorry I don't have that output anymore.

    I fix the issue by compiling out of source, for example in build/debug and build/release:

    mkdir -p build/debug
    cd build/debug
    time ../../configure -prefix ${HOME}/opt/Qt/5.5.1/debug -debug -qml-debug ${COMMONOPTS}
    time make -j 4
    make install
    

    and

    mkdir -p build/release
    cd build/release
    time ../../configure -prefix ${HOME}/opt/Qt/5.5.1/release -release -no-qml-debug ${COMMONOPTS}
    time make -j 4
    make install
    

    Both compiled and installed successfully. My program compiles and runs fine with both too.

    Thanks a lot!


  • Lifetime Qt Champion

    You're welcome !

    Note that you don't need two separate builds, you can ask to get both at the same time.

    Since you have everything running now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.