From: Keith Seitz <keiths@redhat.com>
To: insight <insight@sourceware.org>
Subject: FYI: How to build Insight for 64-bit linux with system Tcl et al
Date: Fri, 26 Jul 2013 22:40:00 -0000 [thread overview]
Message-ID: <51F2FAD3.3080302@redhat.com> (raw)
In-Reply-To: <D7E38FC3AB80A048A6312823FFB1753F7C242250@TWS-MBX02>
[-- Attachment #1: Type: text/plain, Size: 1948 bytes --]
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.
[-- Attachment #2: tcl.m4.patch --]
[-- Type: text/x-patch, Size: 3262 bytes --]
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)`
next parent reply other threads:[~2013-07-26 22:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <D7E38FC3AB80A048A6312823FFB1753F7C23EE64@TWS-MBX02>
[not found] ` <51543F89.4070503@redhat.com>
[not found] ` <D7E38FC3AB80A048A6312823FFB1753F7C23FE7D@TWS-MBX02>
[not found] ` <51544488.3050501@redhat.com>
[not found] ` <D7E38FC3AB80A048A6312823FFB1753F7C23FE8E@TWS-MBX02>
[not found] ` <D7E38FC3AB80A048A6312823FFB1753F7C242250@TWS-MBX02>
2013-07-26 22:40 ` Keith Seitz [this message]
2013-07-30 6:09 ` Pavel Fedin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51F2FAD3.3080302@redhat.com \
--to=keiths@redhat.com \
--cc=insight@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).