Am 23.08.2014 um 12:01 schrieb Patrick De Visschere <pdvissch...@edpnet.be>:
> On 20 Aug, 2014, at 23:15 , Stephan Witt <st.w...@gmx.net> wrote: > >> Am 20.08.2014 um 22:45 schrieb Patrick De Visschere <pdvissch...@edpnet.be>: >> >>> On 20 Aug, 2014, at 11:22 , Stephan Witt <st.w...@gmx.net> wrote: >>> >>>> Am 19.08.2014 um 22:41 schrieb Patrick De Visschere >>>> <pdvissch...@edpnet.be>: >>>> >>>>> On 19 Aug, 2014, at 14:12 , Stephan Witt <st.w...@gmx.net> wrote: >>>>> >>>>>> Am 17.08.2014 um 20:13 schrieb Patrick De Visschere >>>>>> <pdvissch...@edpnet.be>: >>>>> >>>>> My environment >>>>> >>>>> * Mac OS X 10.9.4 >>>>> * Darwin Kernel Version 13.3.0 >>>>> * Qt 5.3.1 (stable branch) (default Cocoa) >>>>> ./configure -opensource -silent -shared -release -no-dbus -nomake >>>>> examples -nomake tools -no-framework >>>> >>>> You don't build the libraries as frameworks. I'm not sure if this makes no >>>> difference. >>>> >>>> I'm using the Qt frameworks I've build myself. >>>> >>>> Stephan >>> >>> Stephan, >>> >>> I was planning to do that. (the qt-debug build does not make a difference >>> as you expected) >>> >>> I suppose you use the LyX-Mac-binary-release.sh script. >>> >>> I have never managed to use this script without making changes to it, >>> perhaps because I’m using it the wrong way. >>> >>> I build qt as a framework separately and would then use the script like: >>> >>> sh development/LyX-Mac-binary-release.sh --with-qt-frameworks=yes >>> --with-qt-dir=/Users/pdv/Developer/public/Trolltech/Qt-5.3.1 >>> --qt-deployment=yes --with-macosx-target=10.8 --with-sdkroot=10.8 >>> --with-arch=x86_64 --with-libiconv-prefix=/opt/local --enable-debug >>> >>> I think the --with-qt-frameworks=yes is needed to include qt as a framework; >>> >>> and --with-qt-dir=/… points to the dir where the qt-framework has been >>> installed (previously). >>> >>> I’m not sure about the exact meaning of --qt-deployment=yes but I think I >>> need it too. >>> >>> What I don’t understand are the lines 260-262 >>> if [ "${configure_qt_frameworks}" != "yes" ]; then >>> QtInstallDir=${QTDIR:-"/opt/qt4"} >>> fi >>> >>> with --with-qt-frameworks=yes, QtInstallDir is not set. >>> >>> Therefore I uncomment the if/fi so that >>> QtInstallDir=${QTDIR:-"/opt/qt4”} >>> >>> is always executed and QtInstallDir points to my qt-install dir. >>> >>> In addition I must modify some CPPFLAGS= ... >>> >>> Any idea what I’m doing wrong? >>> >>> Patrick De Visschere >> >> Perhaps I should remove the --with-qt-frameworks switch. I don't use it >> anymore >> and it was meant as "with the frameworks by Qt (Nokia)". The >> --qt-deployment=yes >> is default and with it the script copies the frameworks to the package. This >> is >> needed if you want to use the LyX app on another system. >> >> I'd avoid the --with-libiconv-prefix=/opt/local switch. >> >> This is the shell script I'm using for calling LyX-Mac-binary-release.sh: >> >> #!/bin/sh >> ARCH=x86_64 >> QtVersion=5.3.1 >> QtAPI=-cocoa >> LyXVersion=lyx >> CC=cc CXX=c++ \ >> QtConfigureOptions="-debug-and-release" QtAPI=${QtAPI} >> QtVersion=${QtVersion} \ >> sh ${MKFLAGS} ${LyXVersion}/development/LyX-Mac-binary-release.sh \ >> --with-sdkroot=10.8 --with-macosx-target=10.6 --with-arch=${ARCH} \ >> --with-qt-dir=/Users/Shared/LyX/qt-${QtVersion}-frameworks${QtAPI}-${ARCH} >> \ >> "$@" >> >> Stephan > > I’ve build LyX+Qt5 with the LyX-Mac-binary-release.sh script and the menubar > appears immediately. Since with XCode I use the macports iconv library that > could still theoretically be the culprit. Or maybe it’s just due to Xcode. > Anyway this is not very important; > I tried to build (with Xcode) without aspell and hunspell but somehow cmake > doesn’t want that. This is my script to call cmake for Xcode project generation: #!/bin/sh export PATH="/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64/bin:${PATH}" LyxSourceDir="$(pwd)/lyx" LyxUtilDir="/Users/Shared/LyX/utilities" CMAKE_GENERATOR="Xcode" LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 | tr -d " ()") LyxBuildDir=lyx-build/cmake/"${LyXVersion}" if [ -f "${LyxSourceDir}/development/cmake/CMakeLists.txt" ]; then TOPCMAKE="${LyxSourceDir}/development/cmake" COPYRESOURCES="yes" else TOPCMAKE="${LyxSourceDir}" fi rm -rf "${LyxBuildDir}" mkdir -p "${LyxBuildDir}" case "$(qmake -version)" in *Using*5.*) LYX_USE_QT="-DLYX_USE_QT=QT5" esac SPELLER_OPTIONS="-DASPELL_INCLUDE_DIR=${LyxUtilDir}/include \ -DASPELL_LIBRARY_RELEASE=${LyxUtilDir}/lib/libaspell.dylib \ -DHUNSPELL_INCLUDE_DIR=${LyxUtilDir}/include \ -DHUNSPELL_LIBRARY=${LyxUtilDir}/lib/libhunspell.dylib \ -DMagic_INCLUDE_DIR=${LyxUtilDir}/include \ -DMagic_LIBRARY=${LyxUtilDir}/lib/libmagic.dylib \ -DLYX_ASPELL=ON -DLYX_HUNSPELL=ON" ( cd "${LyxBuildDir}" && \ cmake -G "${CMAKE_GENERATOR}" "${TOPCMAKE}" \ -DLYX_NLS=OFF \ -DLYX_DEVEL_VERSION=ON -DLYX_DEBUG=ON -DLYX_RELEASE=OFF \ -DLYX_DEBUG_GLIBC=OFF -DLYX_DEBUG_GLIBC_PEDANTIC=OFF \ -DLYX_PACKAGE_SUFFIX=OFF -DLYX_PROGRAM_SUFFIX=OFF \ ${LYX_USE_QT} \ ${SPELLER_OPTIONS} \ "$@" ) # end of script I'm using only self made libraries with Xcode too. Therefore I can work with both environments, Xcode for debugging and autotools for packaging. > There were/are still some problems (with the manual build): > > 1) Aspell as it is fails to build (on 10.9 I assume). This is easily solved > by applying the small patch used by macports. > > 2) I don’t understand how the lyx-build is supposed to find the > Qt5-frameworks; Apparently the switches > --enable-qt5 --with-qt-dir=/Users/pdv/Developer/public/Trolltech/Qt-5.3.1 > are not sufficient. I don't use --enable-qt5. I've studiedd the configure script and I think it does the wrong thing on a Mac. On a Mac the Qt libraries are not renamed for Qt5, the core framework is named QtCore and not Qt5Core, e.g. Perhaps you have to avoid it. > As before I changed the FLAGS in the script as follows (this is around line > 610 of the script) > > if [ "$configure_qt_frameworks" = "yes" ]; then > export QT_CORE_CFLAGS="-FQtCore" > export QT_CORE_LIBS="-framework QtCore" > export QT_FRONTEND_CFLAGS="-FQtGui" > export QT_FRONTEND_LIBS="-framework QtGui" > CPPFLAGS="${CPPFLAGS} > -I${SDKROOT}/Library/Frameworks/QtCore.framework/Headers" > CPPFLAGS="${CPPFLAGS} > -I${SDKROOT}/Library/Frameworks/QtGui.framework/Headers" > else > CPPFLAGS="${CPPFLAGS} > -I${QtInstallDir}/lib/QtCore.framework/Headers" > CPPFLAGS="${CPPFLAGS} > -I${QtInstallDir}/lib/QtGui.framework/Headers" > CPPFLAGS="${CPPFLAGS} > -I${QtInstallDir}/lib/QtWidgets.framework/Headers" > CPPFLAGS="${CPPFLAGS} > -I${QtInstallDir}/lib/QtMacExtras.framework/Headers" > CPPFLAGS="${CPPFLAGS} > -I${QtInstallDir}/lib/QtConcurrent.framework/Headers" > CPPFLAGS="${CPPFLAGS} -F${QtInstallDir}/lib" > LDFLAGS="-L/usr/lib ${LDFLAGS} -F${QtInstallDir}/lib > -framework QtCore -framework QtGui -framework QtWidgets -framework > QtMacExtras -framework QtConcurrent" > fi > > 3) the lyx-build does not find the right iconv library when linking; that may > be because of the /opt/local in my PATH; but even with the switch > --with-libiconv-prefix=/usr it is still not found. > Therefore I also had to add -L/usr/lib to the LDFLAGS as you can see above. That's not nice. Do you have any other component from /opt/local included? aspell, hunspell or libmagic? Stephan