Abdelrazak Younes <[EMAIL PROTECTED]> writes: > Success! I managed to compile everything (qt4) without MSYS. There two > small problem though: > 1) I have to use -sysdir option because the generated executable look > for an inexistant directory: > > $ ./lyx-qt4 > Unable to determine the system directory having searched > d:/msys/home/yns/lyx/trunk/share/lyx-svn/ > Try the '-sysdir' command line parameter or set the environment variable > LYX_DIR_14x to the LyX system directory containing the file `chkconfig.ltx'.
That also happened to me once, when I tried running LyX in place. However, after installation I had no problems. If I remember correctly, it was immediately after the switch from ...\Resources\lyx to ...\Resources so, perhaps this is the case with you, too. If not, see below. I don't see this problem anymore, so may be it was due to not updated configuration files. > 2) I had to hack the source code in order to replace '/tmp' with > 'c:/temp' because lyx tells me it cannot write the '/tmp' directory. > > Except for that I am happy to report that I cannot see any difference > with the lyx I generated within MSYS. Except that the executable is > smaller (12Mo instead of 19Mo) and that the compilation is faster. This may simply be due to the fact that mingw executables are to be stripped. I don't see any significant difference in size between a mingw and a cygwin LyX. > Enrico, if you have any hint for the problems above... Well, if '/tmp' is present in the source code, this is a bug with a native LyX and you have no choice but replacing it with a proper path, probably protecting the change using an #ifdef. But it may be a configuration problem. All cygwin tools use posix syntax by default, so care must be taken when generating Makefiles if they are meant for building a native version of LyX. For example, when invoking 'configure', you should use --prefix=C:/Programs/LyX instead of --prefix=/c/Programs/LyX, but it is safe using --with-extra-prefix=/c/MinGW. Another problem can arise when a path is autogenerated by configure. There is some code in the configure script that turns 'C:/Programs/LyX' into '/c/Programs/LyX' (or '/cygdrive/c/Programs/LyX', depending on your settings), so I had to add the following to the sed command I use for modifying configure: # Set locale and data dir in mixed rather than posix format /^ *LYX_ABS_INSTALLED/s/\(^ *\)/\1ac_val=`cygpath -m \"\$ac_val\"`\n\1/ otherwise I get '/c/Programs/LyX/Resources/locale' hardcoded into the executable instead of 'C:/Programs/LyX/Resources/locale', and the net effect would be that setting LANG to some locale doesn't work. Thinking about it, perhaps this is the reason (hardcoded path) why Angus reports that setting LANG seems not working in mingw builds. However, this is the only problem that I spotted. To be honest there was another one, but it was about the recognition of a multi-threaded Qt. For some reason the default test program used in configure: int main () { QApplication a(0,0); a.unlock(); ; return 0; } fails compilation and a multi-threaded Qt would be not recognized as such. I had to modify that program in the following way: int main () { int argc; char **argv = NULL; QApplication a(argc,argv); a.unlock(); ; return 0; } for the test to be successful in the case Qt is multi-threaded. I think that's all. The native LyX I compile using cygwin is fully functional and until now I have seen no side effects. -- Enrico