Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo Installation › undefined reference to libpng12 on ubuntu 13.04 64bit

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #5472

    Martin

    I am just testing my new 64 bit development environment and encounter the following linker error when building any v-play example.

    :-1: error: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/libVPlay_debug.a(CCImage.o): undefined reference to symbol 'png_malloc@@PNG12_0'
    :-1: error: note: 'png_malloc@@PNG12_0' is defined in DSO /lib/x86_64-linux-gnu/libpng12.so.0 so try adding it to the linker command line

    Related problems have been reported already However, I don’t know how to solve this easily. Any suggestions?

    I’d also like to mention that one has to set mkspecs to linux-g++ manually in qtcreator since the otherwise active linux-g++-64 is not tested for in the makefiles.

    Cheers, Martin

     

    here is the full compilation log

    /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/bin/qmake -spec ../../../Desktop/Qt/4.8.1/gcc/mkspecs/linux-g++ CONFIG+=debug CONFIG+=declarative_debug -o Makefile ../MultiPathTest/MultiPathTest.pro
    Project MESSAGE: Felgo 3rdparty library path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/third_party
    Project MESSAGE: Felgo SDK path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily
    Project MESSAGE: Felgo target path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily
    Project MESSAGE: Felgo library path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64
    Project MESSAGE: Felgo qml path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/qml
    Project MESSAGE: Felgo include path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/include
    Project MESSAGE: VPlayPluginsGenericPath: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/plugins/generic
    Project MESSAGE: VPlayPluginsPlatformPath: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/plugins/linux
    Project MESSAGE: QML_IMPORT_PATH: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/qml /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/plugins/linux /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/plugins/generic
    Project MESSAGE: MAINPROFILEPWD: /home/eigel/libs/FelgoSDK/Examples/FelgoSDK/MultiPathTest
    g++-4.6 -Wl,--rpath=/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/third_party -o MultiPathTest main.o qmlapplicationviewer.o moc_qmlapplicationviewer.o qrc_multiPathTestResources.o    -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/lib /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/libVPlay_debug.a /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/third_party/libcocosdenshion.so -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/third_party -lglfw -lGL -lcurl -lfreetype -ljpeg -lxml2 -lQtDeclarative -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/lib -lQtScript -lQtSvg -L/usr/X11R6/lib64 -lQtSql -lQtXmlPatterns -lQtGui -lQtNetwork -lQtCore -lpthread 
    /usr/bin/ld: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/libVPlay_debug.a(CCImage.o): undefined reference to symbol 'png_malloc@@PNG12_0'
    /usr/bin/ld: note: 'png_malloc@@PNG12_0' is defined in DSO /lib/x86_64-linux-gnu/libpng12.so.0 so try adding it to the linker command line
    /lib/x86_64-linux-gnu/libpng12.so.0: could not read symbols: Invalid operation
    collect2: ld returned 1 exit status

     

    #5477

    Alex
    Felgo Team

    Hi Martin,

    have you also tried this solution? https://felgo.com/developers/forums/t/demo-applications-runs-wo-graphics/#post-5084 . We’ll add official Ubuntu 13 support, including a proper installation guide, with our next major release. Please keep me updated if this solution works for you!

    Regarding “linux-g++”, which version of Qt Creator are you using currently (as the flag should already be set by Qt Creator automatically)?

    Best,

    Alex

    #5478

    Martin

    Hi Alex,

    I’ve now tried the suggested modification of the project file which results in

    :-1: error: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/libVPlay_debug.a(CCImage.o): undefined reference to symbol 'png_malloc@@PNG12_0'
    :-1: error: note: 'png_malloc@@PNG12_0' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libpng12.so so try adding it to the linker command line
    /usr/lib/x86_64-linux-gnu/libpng12.so:-1: error: could not read symbols: Invalid operation

    full log

    g++-4.6 -Wl,--rpath=/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/third_party -o MultiSceneMultiLevel main.o qmlapplicationviewer.o moc_qmlapplicationviewer.o    -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/lib -lpng12 -lz -lfontconfig /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/libVPlay_debug.a /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/third_party/libcocosdenshion.so -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/third_party -lglfw -lGL -lcurl -lfreetype -ljpeg -lxml2 -lQtDeclarative -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/lib -lQtScript -lQtSvg -L/usr/X11R6/lib64 -lQtSql -lQtXmlPatterns -lQtGui -lQtNetwork -lQtCore -lpthread 
    /usr/bin/ld: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64/libVPlay_debug.a(CCImage.o): undefined reference to symbol 'png_malloc@@PNG12_0'
    /usr/bin/ld: note: 'png_malloc@@PNG12_0' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libpng12.so so try adding it to the linker command line
    /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libpng12.so: could not read symbols: Invalid operation

    Any ideas what goes wrong? libpng12-dev is installed.

    I’m using qtcreator 2.8.0.

    Best, Martin

    #5484

    Alex
    Felgo Team

    Hi Martin,

    so the file path /usr/lib/x86_64-linux-gnu/libpng12.so does exist? Where exactly did you included the LIBS statement, in your custom project file or the Felgo prf (loaded with the CONFIG += v-play_daily statement) file?

    Thanks,

    Alex

    #5485

    Martin

    Hey Alex,

    Yes, the library does exist at that path but this problem somehow disappeared. I probably mixed up something the last time with using some v-play.prf project instead of v-play_daily.prf and the former does not include checks for linux-g++-64. Now, when building a daily project it seems that the library path is set incorrectly (lib instead of lib64)

    16:32:22: Running steps for project MultiSceneMultiLevel...
    16:32:22: Starting: "/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/bin/qmake" /home/eigel/libs/FelgoSDK/Examples/FelgoSDK/daily/MultiSceneMultiLevel/MultiSceneMultiLevel.pro -r -spec linux-g++-64 CONFIG+=debug CONFIG+=declarative_debug
    Project MESSAGE: Felgo 3rdparty library path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/third_party
    Project MESSAGE: Felgo SDK path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily
    Project MESSAGE: Felgo target path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily
    Project MESSAGE: Felgo library path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib
    Project MESSAGE: Felgo qml path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/qml
    Project MESSAGE: Felgo include path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/include
    Project MESSAGE: VPlayPluginsGenericPath: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/plugins/generic
    Project MESSAGE: VPlayPluginsPlatformPath: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/plugins/linux
    Project MESSAGE: QML_IMPORT_PATH: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/qml /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/plugins/linux /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/plugins/generic
    Project MESSAGE: MAINPROFILEPWD: /home/eigel/libs/FelgoSDK/Examples/FelgoSDK/daily/MultiSceneMultiLevel

    As a test, I moved lib64 to lib which results in a seemingly successful build. Note that I also moved the LIBS+=… entry from the project file to v-play_daily.prf. Unfortunately, all built apps immediately quit without any hint regarding the error 🙁

    VPlayApplication: now set contentScaleFactor valid for all items... 
    VPlayApplication: contentScaleFactor was set valid for all items 
    VPlayApplication: displayFpsEnabled in root element GameWindow is set to: true 
    ______________VPlayApplication: cocosWrapper initialized, load QML tree______________ 
    initial contentX: 0 , contentY: 0 true QDeclarativeFlickable (this = 0x143c790 , parent = 0x143ea10 , geometry = QRectF(0,0 200x200) , z = 0 ) 
    VPlayApplication: loadQmlfile() is finished 
    The program has unexpectedly finished.
    /home/eigel/libs/FelgoSDK/Examples/FelgoSDK/daily/build-GUIElementsTest-Desktop_V_Play-Debug/GUIElementsTest exited with code 0

    Would be great if you could investigate.

    Cheers, Martin

    #5491

    Alex
    Felgo Team

    The daily build library path should output:

    Felgo library path: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/daily/lib/lib64

    on 64 bit systems. I guess you already checked if you’ve installed the latest daily build 1.3.7 (you can check that in the Felgo SDK maintenance tool), or better, have you also tried the latest 1.4.0 stable build, which indeed should have the 64 bit check (v-play.prf line #140)?

    Regarding the crash, this sounds like there are still some wrong dynamic libraries linked, if the problem won’t be fixed with the 1.4.0 installation you could try to run in debug mode and check if you get a useful breakpoint (resulting from SIGSEV or similar).

    If all of this won’t fix your problem, we’ll go and get a 64bit Linux VM up an running this evening. 😉

    Best,

    Alex

    #5493

    Martin
    /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/bin/qmake -spec ../../../Desktop/Qt/4.8.1/gcc/mkspecs/linux-g++-64 CONFIG+=debug CONFIG+=declarative_debug -o Makefile ../MultiDragAndPinch/MultiDragAndPinch.pro
    Project MESSAGE: QT install prefix:
    Project MESSAGE: Felgo SDK path:
    Project MESSAGE: Felgo target path:
    Project MESSAGE: Felgo library path: /lib
    Project MESSAGE: Felgo qml path: /qml
    Project MESSAGE: Felgo include path: /include
    Project MESSAGE: VPlayPluginsGenericPath: /plugins/generic
    Project MESSAGE: VPlayPluginsPlatformPath: /
    Project MESSAGE: QML_IMPORT_PATH: /qml / /plugins/generic
    WARNING: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/v-play.prf:238: Unable to find file for inclusion /qmlapplicationviewer/vplayqmlapplicationviewer.pri
    /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/v-play.prf:239: Unknown test function: qtcAddDeployment
    g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Desktop/Qt/4.8.1/gcc/mkspecs/linux-g++-64 -I../MultiDragAndPinch -I../../../Desktop/Qt/4.8.1/gcc/include/QtCore -I../../../Desktop/Qt/4.8.1/gcc/include/QtNetwork -I../../../Desktop/Qt/4.8.1/gcc/include/QtGui -I../../../Desktop/Qt/4.8.1/gcc/include -I/include -I. -I../MultiDragAndPinch -I. -o main.o ../MultiDragAndPinch/main.cpp
    ../MultiDragAndPinch/main.cpp:1:30: fatal error: vplayapplication.h: No such file or directory
    compilation terminated.

    This is the output of 1.4 (hadn’t realised it was more recent than daily). I am unfortunately not very familiar with project files but it’s clear that already the check in v-play.prf #136 does not work as expected with linux-g++-64. In fact, linux-g++ is not set in this case, at least not with my environment.

    Would appreciate if you could verify on your system. Does not have to be today, though. Tomorrow is fine as well 😉

    Best, Martin

    #5498

    Martin

    Any news re this? Would be nice if you could advise.

    Cheers, Martin

    #5499

    Alex
    Felgo Team

    Sorry, Martin, our attempt of installing and running Felgo on an Ubuntu 13 clean installation went successfully this afternoon, so we couldn’t reproduce your error as of now. Our current approach is to check when linux-g++ is set and when not. Have you already tried adding the flag manually?

    Thanks,

    Alex

    #5500

    Martin

    I now modified the v-play.prf like so (additionally checking for linux-g++-64)

    # Project file including Felgo libraries and paths for specific build target
    
    # needed for reading the Mac address with QNetworkInterface, required for Felgo Game Network
    QT += network
    
    # Set gcc 4.6 on Linux machines
    linux-g++|linux-g++-64 {
      QMAKE_CC = gcc-4.6
      QMAKE_LINK_C       = $$QMAKE_CC
      QMAKE_LINK_C_SHLIB = $$QMAKE_CC
      QMAKE_CXX = g++-4.6
      QMAKE_LINK       = $$QMAKE_CXX
      QMAKE_LINK_SHLIB = $$QMAKE_CXX
    }
    
    # Set SDK and base path
    macx|win32|linux-g++|linux-g++-64: {
      # Paths for Windows Mac OS X, and Linux
      VPLAY_BASE_PATH = $$[QT_INSTALL_PREFIX]/../../../FelgoSDK
      VPLAY_SDK_PATH = $$VPLAY_BASE_PATH
    } else: contains(MEEGO_EDITION,harmattan) {
      # Paths for MeeGo
      VPLAY_BASE_PATH = $$[QT_INSTALL_PREFIX]/../../../SDKs/FelgoSDK
      VPLAY_SDK_PATH = $$[QT_INSTALL_PREFIX]/../../../../Desktop/FelgoSDK
    } else: symbian: {
      # Paths for Symbian
      VPLAY_BASE_PATH = $$[QT_INSTALL_PREFIX]../FelgoSDK
      VPLAY_SDK_PATH = $$[QT_INSTALL_PREFIX]../../../Desktop/FelgoSDK
    }
    
    # Resolve paths
    VPLAY_INCLUDE_PATH = $$VPLAY_SDK_PATH/include
    VPLAY_LIBRARY_PATH = $$VPLAY_BASE_PATH/lib
    VPLAY_QML_PATH = $$VPLAY_SDK_PATH/qml
    
    # Check if the environment variable VPLAY_TEST_LOCALLY is set to 1
    TEST_LOCALLY = $$(VPLAY_TEST_LOCALLY)
    contains(TEST_LOCALLY, 1): {
        CONFIG += testLocally
        message(VPLAY_TEST_LOCALLY environment variable is set to 1)
    }
    
    # Only used for Felgo internal debugging
    testLocally {
      message(testLocally config variable is set...)
      # $$_PRO_FILE_PWD_ must resolve to two subdirs underneath the main pro file, e.g. the demos/_demo_ folders
      # If the local feature file (v-play.prf) should be tested be sure to set QMAKEFEATURES env variable too (see README for this)
      VPLAY_BASE_PATH = $$_PRO_FILE_PWD_/../..
      VPLAY_SDK_PATH = $$VPLAY_BASE_PATH
      VPLAY_INCLUDE_PATH = $$VPLAY_SDK_PATH/src
      VPLAY_QML_PATH = $$VPLAY_SDK_PATH/qml
    
      linux-g++|linux-g++-64: VPLAY_LIBRARY_PATH = $$VPLAY_SDK_PATH/lib/linux
      symbian: VPLAY_LIBRARY_PATH = $$VPLAY_SDK_PATH/lib/symbian
      contains(MEEGO_EDITION,harmattan): VPLAY_LIBRARY_PATH = $$VPLAY_SDK_PATH/lib/meego
      win32: VPLAY_LIBRARY_PATH = $$VPLAY_SDK_PATH/lib/windows
      macx: VPLAY_LIBRARY_PATH = $$VPLAY_SDK_PATH/lib/macx
    }
    
    # Set paths
    INCLUDEPATH += $$VPLAY_INCLUDE_PATH
    DEPENDPATH += $$VPLAY_INCLUDE_PATH
    QML_IMPORT_PATH += $$VPLAY_QML_PATH
    
    # Add platform specific libraries
    macx {
      DEFINES += PLATFORM_MAC
      # Frameworks
      LIBS += -framework Cocoa
      LIBS += -framework OpenGL
      LIBS += -framework OpenAL
      LIBS += -framework AudioToolbox
    
      # Third party libraries
      LIBS += -L$$VPLAY_LIBRARY_PATH/third_party -lcurl -lfreetype -ljpeg -lpng14 -lxml2 -lz
    
      # Felgo libraries
      CONFIG(release, debug|release): LIBS += -L$$VPLAY_LIBRARY_PATH -lVPlay
      else:CONFIG(debug, debug|release): LIBS += -L$$VPLAY_LIBRARY_PATH -lVPlay_debug
    
    } else: win32 {
      DEFINES += PLATFORM_WINDOWS
      # Third party libraries
      LIBS += -L$$VPLAY_LIBRARY_PATH/third_party -llibcurl_imp -llibEGL -llibgles_cm -llibiconv -llibjpeg -llibpng -llibxml2 -llibzlib -lpthreadVCE2
      LIBS += -lWinMM -lAdvAPI32 -lGdi32 -lshell32 -lUser32
      LIBS += -lkernel32 -lwinspool -lcomdlg32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
    
      # Felgo libraries
      CONFIG(release, debug|release): LIBS += -L$$VPLAY_LIBRARY_PATH -lVPlay
      else:CONFIG(debug, debug|release): LIBS += -L$$VPLAY_LIBRARY_PATH -lVPlayd
    
    } else: symbian {
      DEFINES += PLATFORM_SYMBIAN
      # Felgo libraries
      CONFIG(release, debug|release): LIBS += -lVPlay
      CONFIG(debug, debug|release): LIBS += -lVPlay_debug
      # the below doesnt work, the library cat be found with the tools/checklib.exe
      #CONFIG(release, debug|release): LIBS += $$VPLAY_LIBRARY_PATH/VPlay.lib
      #else:CONFIG(debug, debug|release): LIBS += $$VPLAY_LIBRARY_PATH/VPlay_debug.lib
    
      # Third party libraries
      LIBS += -lusrt2_2.lib # (QTCREATORBUG-5589)
      # LIBS += -lcharconv
    
      # Symbian specific permissions
      TARGET.CAPABILITY += NetworkServices ReadUserData WriteUserData
    
      MMP_RULES += EXPORTUNFROZEN
      MMP_RULES += "OPTION gcce -march=armv6"
      MMP_RULES += "OPTION gcce -mfpu=vfp"
      MMP_RULES += "OPTION gcce -mfloat-abi=softfp"
      MMP_RULES += "OPTION gcce -marm"
      MMP_RULES += "OPTION gcce -fno-use-cxa-atexit"
    
      LIBS += -llibEGL -llibgles_cm
      LIBS += -lcone -leikcore -lavkon
      LIBS += -lremconcoreapi -lremconinterfacebase -lmmfdevsound
    
      QT += xml
      CONFIG += mobility
      MOBILITY += multimedia systeminfo sensors
    
    } else: contains(MEEGO_EDITION,harmattan) {
      DEFINES += PLATFORM_MEEGO
      # Felgo libraries
      CONFIG(release, debug|release): LIBS += $$VPLAY_LIBRARY_PATH/libVPlay.a
      else:CONFIG(debug, debug|release): LIBS += $$VPLAY_LIBRARY_PATH/libVPlay_debug.a
    
      QT += meegographicssystemhelper
      LIBS += -lpthread -lxml2 -lEGL -lGLES_CM
    
      QT += xml
      CONFIG += mobility
      MOBILITY += multimedia systeminfo sensors
    
    } else: linux-g++|linux-g++-64 {
      DEFINES += PLATFORM_LINUX
      # Felgo libraries
    
      linux-g++:contains(QMAKE_HOST.arch, x86_64)|linux-g++-64: {
          VPLAY_LIBRARY_PATH = $$VPLAY_LIBRARY_PATH/lib64
          LIBS += -lpng12 -lz -lfontconfig
      }
    
      CONFIG(release, debug|release): LIBS += $$VPLAY_LIBRARY_PATH/libVPlay.a
      else:CONFIG(debug, debug|release): LIBS += $$VPLAY_LIBRARY_PATH/libVPlay_debug.a
    
      # Third party libraries
      THIRDPARTY_LIBRARY_PATH = $$VPLAY_LIBRARY_PATH/third_party
    
      message(Felgo 3rdparty library path: $$THIRDPARTY_LIBRARY_PATH)
    
      LIBS += -L$$THIRDPARTY_LIBRARY_PATH
      LIBS += -lglfw -lGL
      LIBS += -lcurl -lfreetype -ljpeg -lxml2
    
      linux-g++:contains(QMAKE_HOST.arch, x86_64)|linux-g++-64: {
        LIBS += -lfmodex64
      } else: {
        LIBS += -lfmodex
      }
    }
    
    # QML Plugin paths
    VPlayPluginsGenericFolder.target = plugins
    VPlayPluginsGenericFolder.source = $$VPLAY_SDK_PATH/plugins/generic
    DEPLOYMENTFOLDERS += VPlayPluginsGenericFolder
    
    contains(DEFINES, PLATFORM_WINDOWS): platformPluginPath = plugins/windows
    else: contains(DEFINES, PLATFORM_MAC): platformPluginPath = plugins/macx
    else: contains(DEFINES, PLATFORM_LINUX): platformPluginPath = plugins/linux
    else: contains(DEFINES, PLATFORM_IOS): platformPluginPath = plugins/ios
    else: contains(DEFINES, PLATFORM_ANDROID): platformPluginPath = plugins/android
    else: contains(DEFINES, PLATFORM_SYMBIAN): platformPluginPath = plugins/symbian
    else: contains(DEFINES, PLATFORM_MEEGO): platformPluginPath = plugins/meego
    
    VPlayPluginsPlatformFolder.target = plugins
    VPlayPluginsPlatformFolder.source = $$VPLAY_SDK_PATH/$$platformPluginPath
    DEPLOYMENTFOLDERS += VPlayPluginsPlatformFolder
    
    QML_IMPORT_PATH += $$VPlayPluginsPlatformFolder.source
    QML_IMPORT_PATH += $$VPlayPluginsGenericFolder.source
    
    # Mac deployment targets
    macx {
      APPCERT = "3rd Party Mac Developer Application: $${COMPANY}"
      INSTALLERCERT = "3rd Party Mac Developer Installer: $${COMPANY}"
    
      QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
      QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
      QMAKE_OBJECTIVE_CFLAGS_RELEASE =  $$QMAKE_OBJECTIVE_CFLAGS_RELEASE_WITH_DEBUGINFO
      QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
    
      # Adapt paths for shadow builds
      QMAKE_INFO_PLIST = $$_PRO_FILE_PWD_/$${QMAKE_INFO_PLIST}
      ENTITLEMENTS = $$_PRO_FILE_PWD_/$${ENTITLEMENTS}
    
      OTHER_FILES +=  $${QMAKE_INFO_PLIST} \
                      $${ENTITLEMENTS}
    
      # package target, creates standalone .app package
      package.depends += all first copydeploymentfolders
      package.commands += $$[QT_INSTALL_PREFIX]/bin/macdeployqt $${TARGET}.app;
      # Remove unneeded frameworks and plug-ins
      # package.commands += rm -r $${TARGET}.app/Contents/Frameworks/QtDeclarative.framework;
      package.commands += rm -r $${TARGET}.app/Contents/PlugIns/accessible;
      package.commands += rm -r $${TARGET}.app/Contents/PlugIns/bearer;
      package.commands += find $${TARGET}.app -name '*.DS_Store' -type f -delete;
      package.commands += chmod -R a+xr $${TARGET}.app
    
      # codesign target, creates dSym file and signs package from package step
      codesign.depends += package
      codesign.commands += dsymutil $${TARGET}.app/Contents/MacOS/$${TARGET} -o $${TARGET}.app.dSYM;
      # Sign frameworks and plug-ins (should be done in future?)
      # codesign -s "$APPCERT" -i $BUNDLEID $${TARGET}.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore
      # codesign -s "$APPCERT" -i $BUNDLEID $${TARGET}.app/Contents/PlugIns/imageformats/libqjpeg.dylib
      # Sign the application bundle, using the provided entitlements
      codesign.commands += codesign -s \"$${APPCERT}\" -fv --entitlements $${ENTITLEMENTS} $${TARGET}.app;
    
      # mas target, create an installer file for mac app store, combining the other targets
      mas.depends += package codesign
      mas.commands += productbuild --component $${TARGET}.app /Applications --sign \"$${INSTALLERCERT}\" $${TARGET}.pkg;
    
      QMAKE_EXTRA_TARGETS += package codesign mas copyfiles
    }
    
    # Print paths for debug purposes and support requests
    message(QT install prefix: $$QT_INSTALL_PREFIX)
    message(Felgo SDK path: $$VPLAY_SDK_PATH)
    message(Felgo target path: $$VPLAY_BASE_PATH)
    message(Felgo library path: $$VPLAY_LIBRARY_PATH)
    message(Felgo qml path: $$VPLAY_QML_PATH)
    message(Felgo include path: $$VPLAY_INCLUDE_PATH)
    message(VPlayPluginsGenericPath: $$VPlayPluginsGenericFolder.source)
    message(VPlayPluginsPlatformPath: $$VPlayPluginsPlatformFolder.source)
    message(QML_IMPORT_PATH: $$QML_IMPORT_PATH)
    
    # Please do not modify the following two lines. Required for deployment.
    include($$VPLAY_SDK_PATH/qmlapplicationviewer/vplayqmlapplicationviewer.pri)
    qtcAddDeployment()
    

    which brings up the known linker error

    g++-4.6 -m64 -Wl,-rpath,/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/lib -o MultiDragAndPinch main.o qmlapplicationviewer.o moc_qmlapplicationviewer.o    -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/lib -lpng12 -lz -lfontconfig /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/lib/lib64/libVPlay_debug.a -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/lib/lib64/third_party -lglfw -lGL -lcurl -lfreetype -ljpeg -lxml2 -lfmodex64 -lQtDeclarative -L/home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/lib -lQtScript -lQtSvg -L/usr/X11R6/lib64 -lQtSql -lQtXmlPatterns -lQtGui -lQtNetwork -lQtCore -lpthread 
    /usr/bin/ld: /home/eigel/libs/FelgoSDK/Desktop/Qt/4.8.1/gcc/../../../FelgoSDK/lib/lib64/libVPlay_debug.a(CCImage.o): undefined reference to symbol 'png_malloc@@PNG12_0'
    /usr/bin/ld: note: 'png_malloc@@PNG12_0' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libpng12.so so try adding it to the linker command line
    /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libpng12.so: could not read symbols: Invalid operation
    collect2: ld returned 1 exit status

    I also have a fresh ubuntu 13.04 64 installation so we should have identical library files. Not sure how to compare though.

    eigel@hilbert:~$ ls -la /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libpng12.so
    lrwxrwxrwx 1 root root 35 Nov 12  2012 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libpng12.so -> /lib/x86_64-linux-gnu/libpng12.so.0
    eigel@hilbert:~$ ls -la /lib/x86_64-linux-gnu/libpng12.so.0
    lrwxrwxrwx 1 root root 18 Nov 12  2012 /lib/x86_64-linux-gnu/libpng12.so.0 -> libpng12.so.0.49.0
    eigel@hilbert:~$ ls -la /lib/x86_64-linux-gnu/libpng12.so.0.49.0 
    -rw-r--r-- 1 root root 153944 Nov 12  2012 /lib/x86_64-linux-gnu/libpng12.so.0.49.0
    eigel@hilbert:~$ ldd /lib/x86_64-linux-gnu/libpng12.so.0.49.0 
    	linux-vdso.so.1 =>  (0x00007ffffc5ca000)
    	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7ce5495000)
    	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7ce5190000)
    	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7ce4dc7000)
    	/lib64/ld-linux-x86-64.so.2 (0x00007f7ce58f3000)
    eigel@hilbert:~$ nm -D /lib/x86_64-linux-gnu/libpng12.so.0.49.0 
                     U abort
                     U crc32
                     w __cxa_finalize
                     U deflate
                     U deflateEnd
                     U deflateInit2_
                     U deflateReset
                     U fflush
                     U __fprintf_chk
                     U fputc
                     U fread
                     U free
                     U fwrite
                     w __gmon_start__
                     U gmtime
                     U inflate
                     U inflateEnd
                     U inflateInit_
                     U inflateReset
                     w _ITM_deregisterTMCloneTable
                     w _ITM_registerTMCloneTable
                     w _Jv_RegisterClasses
                     U __longjmp_chk
                     U malloc
                     U memcmp
                     U memcpy
                     U __memcpy_chk
                     U memset
    0000000000000000 A PNG12_0
    0000000000004a70 T png_access_version_number
    0000000000016ef0 T png_build_grayscale_palette
    0000000000003f00 T png_check_sig
    000000000001beb0 T png_chunk_error
    000000000001bf10 T png_chunk_warning
    00000000000132a0 T png_convert_from_struct_tm
    00000000000132d0 T png_convert_from_time_t
    0000000000004850 T png_convert_to_rfc1123
    0000000000004120 T png_create_info_struct
    00000000000106e0 T png_create_read_struct
    00000000000102e0 T png_create_read_struct_2
    0000000000014850 T png_create_write_struct
    0000000000014560 T png_create_write_struct_2
    0000000000004180 T png_data_freer
    00000000000047b0 T png_destroy_info_struct
    00000000000123c0 T png_destroy_read_struct
    0000000000013a80 T png_destroy_write_struct
    000000000001bb50 T png_error
    000000000001b960 T png_free
    00000000000041c0 T png_free_data
    000000000001b940 T png_free_default
    00000000000075d0 T png_get_asm_flagmask
    00000000000075c0 T png_get_asm_flags
    0000000000006ac0 T png_get_bit_depth
    0000000000006d80 T png_get_bKGD
    0000000000006d40 T png_get_channels
    0000000000006db0 T png_get_cHRM
    0000000000006ec0 T png_get_cHRM_fixed
    0000000000006ae0 T png_get_color_type
    00000000000075a0 T png_get_compression_buffer_size
    0000000000006b40 T png_get_compression_type
    0000000000004990 T png_get_copyright
    000000000001bf90 T png_get_error_ptr
    0000000000006b00 T png_get_filter_type
    0000000000006fa0 T png_get_gAMA
    0000000000006fe0 T png_get_gAMA_fixed
    00000000000049b0 T png_get_header_ver
    00000000000049c0 T png_get_header_version
    00000000000070e0 T png_get_hIST
    0000000000007050 T png_get_iCCP
    0000000000007120 T png_get_IHDR
    0000000000006aa0 T png_get_image_height
    0000000000006a80 T png_get_image_width
    0000000000007870 T png_get_int_32
    0000000000006b20 T png_get_interlace_type
    0000000000004820 T png_get_io_ptr
    00000000000049a0 T png_get_libpng_ver
    000000000001ba40 T png_get_mem_ptr
    00000000000075f0 T png_get_mmx_bitdepth_threshold
    00000000000075e0 T png_get_mmx_flagmask
    0000000000007600 T png_get_mmx_rowbytes_threshold
    00000000000071f0 T png_get_oFFs
    0000000000007250 T png_get_pCAL
    0000000000007360 T png_get_pHYs
    0000000000006c00 T png_get_pixel_aspect_ratio
    0000000000006bc0 T png_get_pixels_per_meter
    00000000000073c0 T png_get_PLTE
    000000000001d930 T png_get_progressive_ptr
    0000000000007560 T png_get_rgb_to_gray_status
    0000000000006a40 T png_get_rowbytes
    0000000000006a60 T png_get_rows
    0000000000007400 T png_get_sBIT
    0000000000007310 T png_get_sCAL
    0000000000006d60 T png_get_signature
    00000000000070b0 T png_get_sPLT
    0000000000007020 T png_get_sRGB
    0000000000007430 T png_get_text
    0000000000007480 T png_get_tIME
    00000000000074b0 T png_get_tRNS
    00000000000078a0 T png_get_uint_16
    0000000000007800 T png_get_uint_31
    0000000000007840 T png_get_uint_32
    0000000000007530 T png_get_unknown_chunks
    0000000000007580 T png_get_user_chunk_ptr
    0000000000007630 T png_get_user_height_max
    000000000000c330 T png_get_user_transform_ptr
    0000000000007610 T png_get_user_width_max
    0000000000006a20 T png_get_valid
    0000000000006c80 T png_get_x_offset_microns
    0000000000006ce0 T png_get_x_offset_pixels
    0000000000006b60 T png_get_x_pixels_per_meter
    0000000000006cb0 T png_get_y_offset_microns
    0000000000006d10 T png_get_y_offset_pixels
    0000000000006b90 T png_get_y_pixels_per_meter
    00000000000049d0 T png_handle_as_unknown
    0000000000004100 T png_info_init
    0000000000004010 T png_info_init_3
    0000000000004840 T png_init_io
    000000000001df10 R png_libpng_ver
    000000000001b890 T png_malloc
    000000000001b870 T png_malloc_default
    000000000001b9a0 T png_malloc_warn
    000000000001ba00 T png_memcpy_check
    000000000001ba10 T png_memset_check
    0000000000004a80 T png_mmx_support
    000000000001de40 R png_pass_dsp_mask
    000000000001dec0 R png_pass_inc
    000000000001de60 R png_pass_mask
    000000000001dee0 R png_pass_start
    000000000001de80 R png_pass_yinc
    000000000001dea0 R png_pass_ystart
    00000000000066f0 T png_permit_empty_plte
    0000000000006720 T png_permit_mng_features
    000000000001d860 T png_process_data
    000000000001d8c0 T png_progressive_combine_row
    0000000000011f90 T png_read_destroy
    0000000000011a30 T png_read_end
    00000000000119b0 T png_read_image
    0000000000010c10 T png_read_info
    0000000000012510 T png_read_png
    00000000000112d0 T png_read_row
    00000000000118f0 T png_read_rows
    0000000000011240 T png_read_update_info
    0000000000004a50 T png_reset_zstream
    000000000000c710 T png_save_int_32
    000000000000c740 T png_save_uint_16
    000000000000c6e0 T png_save_uint_32
    000000000000bd90 T png_set_add_alpha
    00000000000069d0 T png_set_asm_flags
    0000000000014ca0 T png_set_background
    000000000000bc50 T png_set_bgr
    00000000000051d0 T png_set_bKGD
    0000000000005200 T png_set_cHRM
    0000000000005370 T png_set_cHRM_fixed
    0000000000006940 T png_set_compression_buffer_size
    0000000000014870 T png_set_compression_level
    0000000000014890 T png_set_compression_mem_level
    0000000000014960 T png_set_compression_method
    00000000000148b0 T png_set_compression_strategy
    00000000000148d0 T png_set_compression_window_bits
    0000000000014b80 T png_set_crc_action
    0000000000014d50 T png_set_dither
    000000000001bf70 T png_set_error_fn
    00000000000156a0 T png_set_expand
    00000000000156e0 T png_set_expand_gray_1_2_4_to_8
    000000000000bd20 T png_set_filler
    0000000000013b90 T png_set_filter
    0000000000013e10 T png_set_filter_heuristics
    00000000000136d0 T png_set_flush
    0000000000005530 T png_set_gAMA
    00000000000055d0 T png_set_gAMA_fixed
    0000000000015620 T png_set_gamma
    0000000000015700 T png_set_gray_1_2_4_to_8
    0000000000015740 T png_set_gray_to_rgb
    00000000000056c0 T png_set_hIST
    0000000000005d70 T png_set_iCCP
    0000000000005770 T png_set_IHDR
    000000000000bcf0 T png_set_interlace_handling
    00000000000069b0 T png_set_invalid
    000000000000bdd0 T png_set_invert_alpha
    000000000000bdf0 T png_set_invert_mono
    0000000000006740 T png_set_keep_unknown_chunks
    000000000001ba20 T png_set_mem_fn
    00000000000069f0 T png_set_mmx_thresholds
    0000000000005890 T png_set_oFFs
    000000000000bc80 T png_set_packing
    000000000000bca0 T png_set_packswap
    00000000000156c0 T png_set_palette_to_rgb
    00000000000058c0 T png_set_pCAL
    0000000000005b00 T png_set_pHYs
    0000000000005b30 T png_set_PLTE
    000000000001d8f0 T png_set_progressive_read_fn
    0000000000012870 T png_set_read_fn
    0000000000012500 T png_set_read_status_fn
    00000000000068c0 T png_set_read_user_chunk_fn
    0000000000015990 T png_set_read_user_transform_fn
    00000000000158c0 T png_set_rgb_to_gray
    0000000000015760 T png_set_rgb_to_gray_fixed
    00000000000068e0 T png_set_rows
    0000000000005c20 T png_set_sBIT
    0000000000005ad0 T png_set_sCAL
    000000000000bcc0 T png_set_shift
    0000000000003e00 T png_set_sig_bytes
    00000000000062e0 T png_set_sPLT
    0000000000005c50 T png_set_sRGB
    0000000000005c70 T png_set_sRGB_gAMA_and_cHRM
    0000000000014d10 T png_set_strip_16
    0000000000014d30 T png_set_strip_alpha
    000000000001bfb0 T png_set_strip_error_numbers
    000000000000bc60 T png_set_swap
    000000000000bdb0 T png_set_swap_alpha
    0000000000006120 T png_set_text
    0000000000006140 T png_set_tIME
    0000000000006170 T png_set_tRNS
    0000000000015720 T png_set_tRNS_to_alpha
    00000000000066c0 T png_set_unknown_chunk_location
    00000000000064e0 T png_set_unknown_chunks
    0000000000006a00 T png_set_user_limits
    000000000000c310 T png_set_user_transform_info
    00000000000129a0 T png_set_write_fn
    00000000000149b0 T png_set_write_status_fn
    00000000000149c0 T png_set_write_user_transform_fn
    0000000000003e50 T png_sig_cmp
    00000000000112b0 T png_start_read_image
    000000000001bd60 T png_warning
    000000000000ca10 T png_write_chunk
    000000000000c870 T png_write_chunk_data
    000000000000c9b0 T png_write_chunk_end
    000000000000c7e0 T png_write_chunk_start
    0000000000013800 T png_write_destroy
    00000000000130c0 T png_write_end
    00000000000136f0 T png_write_flush
    0000000000013610 T png_write_image
    0000000000012cb0 T png_write_info
    0000000000012a30 T png_write_info_before_PLTE
    00000000000149e0 T png_write_png
    0000000000013300 T png_write_row
    0000000000013680 T png_write_rows
                     U pow
                     U _setjmp
                     U __snprintf_chk
                     U __stack_chk_fail
                     U stderr
                     U strlen
                     U strtod
    eigel@hilbert:~$ nm -g /lib/x86_64-linux-gnu/libpng12.so.0.49.0 
    nm: /lib/x86_64-linux-gnu/libpng12.so.0.49.0: no symbols
    

    Not sure if the last line points to a problem? Do you have any suggestions?

    Best, Martin

    #5501

    Martin

    Just a quick remark: The checks in lines #140 and #157 of the modified prf was not smart. Temporarily changed to “linux-g++-64: …” instead.The rest of above still holds.

    So what’s up with that freakin’ png12 library?

    #5545

    Alex
    Felgo Team

    Martin,

    just tried another clean install of Ubuntu 13.04 64bit with the following installation steps:

    In terminal:

    # From installation guide
    sudo apt-get install g++ g++-4.6 libgl1-mesa-dev libglfw-dev freeglut3-dev libzip-dev
    # Additional dependencies for Ubuntu 13
    sudo apt-get install libfontconfig1-dev libpng12-dev

    I then downloaded the Felgo Linux 64bit Installer, installed 1.4.0 stable (deselected the daily build just to make sure the stable is working) and adapted the v-play.prf file to look like the following, beginning from line 165:

    LIBS += -L$$THIRDPARTY_LIBRARY_PATH
    LIBS += -lglfw -lGL
    LIBS += -lcurl -lfreetype -ljpeg -lxml2
    LIBS += -lpng12 -lz -lfontconfig # Added for Ubuntu 13

    After that our game templates build successfully and the games are running as intended. So I can’t reproduce any problems with our installation. 🙂

     

    So just to make sure:

    • Have you used the 64bit installer (and not the 32bit)?
    • Which Qt Creator version(s) have you tried? I used the shipped 2.4.1

    Thanks,

    Alex

    #5546

    Martin

    Ooops, 64bit intaller… I wasn’t too sure about that, uninstalled, did a fresh install, modified the prf, et voila. This now works with the shipped 2.4 qtcreator which makes me quite happy(*)! Nevertheless, there seem to be some issues with the latest qtcreator and I hope you will have a look at that sometime.

    Thanks for the support, Martin

    (*) since I now have v-play always with me on my shiny new notebook 😉

    #5547

    Alex
    Felgo Team

    Glad we’ve determined the problem and you’re ready to go with Felgo on the streets, at least on the 4th try. 😉 “The latest Qt Creator” means version 2.8 I guess?

    Best,

    Alex

    #5548

    Martin

    Yes, qtcreator 2.8. And yes, nothing beats Felgo development on the go anywhere anytime 😉

    Best,

    Martin

Viewing 15 posts - 1 through 15 (of 19 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded