Am 23.08.2014 um 18:01 schrieb Patrick De Visschere <pdvissch...@edpnet.be>:

> On 23 Aug, 2014, at 14:50 , Stephan Witt <st.w...@gmx.net> wrote:
> 
>> 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.
> 
> Without —enable-qt5 (and the script as it is) I get this error when 
> configuring
> checking for QT_CORE... checking for QT_FRONTEND... checking for X... disabled
> checking for Qt library name... failed
> configure: error: cannot compile a simple Qt executable. Check you have the 
> right $QTDIR.
> ERROR: Cannot build and install LyX for x86_64.
> 
> When including --enable-qt5 this goes away but still the qt-includes are not 
> found.
> 
> Once I modify the scripts as below the --enable-qt5 is not needed anymore.
> 
> In the configure.log I find this variable
> QT_INCLUDES='-I/Users/pdv/Developer/public/Trolltech/Qt-5.3.1//include 
> -I/Users/pdv/Developer/public/Trolltech/Qt-5.3.1//include/Qt 
> -I/Users/pdv/Developer/public/Trolltech/Qt-5.3.1//include/QtCore 
> -I/Users/pdv/Developer/public/Trolltech/Qt-5.3.1//include/QtGui 
> -I/Users/pdv/Developer/public/Trolltech/Qt-5.3.1//include/QtWidgets 
> -I/Users/pdv/Developer/public/Trolltech/Qt-5.3.1//include/QtConcurrent 
> -I/Users/pdv/Developer/public/Trolltech/Qt-5.3.1//include/QtMacExtras’
> 
> I don’t understand the // in the paths, but the frameworks are not in the 
> include directory.

They don't hurt. I'd guess the paths are constructed and somewhere the slashes 
are added twice "to be sure".

> These paths would make sense if qt was build with -no-framework, which is not 
> the case.

This is the successful conftest command from my configure log:
configure:9758: c++ -o conftest -Os 
-I/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//include 
-I/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//include/Qt 
-I/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//include/QtCore 
-I/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//include/QtGui 
-I/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//include/QtWidgets 
-I/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//include/QtConcurrent 
-I/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//include/QtMacExtras 
-F/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//lib  
-I/Users/Shared/LyX/utilities/include  -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
 -arch x86_64 -mmacosx-version-min=10.6  -L/Users/Shared/LyX/utilities/lib 
-isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
 -arch x86_64 -mmacosx-version-min=10.6 conftest.cpp  -liconv -lz -lmagic 
-framework QtCore -framework QtConcurrent -framework QtWidgets -framework 
QtMacExtras -framework QtGui

For the link step with frameworks the 
"-F/Users/Shared/LyX/qt-5.3.1-frameworks-cocoa-x86_64//lib" switch is 
essential, IMO.

Stephan

Reply via email to