This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
FYI: How to build Insight for 64-bit linux with system Tcl et al
- From: Keith Seitz <keiths at redhat dot com>
- To: insight <insight at sourceware dot org>
- Date: Fri, 26 Jul 2013 15:40:19 -0700
- Subject: FYI: How to build Insight for 64-bit linux with system Tcl et al
- References: <D7E38FC3AB80A048A6312823FFB1753F7C23EE64 at TWS-MBX02>,<51543F89 dot 4070503 at redhat dot com> <D7E38FC3AB80A048A6312823FFB1753F7C23FE7D at TWS-MBX02>,<51544488 dot 3050501 at redhat dot com>,<D7E38FC3AB80A048A6312823FFB1753F7C23FE8E at TWS-MBX02> <D7E38FC3AB80A048A6312823FFB1753F7C242250 at TWS-MBX02>
I sent a user these instructions some time ago. Someone was recently
asking on #gdb, so I thought I would publish this to the mailing list.
I am attempting to switch insight to GIT, but no ETA yet.
Keith
------
1) Download/checkout gdb 7.6 (or 7.5 or HEAD)
You can find directions for this on gdb's home page. The 7.6 release is
imminent, so I would grab that via CVS (it's easier). You want to check
out the "gdb_7_6-branch":
$ cvs -d:pserver:anoncvs@sourceware.org:/cvs/src login
[enter "anoncvs" as the password]
$ cvs -d:pserver:anoncvs@sourceware.org:/cvs/src co -r gdb_7_6-branch gdb
2) Install build dependencies
In addition to Insight's build requirements, you will need all of gdb's
build dependencies installed. On Ubuntu 12, I believe you need to grab:
tcl8.5, tk8.5, -dev
itcl3, itk3, -dev
iwidgets4
bison, flex
texinfo
ncurses-dev
You will also need autoconf-2.64 and automake-1.11 to regenerate some
configure files.
These can be downloaded from gnu.org.
3) Checkout the the insight sources
You can grab the "missing" sources from CVS. If you are in the branch
checked out in #1, simply do:
$ cd src
$ cvs -d:pserver:anoncvs@sourceware.org:/cvs/src update -dA gdb/gdbtk libgui
4) Patch configury and regenerate
Apply the patch I've attached to the sources. This patch will allow you
to use the tcl, tk, itcl, etc that you installed in #2:
$ pwd
/home/keiths/gdb-7.6/src
$ patch -p1 < /path/to/tcl.m4.patch
patching file config/tcl.m4
Now regenerate the affected configure files [You can safely ignore all
the warnings.]:
$ cd libgui
$ autoreconf
$ cd ../gdb
$ aclocal -Ignulib/import/m4
$ autoconf
$ cd gdbtk
$ autoreconf
4) Build insight
$ pwd
/home/keiths/gdb-7.6
$ mkdir linux; cd linux
$ ../src/configure --prefix=/usr/local
$ make all-gdb install-gdb
That should be all you need to do! It sounds like a lot, but it is
actually pretty simple. Or maybe it is for me because I've been doing
this for a long time.
diff --git a/config/tcl.m4 b/config/tcl.m4
index 59a0c7e..b1905eb 100644
--- a/config/tcl.m4
+++ b/config/tcl.m4
@@ -33,7 +33,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
# First check to see if --with-tcl was specified.
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-mingw* | *-*-cygwin*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${with_tclconfig}" != x ; then
@@ -80,6 +80,31 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
done
fi
+ # Check where 32-bit vs 64-bit libraries are stored
+ lib32="/usr/lib"
+ lib64="/usr/lib"
+ if test -d /usr/lib32 ; then
+ lib32="/usr/lib32"
+ fi
+ if test -d /usr/lib64 ; then
+ lib64="/usr/lib64"
+ fi
+ case "${CFLAGS}" in
+ *-m32*) force_32=yes ;;
+ *) force_32=no ;;
+ esac
+ case "${host}" in
+ i[3456]*) usrlibdir="${lib32}" ;;
+ x86_64*)
+ if test x"${force_32}" = xyes ; then
+ usrlibdir="${lib32}"
+ else
+ usrlibdir="${lib64}"
+ fi
+ ;;
+ *) usrlibdir="/usr/lib" ;;
+ esac
+
# check in a few common install locations
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in `ls -d ${libdir} 2>/dev/null` \
@@ -87,7 +112,9 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
`ls -d ${prefix}/lib 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
- `ls -d /usr/lib 2>/dev/null` \
+ `ls -d ${usrlibdir} 2>/dev/null` \
+ `ls -d ${usrlibdir}/tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -d ${usrlibdir}/tcl[[8-9]].[[0-9]]* 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i; pwd)`
@@ -165,7 +192,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
# then check for a private Tk library
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-mingw* | *-*-cygwin*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
@@ -203,6 +230,31 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
done
fi
+ # Check where 32-bit vs 64-bit libraries are stored
+ lib32="/usr/lib"
+ lib64="/usr/lib"
+ if test -d /usr/lib32 ; then
+ lib32="/usr/lib32"
+ fi
+ if test -d /usr/lib64 ; then
+ lib64="/usr/lib64"
+ fi
+ case "${CFLAGS}" in
+ *-m32*) force_32=yes ;;
+ *) force_32=no ;;
+ esac
+ case "${host}" in
+ i[3456]*) usrlibdir="${lib32}" ;;
+ x86_64*)
+ if test x"${force_32}" = xyes ; then
+ usrlibdir="${lib32}"
+ else
+ usrlibdir="${lib64}"
+ fi
+ ;;
+ *) usrlibdir="/usr/lib" ;;
+ esac
+
# check in a few common install locations
if test x"${ac_cv_c_tkconfig}" = x ; then
for i in `ls -d ${libdir} 2>/dev/null` \
@@ -210,7 +262,9 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
`ls -d ${prefix}/lib 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
- `ls -d /usr/lib 2>/dev/null` \
+ `ls -d ${usrlibdir} 2>/dev/null` \
+ `ls -d ${usrlibdir}/tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -d ${usrlibdir}/tk[[8-9]].[[0-9]]* 2>/dev/null` \
; do
if test -f "$i/tkConfig.sh" ; then
ac_cv_c_tkconfig=`(cd $i; pwd)`