By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 1016

Summary: Build issue: tqca, tqca-tls packages won't build with 64-bit
Product: TDE Reporter: Darrell <darrella>
Component: other (any)Assignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: blocker CC: bugwatch, darrella, trin
Priority: P1    
Version: R14.0.0 [Trinity]   
Hardware: Other   
OS: Other   
Compiler Version: TDE Version String:
Application Version: Application Name:

Description Darrell 2012-06-02 17:11:49 CDT
The problem is the build process can't find $PREFIX/lib64. The build process only looks for $PREFIX/lib.
Comment 1 Timothy Pearson 2012-06-12 02:23:54 CDT
This should be fixed in GIT hashes 4c8fa4b and a5dfd48.  Please close the report if this is indeed the case!
Comment 2 Darrell 2012-06-13 12:58:28 CDT
Local GIT fully synced this morning. Still can't build on 64-bit. Here is the build output:

Updating build environment file and directory permissions...
Configuring TQt Cryptographic Architecture (QCA) ...

PREFIX=/opt/trinity
QTDIR=/opt/trinity

Verifying TQt 3.x Multithreaded (MT) build environment ... fail

There was an error compiling 'conf'.  Be sure you have a proper
TQt 3.x Multithreaded (MT) build environment set up.

make: *** No targets specified and no makefile found.  Stop.



Here is the configure.log:

g++ -c -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -O2 -D_REENTRANT  -DX11_INC='"/usr/X11R6/include"' -DX11_LIBDIR
='"/usr/X11R6/lib"' -DX11_LIB='"-lXext -lX11 -lm"' -DCC='"gcc"' -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/opt/trinity/mkspecs/default -I. -I'
/usr/include/tqt' -I/opt/trinity/include -I/usr/include -o conf.o conf.cpp
g++ -Wl,-rpath,/opt/trinity/lib -o conf conf.o    -L/opt/trinity/lib -L/usr/X11R6/lib -ltqt-mt -lXext -lX11 -lm -lpthread
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../x86_64-slackware-linux/bin/ld: cannot find -ltqt-mt
collect2: ld returned 1 exit status
make: *** [conf] Error 1



The configure process is looking for /opt/trinity/lib rather than/opt/trinity/lib64.
Comment 3 Timothy Pearson 2012-06-13 13:29:03 CDT
Where is your libtqt-mt.so file installed?

gcc has a set of built-in library search directories; it should be looking in /usr/lib64 already on a 64-bit system.
Comment 4 Darrell 2012-06-13 13:44:00 CDT
32-bit:

lrwxrwxrwx 1 root root       18 Jun 13 13:23 /opt/trinity/lib/libtqt-mt.so -> libtqt-mt.so.3.3.8*
lrwxrwxrwx 1 root root       18 Jun 13 13:23 /opt/trinity/lib/libtqt-mt.so.3 -> libtqt-mt.so.3.3.8*
lrwxrwxrwx 1 root root       18 Jun 13 13:23 /opt/trinity/lib/libtqt-mt.so.3.3 -> libtqt-mt.so.3.3.8*
-rwxr-xr-x 1 root root 43321912 Jun 13 11:43 /opt/trinity/lib/libtqt-mt.so.3.3.8*

64-bit:

lrwxrwxrwx 1 root root      18 Jun 13 13:23 /opt/trinity/lib64/libtqt-mt.so -> libtqt-mt.so.3.3.8*
lrwxrwxrwx 1 root root      18 Jun 13 13:23 /opt/trinity/lib64/libtqt-mt.so.3 -> libtqt-mt.so.3.3.8*
lrwxrwxrwx 1 root root      18 Jun 13 13:23 /opt/trinity/lib64/libtqt-mt.so.3.3 -> libtqt-mt.so.3.3.8*
-rwxr-xr-x 1 root root 8168232 Jun 13 11:56 /opt/trinity/lib64/libtqt-mt.so.3.3.8*

I am installing tqt3 to PREFIX=/opt/trinity. $LIBDIR is respectively defined as $PREFIX/lib${LIBDIRSUFFIX}, where LIBDIRSUFFIX is defined as 64 or empty.

I'm trying to build a 64-bit package set today, which I haven't done in a while. I know from my last attempt that all packages built on 64-bit expect these two and those mentioned in bug report 1017. So I'm trying to help resolve this bug today by building 64-bit. :-)
Comment 5 Timothy Pearson 2012-06-13 14:07:06 CDT
This is a qmake issue, specifically in <qt3/tqt3>/mkspecs/linux-g++-64/qmake.conf you will note that QMAKE_LIBDIR_QT is set to $(QTDIR)/lib.

