Hi,

I'm using the "2.53" and "1.5" autotools.

The qt3 package (from qt-x11-free-3.0.5.tar.bz2) on my FreeBSD PC, requires
following:
  includes-dir: /usr/X11R6/include
  libraries-dir: /usr/X11R6/lib
  linking: -lqui (linking with /usr/X11R6/lib/libqui.so)

The -lqui is tricky because I don't know how to modify the configure scripts in
order to correctly
pick up this library. As a temporary solution, I created a link to
/usr/X11R6/libqui.so by
/usr/X11R6/libqt.so and /usr/X11R6/libqt.so.3.

I then tried "setenv QTDIR /usr/X11R6" before running configure, but that didn't
work:
  checking for Qt... configure: error: Qt2 (libraries) not found. Please check
your installation!
Why is QTDIR/lib and QTDIR/include not found?
So I ran configure with "--with-qt-includes=/usr/X11R6/include
--with-qt-libraries=/usr/X11R6/lib",
which eventually makes the configure reach to the end safely.

A "make" in my case fails as soon as it reaches into src/frontends/qt2/ui
directory.
Gmake does a much better job, but I get stuck at
src/frontends/qt2/Toolbar_pimpl.C:
  Toolbar_pimpl.C: In function `class QPixmap {anonymous}::getIconPixmap(int)':
  Toolbar_pimpl.C:45: `tie' undeclared in namespace `boost'
When this file includes the line
  #include <boost/tuple/tuple.hpp>
the problem is solved, and compilation continues almost until the very end:

  [...]
  g++ -g -O -Wno-non-template-friend -W -Wall -o lyx BufferView.o BufferView2.o
