Am 07.07.2015 um 01:07 schrieb Jerry <lancebo...@qwest.net>:

> On Jul 5, 2015, at 10:58 PM, Stephan Witt <st.w...@gmx.net> wrote:
> <snip>
>>> If anything I have said above makes it look like I have a clue what I am 
>>> doing it is wrong--I'm at least 50% clueless here.
>> 
>> Which version/installation of Qt you'll use is determined by the 
>> --with-qt-dir switch for autotools builds.
>> In case you're using cmake as build system you have to set your PATH 
>> variable appropriately.
>> The directory where qmake is installed should come first, e.g. my cmake 
>> build scripts contains
>> export PATH="/Users/Shared/LyX/qt-5.4.2-frameworks-cocoa-x86_64/bin:${PATH}"
>> 
>> Regards, Stephan
> 
> Thanks for those remarks, Stephan.
> 
> Here is what I have done. I downloaded part of Qt from 
> https://www.qt.io/download/; from the installer program provided therefrom, I 
> selected only the gcc pre-built option. What I got was Qt Creator.app with 
> frameworks installed inside the app bundle. This is version 5.5, new as of 
> only a few days ago. The paths to the LyX repo and Qt frameworks are this:
> 
> /Applications/Words/LyXOuterFolder/git/lyx/
> /Applications/Words/LyXOuterFolder/git/qt/Qt Creator.app/Contents/Frameworks/
> 
> I ran the following script which is slightly modified from the script in 
> INSTALL.MacOSX:
> 
> 
> #!/bin/bash
> cd /Applications/Words/LyXOuterFolder/git/lyx/
>  ./autogen.sh
>  ./configure \
>      --with-version-suffix=-2.3 \
>      --with-libiconv-prefix=/usr/lib \
>      --with-x=no \
>      --disable-stdlib-debug \
>      --prefix=/Applications/Words/LyXOuterFolder/git \
>      --with-qt-dir="/Applications/Words/LyXOuterFolder/git/qt/Qt 
> Creator.app/Contents/Frameworks/"
>  make
>  make install-strip

I recommend out-of-source-tree builds. You avoid the pollution of your 
git clone with generated objects this way. Starting over is as simple
as removing the complete build folder. Make a sibling folder to build
LyX there, e.g.

$ cd /Applications/Words/LyXOuterFolder/git
$ mkdir -p build
$ (cd lyx ; ./autogen.sh)
$ (cd build ; ../lyx/configure --with-version-suffix=-2.3 … && make && make 
install-strip)


> I used the superstition of setting the version to 2.3 hoping that it might 
> not clobber version 2.2 stuff in the Applications Support folder.

Yes, this will work. But I think you can choose any more private string, like 
--with-version-suffix=-2.X or similar.

> 
> The process failed with these apparent C++ errors:

I think I've seen these errors with Xcode 6 and the accompanying clang compiler.
It has something to do with cxx11 if I'm not mistaken. Sorry, I forgot the 
details.
I'm on Xcode 5 and Mac OS X 10.8.6 for my daily work.

> /Applications/Xcode.app/Contents/Developer/usr/bin/make  install-am
> make[7]: Nothing to be done for `install-exec-am'.
> make[7]: Nothing to be done for `install-data-am'.
> Making install in .
> make[6]: Nothing to be done for `install-exec-am'.
> make[6]: Nothing to be done for `install-data-am'.
> Making install in .
>  CXX      CutAndPaste.o
> CutAndPaste.cpp:390:15: error: call to 'next' is ambiguous
>                pars.insert(next(pars.begin(), pit),
>                            ^~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iterator:509:1:
>  note: 
>      candidate function [with _ForwardIter = 
> std::__1::__list_iterator<lyx::Paragraph, void *>]
> next(_ForwardIter __x,
> ^
> ./support/lyxalgo.h:92:11: note: candidate function [with It =
>      std::__1::__list_iterator<lyx::Paragraph, void *>, Diff = long]
> inline It next(It i, Diff n = 1)
>          ^
> CutAndPaste.cpp:398:15: error: call to 'next' is ambiguous
>                pars.insert(next(pars.begin(), pit + 1),
>                            ^~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iterator:509:1:
>  note: 
>      candidate function [with _ForwardIter = 
> std::__1::__list_iterator<lyx::Paragraph, void *>]
> next(_ForwardIter __x,
> ^
> ./support/lyxalgo.h:92:11: note: candidate function [with It =
>      std::__1::__list_iterator<lyx::Paragraph, void *>, Diff = long]
> inline It next(It i, Diff n = 1)
>          ^
> CutAndPaste.cpp:602:26: error: call to 'next' is ambiguous
>        ParagraphList copy_pars(next(pars.begin(), startpit),
>                                ^~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iterator:509:1:
>  note: 
>      candidate function [with _ForwardIter = 
> std::__1::__list_const_iterator<lyx::Paragraph, void
>      *>]
> next(_ForwardIter __x,
> ^
> ./support/lyxalgo.h:92:11: note: candidate function [with It =
>      std::__1::__list_const_iterator<lyx::Paragraph, void *>, Diff = long]
> inline It next(It i, Diff n = 1)
>          ^
> 3 errors generated.
> make[4]: *** [CutAndPaste.o] Error 1
> make[3]: *** [install-recursive] Error 1
> make[2]: *** [install] Error 2
> make[1]: *** [install-recursive] Error 1
> make: *** [install-strip] Error 2
> 
> 
> 
> 
> These notwithstanding, it looks like there could be Qt problems later. I 
> spotted the following lines:
> 
> checking whether Qt5 is requested... no
> 
> and
> 
> Configuration
> ...
>  Qt Frontend:
>      Qt version:         4.8.7
> ...
> 
> Qt 4.8.7 is my MacPorts installation.
> 
> FWIW, I see that in config.log, this appears:
> 
> --with-qt-dir=/Applications/Words/LyXOuterFolder/git/qt/Qt 
> Creator.app/Contents/Frameworks/
>                                                          ^ note space
> 
> Notice that the quotes from my script have been removed.

Yes, that's the difference between the ideal and the real world.
Unix is able to handle spaces in path names as long as nobody makes a mistake.
One has to quote every path name variable in scripts - it is not automatic.
Since the configure script is generated by auto tools I think it would be
easier to solve it pragmatically instead of getting it right.

The practical solution is to rename your Qt Creator application name and
remove the space from path name. I think it doesn't break the app -
at least it should not.

Regards, Stephan

Reply via email to