I have fixed this in GIT hashes 4412d29 and 1869689 (Qt3 and TQt3, respectively).  You will need to recompile/reinstall tqt3 before rebuilding tqca/tqca-tls.

This may also resolve your other 64-bit bug report, though I am not confident on this.
Comment 6 Timothy Pearson 2012-06-13 14:12:41 CDT
Note that if the build still fails, there is a chance that your platform is not being correctly detected as 64-bit during the Qt3/TQt3 build process.  If it fails, please post the location the symbolic link /<prefix>/tqt3/mkspecs/default is pointing to.
Comment 7 Timothy Pearson 2012-06-13 14:47:20 CDT
For documentation, if Qt3/TQt3 is not using 64-bit by default, you may need to pass the following parameter to Qt3/TQt3 during build:

-platform linux-g++-64
Comment 8 Darrell 2012-06-13 17:13:24 CDT
"-platform linux-g++-64" seems to be the problem. I resynced to the latest GIT and had another build failure. Not really sure about what you are describing, I looked at the link:

/opt/trinity/mkspecs/default -> linux-g++/

As a test I changed the link:

/opt/trinity/mkspecs/default -> linux-g++-64/

And by golly tqca finally built.

Thus I have some questions:

* On a 64-bit system, to where should /opt/trinity/mkspecs/default be linked?

* If the As-Found link above is correct, how do I pass the information in my builds?

* Do I need to modify every build script or only tqt3?

Looks like you have "solved" the problem, but this is new territory for me.... :-)
Comment 9 Darrell 2012-06-13 17:16:35 CDT
Some quick web surfing implies that $PREFIX/mkspecs is a Qt thing. So now I understand that somehow the tqt3 build process needs to create the link to the correct location. Is that a configure option or do I manipulate this sym link manually in the build script?
Comment 10 Timothy Pearson 2012-06-13 17:18:18 CDT
(In reply to comment #8)
> "-platform linux-g++-64" seems to be the problem. I resynced to the latest GIT
> and had another build failure. Not really sure about what you are describing, I
> looked at the link:
> 
> /opt/trinity/mkspecs/default -> linux-g++/
> 
> As a test I changed the link:
> 
> /opt/trinity/mkspecs/default -> linux-g++-64/
> 
> And by golly tqca finally built.
> 
> Thus I have some questions:
> 
> * On a 64-bit system, to where should /opt/trinity/mkspecs/default be linked?

linux-g++-64/

> * Do I need to modify every build script or only tqt3?

tqt3 needs to be built with the -platform linux-g++-64 flag passed to its ./configure script.  Once that is done, the symbolic link should be created properly (pointing to linux-g++-64/) when TQt3 is installed.
Comment 11 Darrell 2012-06-13 17:23:18 CDT
Okay. I think I'm seeing some gray daylight. :-)

I see from your build script that the place to fix this is in the (t)qt3 configure options. In fact, that might have been my problem. I had that option hard-coded:

-platform linux-g++

I should have had this:

-platform linux-g++${LIBDIRSUFFIX}

Okay, back to the starting line. Rebuilding.... Stay tuned.
Comment 12 Darrell 2012-06-13 18:25:54 CDT
Other than obvious file size differences, both tqca and tqca-tls finally built on 64-bit. Looks like the combination of your recent patches and the TQt3 "-platform" configuration option were the keys.

As I am the originator of this report, I'm closing as resolved. :-)

Thank you!
Comment 13 Darrell 2012-06-13 19:03:09 CDT
Note for future readers who run across the same build failure:

In the (T)Qt3 build options, explicitly set the following build option:

-platform ${PLATFORM}

where ${PLATFORM} == linux=g++-64 rather than linux-g++ (notice the dash!)
Comment 14 David C. Rankin 2012-06-24 15:53:39 CDT
The latest commits broke building on distros that use /lib on x86_64 instead of /lib64. I have built tqca-tls for months without issue, after the latest commits it fails with:

Configuring qca-tls ...
Verifying TQt 3.x Multithreaded (MT) build environment ... fail

There was an error compiling 'conf'.  Be sure you have a proper
TQt 3.x Multithreaded (MT) build environment set up.

The looking at the conf.log file, I have this as the precise failure:

g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DX11_INC='"/usr/X11R6/include"'
-DX11_LIBDIR='"/usr/X11R6/lib64"' -DX11_LIB='"-lXext -lX11 -lm"' -DCC='"gcc"'
-DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/opt/tqt3/mkspecs/default -I.
-I'/usr/include/tqt' -I/opt/tqt3/include -I/usr/X11R6/include -o conf.o conf.cpp
g++ -Wl,-rpath,/opt/tqt3/lib64 -o conf conf.o    -L/opt/tqt3/lib64
-L/usr/X11R6/lib64 -ltqt-mt -lXext -lX11 -lm -lpthread

All of the 'lib64' entries are wrong. There is no lib64 directory anywhere on Arch. All of the files for TQT are installed as follows in /opt/tqt

/opt/tqt3/
bin
doc
include
lib
mkspecs
phrasebooks
plugins
templates
translations

Whatever new logic was pushed needs to be fixed so it handles the lib/lib64 issue correctly. I don't have a way to build yet.
Comment 15 David C. Rankin 2012-06-24 16:21:10 CDT
something is mucked up somewhere fairly significantly. I can revert the patch with:

--- tqca-tls/configure
+++ tqca-tls/configure  2012-06-24 16:02:25.218529297 -0500
@@ -60,7 +60,7 @@
        if [ "$QC_DEBUG" = "Y" ]; then
                echo \$QTDIR not set... trying to find Qt manually
        fi
-       for p in /usr/lib/tqt /usr/share/tqt /usr/share/tqt3 /usr/local/lib/tqt /usr/local/share/tqt /usr/lib/tqt3 /usr/local/lib/tqt3 /usr/lib/qt /usr/share/qt /usr/share/qt3 /usr/local/lib/qt /usr/local/share/qt /usr/lib/qt3 /usr/local/lib/qt3 /usr/lib64/tqt /usr/local/lib64/tqt /usr/lib64/tqt3 /usr/local/lib64/tqt3 /usr/lib64/qt /usr/local/lib64/qt /usr/lib64/qt3 /usr/local/lib64/qt3 /usr/X11R6/share/qt /usr/qt/3 ; do
+       for p in /usr/lib/tqt /usr/share/tqt /usr/share/tqt3 /usr/local/lib/tqt /usr/local/share/tqt /usr/lib/tqt3 /usr/local/lib/tqt3 /usr/lib/qt /usr/share/qt /usr/share/qt3 /usr/local/lib/qt /usr/local/share/qt /usr/lib/qt3 /usr/local/lib/qt3 /usr/X11R6/share/qt /usr/qt/3 ; do
                if [ -d "$p/mkspecs" ]; then
                        QTDIR=$p
                        break;
@@ -394,10 +394,6 @@
                        *lib = "/usr/local/lib";
                        return true;
                }