BufferView_pimpl.o Bullet.o Chktex.o CutAndPaste.o DepTable.o FloatList.o
Floating.o FuncStatus.o LColor.o LaTeX.o LaTeXFeatures.o LyXAction.o
MenuBackend.o ParagraphParameters.o Spacing.o TextCache.o Thesaurus.o
ToolbarDefaults.o box.o buffer.o bufferlist.o bufferparams.o bufferview_funcs.o
chset.o converter.o counters.o debug.o encoding.o exporter.o gettext.o
importer.o intl.o iterators.o kbmap.o kbsequence.o language.o lastfiles.o
lengthcommon.o lyx_cb.o lyx_main.o lyx_sty.o lyxcursor.o lyxfont.o lyxfind.o
lyxfunc.o lyxgluelength.o lyxlayout.o lyxlength.o lyxlex.o lyxlex_pimpl.o
lyxrc.o lyxrow.o lyxserver.o lyxtextclass.o lyxtextclasslist.o lyxvc.o main.o
paragraph.o paragraph_pimpl.o ispell.o pspell.o tabular.o tabular-old.o
tabular_funcs.o tex-accent.o tex-strings.o texrow.o text.o text2.o toc.o trans.o
trans_mgr.o undo.o undo_funcs.o vc-backend.o version.o vspace.o 
mathed/.libs/libmathed.a  insets/.libs/libinsets.a
frontends/.libs/libfrontends.a -lqt graphics/.libs/libgraphics.a
support/.libs/libsupport.a ../boost/libs/regex/src/.libs/libboostregex.a
../boost/libs/signals/src/.libs/libboostsignals.a ../intl/libintl.a -lXpm -lSM
-lICE -lc -lm -L/usr/X11R6/lib -lX11
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to `pthread_attr_destroy'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to `pthread_create'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to `pthread_attr_init'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to `pthread_exit'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to
`pthread_mutexattr_destroy'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to
`pthread_attr_setinheritsched'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to
`pthread_mutexattr_settype'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to `pthread_mutexattr_init'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to `pthread_mutex_trylock'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to
`pthread_attr_setdetachstate'
  /usr/X11R6/lib/libqt-mt.so.3: undefined reference to `pthread_cond_timedwait'
  gmake[3]: *** [lyx] Error 1

This is because -pthread is somewhere missing in the compilation process. This
is a typical FreeBSD issue.
Only on FreeBSD the compiler needs (sometimes?) the -pthread flag. man gcc:

  [...]
  -pthread   Link a user-threaded process against libc_r instead
             of libc. Objects linked into user-threaded processes
             should be compiled with -D_THREAD_SAFE.
  [...]

So I do "setenv CPPFLAGS -pthread" and once again configure/gmake.

OKAY!, but the executable only dumps core:

(gdb) run
Starting program: /home/lahaye/SOFTWARE/lyx-devel/src/lyx 

Program received signal SIGSEGV, Segmentation fault.
0x28704882 in xdr_u_int () from /usr/lib/libc.so.4
(gdb) bt
#0  0x28704882 in xdr_u_int () from /usr/lib/libc.so.4
#1  0x28704fe6 in xdr_bytes () from /usr/lib/libc.so.4
#2  0x287050b8 in xdr_netobj () from /usr/lib/libc.so.4
#3  0x2871b49a in .cerror () from /usr/lib/libc.so.4
#4  0x285cec39 in _X11TransSocketINETConnect () from /usr/X11R6/lib/libX11.so.6
#5  0x285cfd51 in _X11TransConnect () from /usr/X11R6/lib/libX11.so.6
#6  0x28598e66 in _X11TransConnectDisplay () from /usr/X11R6/lib/libX11.so.6
#7  0x285a7e9d in XOpenDisplay () from /usr/X11R6/lib/libX11.so.6
#8  0x2894e415 in qt_init_internal () from /usr/X11R6/lib/libqt-mt.so.3
#9  0x2894f534 in qt_init () from /usr/X11R6/lib/libqt-mt.so.3
#10 0x2899d383 in QApplication::construct () from /usr/X11R6/lib/libqt-mt.so.3
#11 0x2899d1ac in QApplication::QApplication () from
/usr/X11R6/lib/libqt-mt.so.3
#12 0x82c375b in lyx_gui::parse_init (argc=@0xbfbffa4c, argv=0xbfbffa98) at
lyx_gui.C:59
#13 0x811e1d8 in LyX::LyX (this=0xbfbffa1c, argc=@0xbfbffa4c, argv=0xbfbffa98)
at ../src/lyx_main.C:89
#14 0x816e3f2 in main (argc=1, argv=0xbfbffa98) at ../src/main.C:31
#15 0x8057fdd in _start () at QPrintDialog_moc.C:28


This is the first time I have come this far on my FreeBSD PC.
Any suggestions or comments?

Regards,
Rob.


PS: finally the list of warnings I get during the gmake:

GraphicsImageXPM.C:279: warning: comparison between signed and unsigned
QCommandEdit.C:34: warning: comparison between signed and unsigned
guiapi.C:228: warning: unused parameter `class LyXView & lv'
guiapi.C:228: warning: unused parameter `class Dialogs & d'
guiapi.C:279: warning: unused parameter `class LyXView & lv'
guiapi.C:279: warning: unused parameter `class Dialogs & d'
guiapi.C:332: warning: unused parameter `class LyXView & lv'
guiapi.C:332: warning: unused parameter `class Dialogs & d'
guiapi.C:384: warning: unused parameter `class LyXView & lv'
guiapi.C:384: warning: unused parameter `class Dialogs & d'
guiapi.C:418: warning: unused parameter `class LyXView & lv'
guiapi.C:418: warning: unused parameter `class Dialogs & d'
guiapi.C:436: warning: unused parameter `class InsetTabular * it'
guiapi.C:436: warning: unused parameter `class LyXView & lv'
guiapi.C:436: warning: unused parameter `class Dialogs & d'
guiapi.C:442: warning: unused parameter `class InsetTabular * it'
guiapi.C:442: warning: unused parameter `class LyXView & lv'
guiapi.C:442: warning: unused parameter `class Dialogs & d'
guiapi.C:464: warning: unused parameter `const class string & s'
guiapi.C:464: warning: unused parameter `class LyXView & lv'
guiapi.C:464: warning: unused parameter `class Dialogs & d'
qfont_loader.C:92: warning: enumeration value `WASY_FAMILY' not handled in
switch
qfont_loader.C:92: warning: enumeration value `INHERIT_FAMILY' not handled in
switch
qfont_loader.C:92: warning: enumeration value `IGNORE_FAMILY' not handled in
switch
qfont_loader.C:92: warning: enumeration value `NUM_FAMILIES' not handled in
switch
qfont_loader.C:101: warning: enumeration value `INHERIT_SERIES' not handled in
switch
qfont_loader.C:101: warning: enumeration value `IGNORE_SERIES' not handled in
switch
qfont_loader.C:108: warning: enumeration value `UP_SHAPE' not handled in switch
qfont_loader.C:108: warning: enumeration value `SMALLCAPS_SHAPE' not handled in
switch
qfont_loader.C:108: warning: enumeration value `INHERIT_SHAPE' not handled in
switch
qfont_loader.C:108: warning: enumeration value `IGNORE_SHAPE' not handled in
switch
qfont_metrics.C:47: warning: unused parameter `char c'
qscreen.C:171: warning: comparison between signed and unsigned
qscreen.C:171: warning: comparison between signed and unsigned
QERT.C:51: warning: `class QRadioButton * rb' might be used uninitialized in
this function
QGraphics.C:113: warning: `int item' might be used uninitialized in this
function
QGraphics.C:123: warning: `class QRadioButton * b' might be used uninitialized
in this function
QMinipage.C:101: warning: enumeration value `top' not handled in switch
QParagraph.C:224: warning: `int item' might be used uninitialized in this
function
QPrint.C:63: warning: `class QRadioButton * button' might be used uninitialized
in this function
screen.C:196: warning: comparison between signed and unsigned

Reply via email to