public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* FYI: How to build Insight for 64-bit linux with system Tcl et al
       [not found]         ` <D7E38FC3AB80A048A6312823FFB1753F7C242250@TWS-MBX02>
@ 2013-07-26 22:40           ` Keith Seitz
  2013-07-30  6:09             ` Pavel Fedin
  0 siblings, 1 reply; 2+ messages in thread
From: Keith Seitz @ 2013-07-26 22:40 UTC (permalink / raw)
  To: insight

[-- 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)`


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: How to build Insight for 64-bit linux with system Tcl et al
  2013-07-26 22:40           ` FYI: How to build Insight for 64-bit linux with system Tcl et al Keith Seitz
@ 2013-07-30  6:09             ` Pavel Fedin
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Fedin @ 2013-07-30  6:09 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: insight

 Hello!

> 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.

 By the way, why doesn't anybody update TCL and TK in Insight's repository ?
 It would be just convenient. Windows users would benefit because under
Windows every piece of software is expected to be self-contained, and
built-in TCL and TK are nice to have.
 Current TCL works even for 64 bits, but has to be patched. All of the
patching is already done in upstream version.

 And one more little thing. Even if i supply --with-tcl=/usr/lib to main
configure script it will still attempt to configure bundled TCL. Shouldn't
it be omitted in this case ? Currently i worked around just by erasing the
directory, but again, it's inconvenient. Usually i just checkout 'insight'
module and expect that everything will work.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-30  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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           ` FYI: How to build Insight for 64-bit linux with system Tcl et al Keith Seitz
2013-07-30  6:09             ` Pavel Fedin

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).