Subject: qt3-libs and libtool and Darwin
To: None <tech-pkg@NetBSD.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 01/20/2005 15:06:23
The qt3-libs pkgsrc build uses its own custom qmake.conf to do the builds.
See x11/qt3-libs/files/qmake.conf. It use libtool for compiling, linking,
etc.
The qt3-libs do-install target also uses libtool, like:
${LIBTOOL} ${INSTALL_LIB} ${WRKSRC}/lib/libqt-mt.la ${QTPREFIX}/lib/
${LIBTOOL} ${INSTALL_LIB} ${WRKSRC}/plugins/imageformats/libqjpeg.la ${QTPREFIX}/plugins/imageformats/
${LIBTOOL} ${INSTALL_LIB} ${WRKSRC}/plugins/imageformats/libqmng.la ${QTPREFIX}/plugins/imageformats/
I am working on qt3-libs to build under Darwin. I found various patches to
get it to build.
I tried using the libtool method, but ended up with build failures and
then many qmake references without full path. The libtool build failures
were like:
libtool: link: CURRENT `libqt-mt.3.so' is not a nonnegative integer
libtool: link: `libqt-mt.3.so:libqt-mt.3.3.so' is not valid version
information
I ended up using my own qmake.conf for Darwin (that didn't use libtool).
Here are some of my qmake.conf settings:
CONFIG += qt warn_on release native_precompiled_headers
CONFIG += qt warn_on release link_prl lib_version_first
DEFINES += __DARWIN_X11__
QMAKE_CFLAGS = -pipe -fno-common -fPIC
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = -Os
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_EXTENSION_SHLIB = dylib
QMAKE_EXTENSION_PLUGIN = so
QMAKE_CFLAGS_THREAD =
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_LFLAGS = -lresolv
QMAKE_LFLAGS_APP = -prebind
QMAKE_LFLAGS_APP = -prebind
QMAKE_LFLAGS_SHLIB = -prebind -dynamiclib -single_module
-headerpad_max_install_names -install_name $$QMAKE_LIBDIR/$(TARGET1)
QMAKE_LFLAGS_PLUGIN = -bundle
QMAKE_LFLAGS_THREAD =
QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE}
QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE}
QMAKE_RPATH =
QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_X11SM = -lSM -lICE
QMAKE_LIBS_QT = -lqt
QMAKE_LIBS_QT_THREAD = -lqt-mt
QMAKE_LIBS_THREAD =
QMAKE_AR = ar -cq
QMAKE_RANLIB = ranlib -s
(And I don't have the libtool lines.)
Anyways, I got it to build, but my install fails when it uses libtool:
libtool install -c -o root -g wheel -m 555
/opt/pkgsrc/x11/qt3-libs/work.belgium/qt-x11-free-3.3.3/lib/libqt-mt.la
/usr/pkg/qt3/lib/
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require -mode=MODE be specified.
install -c -o root -g wheel -m 555
/opt/pkgsrc/x11/qt3-libs/work.belgium/qt-x11-free-3.3.3/lib/.libs/libqt-mt.3.3.3.dylib
/usr/pkg/qt3/lib/libqt-mt.3.3.3.dylib
install:
/opt/pkgsrc/x11/qt3-libs/work.belgium/qt-x11-free-3.3.3/lib/.libs/libqt-mt.3.3.3.dylib:
No such file or directory
*** Error code 71
I don't have that .libs subdirectory. I do have the library at
/opt/pkgsrc/x11/qt3-libs/work.belgium/qt-x11-free-3.3.3/lib/libqt-mt.3.3.3.dylib
Any ideas on how to get it to build with libtool?
Anyone available to help with this?
I can import my qt3-libs to pkgsrc-wip if that would be helpful.
Jeremy C. Reed
technical support & remote administration
http://www.pugetsoundtechnology.com/