-               if(checkLibrary("/usr/local/lib64", name)) {
-                       *lib = "/usr/local/lib64";
-                       return true;
-               }
                return false;
        }


  Then configuring with

./configure --qtdir=/opt/tqt3 still yields:

cat src/tqca-tls/conf.log
g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DX11_INC='"/usr/X11R6/include"' -DX11_LIBDIR='"/usr/X11R6/lib64"' -DX11_LIB='"-lXext -lX11 -lm"' -DCC='"gcc"' -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/opt/tqt3/mkspecs/default -I. -I'/usr/include/tqt' -I/opt/tqt3/include -I/usr/X11R6/include -o conf.o conf.cpp
g++ -Wl,-rpath,/opt/tqt3/lib64 -o conf conf.o    -L/opt/tqt3/lib64 -L/usr/X11R6/lib64 -ltqt-mt -lXext -lX11 -lm -lpthread

Where is this lib64 coming from?
Comment 16 Timothy Pearson 2012-06-24 16:37:42 CDT
I know where this is from...

Commits 4412d295 and 18696899 altered Qt3 and TQt3 to follow the appropriate multilib conventions.  Distributions that do not follow this convention need to revert that patch in their distro-specific Qt3/TQt3 build scripts.
Comment 17 David C. Rankin 2012-06-25 14:54:46 CDT
Bug is being closed again.

For those distros that do NOT use the alternate FHS designation of ../lib64 on 64-bit installs, you will need to update your build script for TQt3 to change the Qt library location in mkspecs/linux-g++-64/qmake.conf from $(QTDIR)/lib64 back to $(QTDIR)/lib. I have done so with sed prior to configure with:

  ## Fix commits 4412d295 and 18696899 for FHS standard /lib installs
  #  on 64-bit boxes
  sed -i 's|lib64|lib|g' mkspecs/linux-g++-64/qmake.conf

After making the change (e.g. simply editing mkspecs/linux-g++-64/qmake.conf post-install) tqca-tls built without issue on Arch.