Jean-Marc Lasgouttes wrote:
Mikhail> 2. -lc -- explicitly linking with libc is wrong, AFAIK, but
Mikhail> the configure-generated Makefiles do this. This was an issue
Mikhail> with earlier LyX versions as well.
Would the attached patch be OK? (the tex2lyx part is unrelated but
should not hurt).
The patch is for configure.ac, which I don't use :) I don't even have
autoconf-2.61 (only 2.59), which is needed to regenerate configure after
applying your patch. I guess, the patch would work...
Mikhail> But, for a while Qt4 and Qt3 will often be found _on the same
Mikhail> machine_. Currently, I have to patch LyX'
Mikhail> src/frontends/qt4/Makefile to make sure, the
Mikhail> -I/usr/local/include is _the last_ of the QT4_INCLUDES, _and_
Mikhail> insert the -I/usr/local/include/Qt at the beginning.
Mikhail> Unfortunately, specifying the correct location with
Mikhail> ``--with-qt4-includes'' does not have any effect.
What do you means by no effect? Really "no effect"? Could we get to
see the config.log?
Yes, no effect. The entire config.log is large, but here are the
Qt4-related pieces (I use /opt instead of the customary /usr/local on
this desktop):
$ ./configure --with-extra-lib=/opt/lib --with-extra-inc=/opt/include
--without-included-boost --with-qt4-includes=/opt/include/Qt --mandir=/opt/man
--program-transform-name= --with-libintl-prefix=/opt
--with-qt-includes=/opt/include --with-qt-libraries=/opt/lib
--with-extra-libs=/opt/lib --with-extra-includes=/opt/include --enable-debug
--with-pspell --with-pspell-lib=/opt/lib --with-pspell-include=/opt/include
--x-libraries=/opt/lib --x-includes=/opt/include --prefix=/opt
amd64-portbld-freebsd6.2
configure:5366: result: qt4
configure:24293: checking for QT4_CORE
configure:24370: checking for QT4_FRONTEND
configure:24680: checking for moc-qt4
configure:24699: found /opt/bin/moc-qt4
configure:24711: result: /opt/bin/moc-qt4
configure:24726: checking for uic-qt4
configure:24745: found /opt/bin/uic-qt4
configure:24757: result: /opt/bin/uic-qt4
config.status:35656: creating src/frontends/qt4/Makefile
config.status:35656: creating src/frontends/qt4/ui/Makefile
ac_cv_env_QT4DIR_set=''
ac_cv_env_QT4DIR_value=''
ac_cv_env_QT4_CORE_CFLAGS_set=''
ac_cv_env_QT4_CORE_CFLAGS_value=''
ac_cv_env_QT4_CORE_LIBS_set=''
ac_cv_env_QT4_CORE_LIBS_value=''
ac_cv_env_QT4_FRONTEND_CFLAGS_set=''
ac_cv_env_QT4_FRONTEND_CFLAGS_value=''
ac_cv_env_QT4_FRONTEND_LIBS_set=''
ac_cv_env_QT4_FRONTEND_LIBS_value=''
ac_cv_path_MOC4=/opt/bin/moc-qt4
ac_cv_path_UIC4=/opt/bin/uic-qt4
pkg_cv_QT4_CORE_CFLAGS='-DQT_SHARED -I/opt/include -I/opt/include/QtCore '
pkg_cv_QT4_CORE_LIBS='-pthread -L/opt/lib -lQtCore -lz -lm -lgthread-2.0
-lglib-2.0 -liconv '
pkg_cv_QT4_FRONTEND_CFLAGS='-DQT_SHARED -I/opt/include -I/opt/include/QtCore
-I/opt/include/QtGui '
pkg_cv_QT4_FRONTEND_LIBS='-pthread -L/opt/lib -lQtGui -lpng -lSM -lICE -lQtCore
-lz -lgthread-2.0 -lglib-2.0 -liconv -lXi -lXrender -lXrandr -lXfixes -lXcursor
-lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm '
qt4_cv_dir=''
qt4_cv_includes=/opt/include/Qt
FRONTENDS='qt4'
FRONTENDS_PROGS=' lyx-qt4$(EXEEXT)'
FRONTENDS_SUBDIRS=' qt4'
MOC4='/opt/bin/moc-qt4'
QT4DIR=''
QT4_CORE_CFLAGS='-DQT_SHARED -I/opt/include -I/opt/include/QtCore '
QT4_CORE_INCLUDES='-DQT_SHARED -I/opt/include -I/opt/include/QtCore '
QT4_CORE_LDFLAGS='-L/opt/lib '
QT4_CORE_LIB='-lQtCore -lz -lm -lgthread-2.0 -lglib-2.0 -liconv '
QT4_CORE_LIBS='-pthread -L/opt/lib -lQtCore -lz -lm -lgthread-2.0 -lglib-2.0
-liconv '
QT4_CPPFLAGS='-DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_STL
-DQT_NO_KEYWORDS'
QT4_FRONTEND_CFLAGS='-DQT_SHARED -I/opt/include -I/opt/include/QtCore
-I/opt/include/QtGui '
QT4_FRONTEND_LIBS='-pthread -L/opt/lib -lQtGui -lpng -lSM -lICE -lQtCore -lz
-lgthread-2.0 -lglib-2.0 -liconv -lXi -lXrender -lXrandr -lXfixes -lXcursor
-lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm '
QT4_INCLUDES='-DQT_SHARED -I/opt/include -I/opt/include/QtCore
-I/opt/include/QtGui '
QT4_LDFLAGS='-L/opt/lib '
QT4_LIB='-lQtGui -lpng -lSM -lICE -lQtCore -lz -lgthread-2.0 -lglib-2.0 -liconv
-lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig
-lXext -lX11 -lm '
QT4_VERSION='4.2.3'
RPM_FRONTEND='qt4'
UIC4='/opt/bin/uic-qt4'
Mikhail> 4. Parallel builds. Specifying `-j4' to the top-level gmake
Mikhail> breaks build. Adding the flag to AM_MAKEFLAGS (so that it is
Mikhail> passed to all sub-makes) works. LyX takes a while to build,
Mikhail> but more and more machines offer multiple CPU cores, so
Mikhail> supporting parallel builds would be quite useful. Never tried
Mikhail> it with previous LyX versions -- may not be a new problem.
It works here. Could it be a GNU make thing? What error do you get?
A .Tpo file being an invalid object or something -- the file was still
being written out by compiler, when linker tried to use it. These things
are hard to reproduce, because the races are won by different pieces at
different times :) And I really do have 4 CPUs.
Yours,
-mi