Hi Stephan,
I have all the compilers installed that come with Xcode, but I would prefer working from the command line rather than using the large Xcode GUI, which is difficult to use when I travel and have to use a laptop.

As for Qt, the pre-built Qt package released by Nokia comes as a system-wide install; for debugging LyX, I would prefer to install it in ~/qt. So if the instructions in INSTALL.MacOSX are corrected, then I can hopefully compile and install Qt and LyX, and test it.

Currently, it seems that INSTALL.MacOSX is out of date, as it is inconsistent with development/LyX-Mac-binary-release.sh, and does not seem to work (at least on my system). For your convenience (I hope this is not an annoyance), I have described the issue in a bug report, and assigned minor severity to it:

http://www.lyx.org/trac/ticket/6874

I'm still trying to figure out which build configuration actually works, and will let you know once I was successful.

As for the documentation,
>
I have one question: are you able to work with Xcode?

I'm using Xcode for coding and debugging of LyX-2.0. (Xcode+LyX-1.6 I've not 
tested yet.)
For the final package build I switch to the utility script 
"development/LyX-Mac-binary-release.sh".

To get started with Xcode I'm using cmake to generate the project file. See 
instructions in INSTALL.cmake.

The following script automates this (I placed it one level above the lyx-devel 
checkout):

==========================================
export CMAKE_OSX_ARCHITECTURES="i386"
export CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386"
export SDKROOT="/Developer/SDKs/MacOSX10.5.sdk"
export CMAKE_OSX_ARCHITECTURES="i386"
export MACOSX_DEPLOYMENT_TARGET=10.5

rm -rf lyx-build/lyx-cmake

mkdir lyx-build/lyx-cmake

cd lyx-build/lyx-cmake&&  cmake ../../lyx-devel/development/cmake -G "Xcode"\
    -DLYX_ASPELL=ON\
    -DLYX_DEBUG=ON -DLYX_RELEASE=OFF -DLYX_PACKAGE_SUFFIX=OFF 
-DLYX_PROGRAM_SUFFIX=OFF
mkdir -p bin&&  ln -s $HOME/LyX-2.0.0.app/Contents/Resources bin
==========================================

The prerequisites are:
* the Qt4 frameworks installed on system (with the .dmg from nokia)
* the LyX application (development version) installed in home for the required 
LyX resources

If you have no current LyX app installed somewhere you have to point the LyX 
binary with cmd-args in Xcode to your lyx-devel checkout:
1. locate the LyX item inside executables
2. open Info and add in arguments tab two items
    -sysdir
    .../lyx-devel/lib  (expand the ... with your checkout parent path)

On startup LyX searches the configure.py script and doesn't work when unable to 
locate it.
If you use cmd-args for configure.py lookup you should remove the last line of 
the script above.

Stephan


Hi Cyrille,

I'm building LyX with Qt4 frameworks using the script 
"development/LyX-Mac-binary-release.sh".
I'll try to build with statically linked Qt later and report what I find - 
it'll take some time.
At the time of the last change in INSTALL.MacOS the latest Qt4 was 4.6.2.
But I think using 4.6.3 will make no difference for your problem...

Stephan

I have compiled qt according to the instructions in INSTALL.MacOS in the 
lyx-devel sources, with the exception of using 64 bits because my system is not 
set up for 32 bits:

This one I don't understand. Do you mean your ports libraries?
MacOSX 10.6 itself is able to run 32 bit as well as 64 bit apps.


./configure -opensource -silent -static -release -fast -no-framework -no-webkit 
-no-qt3support -no-javascript-jit -no-dbus -no-exceptions -nomake examples 
-nomake tools -nomake demos -nomake docs -arch x86_64 -prefix ${HOME}/qt4


The version of QT which I used is 4.6.2, because INSTALL.MacOS referred to that 
older version rather than the current 4.6.3.

Likewise, LyX was configured with the usual options:

./configure --prefix=${HOME}/LyX-devel.app --with-version-suffix=-2.0 
--with-qt4-dir=${HOME}/qt4 --with-included-gettext --enable-optimization=-O2  
--disable-stdlib-debug&&  make


I only get a few warnings during compilation, but otherwise it is successful. 
What should I do to fix the problem with LyX crashing?

I'll have to test your recipe to answer this.

Here it isn't working to...
Apparently the static version of Qt4 is the problem.
I recommend to install the frameworks from Nokia and configure and build LyX 
with the frameworks.
Or try to build your own Qt with -shared instead of -static.



The problem is identical on lyx-devel from svn, and on lyx 1.6.7.

* Do I need a different qt_menu.nib (it's a directory containing several files) 
from somewhere other than the qt sources?

No.


* Is it the -static flag in my QT configuration that causes the problem? At 
least 1 1/2 years ago, this was not supported yet:

http://lists.trolltech.com/pipermail/qt4-preview-feedback/2009-February/000563.html

It seems so.


* Is there a way for the LyX compilation process to include qt_menu.lib, or to 
not require it?

Don't know how.


* Do I have to compile qt as universal and LyX as 32 bits? (As the initial 
issue are missing files, this may not be the case.)

No, I don't think so.

My Mac OS X is the latest version (10.6.4), with gcc 4.2.1, Darwin Kernel 
10.4.0.




--
Regards,
Cyrille Artho - http://artho.com/
Nothing is in the understanding, which is not first in the senses.
                -- John Locke

Reply via email to