Subject: Re: please build qt3-libs and qt3-tools using buildlink3 (patches provided)
To: Jeremy C. Reed <>
From: Bang Jun-Young <>
List: tech-pkg
Date: 07/10/2004 23:51:03
Bang Jun-Young wrote:
> Jeremy C. Reed wrote:
> > In PR #25753, Joachim Kuebart provided some ideas on making qt3-libs
> > build using buildlink3.
> >
> > Early last month, I used these ideas under Linux and NetBSD 1.6.2 to
> > build and install qt3-libs and qt3-tools and a few packages using qt3.
> >
> > Please test the following patches. (It also makes qt3-libs pkgview
> > ready but I did not test that.)
> >
> > In the qmake.conf patch below, it should probably use
> > ${_COMPILER_LD_FLAG}${_OPSYS_RPATH_NAME} instead and the post-patch SED
> > work at bottom of Makefile.common should do that too. (If you can test
> > that instead, please do so.)
> Still doesn't build on FreeBSD 5.2.1. :-(

[Oops, please ignore the last mail from me, which is too long]

On NetBSD:

/usr/pkg/bin/libtool --mode=link g++ [...] -rpath  /usr/pkg/qt3/lib
mkdir ../lib/.libs
g++ -shared -nostdlib /usr/lib/crti.o /usr/lib/crtbeginS.o [...] -o ../lib/.libs/
(cd ../lib/.libs && rm -f && ln -s
(cd ../lib/.libs && rm -f && ln -s

On FreeBSD:

/usr/pkg/bin/libtool --mode=link g++ [...] -rpath  /usr/pkg/qt3/lib
mkdir ../lib/.libs
creating reloadable object files...
creating a temporary reloadable object file: ../lib/.libs/../lib/
ld -r -o ../lib/.libs/../lib/ .obj/release-shared-mt/.libs/qtaddons_x11.o [...] .obj/release-shared-mt/.libs/moc_qworkspace.o 
/usr/bin/ld: cannot open output file ../lib/.libs/../lib/ No such file or directory

Relevant libtool/ code snippet:

        if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
           test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
          # The command line is too long to link in one step, link piecewise.
          $echo "creating reloadable object files..."

          [... comments snipped ...]
          if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then

          # Clear the reloadable object creation command queue and
          # initialize k to one.

          $echo "creating a temporary reloadable object file: $output"

What matters above is the value of $output. It should be
../lib/.libs/ but ../lib is taking place in the middle of
the path name. Where does ../lib come from?