Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can I do 64-bit gcc compilation on 64-bit RedHat platform ?

21 views
Skip to first unread message

Shaun Deacon

unread,
Jul 28, 2005, 4:52:02 PM7/28/05
to
Hi,

This may seem like a daft question...but can
I actually do 64-bit compilation of Tcl/Tk
with gcc (tcl/tk 8.3.5) ?

The reason I ask is that the configure script
returns the following warning :

"64bit support being disabled -- don't know magic
for this platform"

Looking inside the config script, I don't see
where "-m64" is ever enabled for gcc ?

My system details are:

%> uname -a
Linux
dl145-02
2.4.21-23.ELsmp
x86_64
x86_64
GNU/Linux

RedHat Linux RHEL3 is installed.
The version of gcc is 3.4.3

My tcl source for 8.3.5 is placed
in /usr/sdeacon/tcl

%> cd /usr/sdeacon/tcl/tcl8.3.5/unix
%> ./configure --prefix=/usr/sdeacon/tcl --enable-gcc --enable-shared
--enable-64bit

Thanks in advance for any advice,
Shaun

Don Porter

unread,
Jul 28, 2005, 5:01:05 PM7/28/05
to
Shaun Deacon wrote:
> This may seem like a daft question...but can
> I actually do 64-bit compilation of Tcl/Tk
> with gcc (tcl/tk 8.3.5) ?

Probably, but try 8.4.11 instead.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|

Shaun Deacon

unread,
Jul 28, 2005, 5:22:20 PM7/28/05
to
> Probably, but try 8.4.11 instead.

I would do normally...but unfortunately my application
needs to be 'sourced' inside a commercial application
which uses 8.3.5 - and I need a couple of additional
extensions that the commercial app doesn't provide

cheers
Shaun

Don Porter

unread,
Jul 28, 2005, 5:30:20 PM7/28/05
to
>> Probably, but try 8.4.11 instead.

Shaun Deacon wrote:
> I would do normally...but unfortunately my application
> needs to be 'sourced' inside a commercial application
> which uses 8.3.5 - and I need a couple of additional
> extensions that the commercial app doesn't provide

I'm missing something.

Is the "commercial application" compiled for 64-bit operations?

If not, why would you want to compile anything in 64-bit mode to
work with it?

If so, then isn't that evidence that, yes, Tcl 8.3.5 compiles fine
in 64-bit mode?

Shaun Deacon

unread,
Jul 28, 2005, 5:55:36 PM7/28/05
to
> Is the "commercial application" compiled for 64-bit operations?

yes

> If so, then isn't that evidence that, yes, Tcl 8.3.5 compiles fine
> in 64-bit mode?

Well yes, sure, but I'm having difficulty in seeing how they managed
it without "fiddling" with the configuration ?

Maybe I'm just being dumb, I admit I'm not the sharpest tool in
the shed when it comes to autoconfigure, but looking inside
the ./configure script, 'do64bit_ok' is never set to 'yes' when
the compiler is gcc, and AFAIK gcc also requires the flag -m64
which I don't see being set anywhere ?

thanks for your patience,
Shaun

Don Porter

unread,
Jul 28, 2005, 6:07:32 PM7/28/05
to
>> Is the "commercial application" compiled for 64-bit operations?
> yes

>> If so, then isn't that evidence that, yes, Tcl 8.3.5 compiles fine
>> in 64-bit mode?

Um, more to the point, doesn't that mean 64-bit mode Tcl 8.3.5 is
already built on your system since that "commerical application"
is using it?

What is it you need to compile, and why?

Shaun Deacon

unread,
Jul 28, 2005, 6:24:49 PM7/28/05
to
> Um, more to the point, doesn't that mean 64-bit mode Tcl 8.3.5 is
> already built on your system since that "commerical application"
> is using it?

Well actually the commercial app uses its own Tcl libraries. Although,
of course, there are default installations for Tcl and Tk 8.3.5 on the
system.

> What is it you need to compile, and why?

As I said earlier, I need some other extensions that the commerical
app does not provide and are not on my system (tkImg, BLT, expect,
and tbcload are the main ones). I can't find ready made binaries for
some of these - so have to resort to building them myself.

I wanted to make a clean set of core libraries (separate from the
system installation) first before adding the extensions that I need.
Sure, I could use the system libraries for Tcl and Tk and use the
--with-xxx switches in the configuration...but, If I'm already having
trouble building Tcl itself, I envisage further problems when it comes
to the extensions...

cheers
Shaun

Don Porter

unread,
Jul 28, 2005, 6:30:57 PM7/28/05
to
Shaun Deacon wrote:
>> What is it you need to compile, and why?

> As I said earlier, I need some other extensions that the commerical
> app does not provide and are not on my system (tkImg, BLT, expect,
> and tbcload are the main ones). I can't find ready made binaries for
> some of these - so have to resort to building them myself.

Perhaps someone knowledgable will speak up, but otherwise, I'd
get 8.4.11, and check that they have the support you are looking
for. Assuming they do, they you can look at diffs between the
two codebases as hints for what adaptations may be needed to get
the 8.3.5 source into shape.

Shaun Deacon

unread,
Jul 28, 2005, 7:08:05 PM7/28/05
to
Don,

Thanks for your help so far...

I downloaded 8.4.11 as you suggested, but I still
get the same ./configure warning...

As you say, I hope someone knowledgeable will
speak up.

cheers
Shaun

Bob Techentin

unread,
Jul 29, 2005, 9:07:46 AM7/29/05
to
"Shaun Deacon" <sde...@fma.fujitsu.com> wrote
> ...can I actually do 64-bit compilation of Tcl/Tk

> with gcc (tcl/tk 8.3.5) ?
>
> The reason I ask is that the configure script
> returns the following warning :
>
> "64bit support being disabled -- don't know magic
> for this platform"
>
> Looking inside the config script, I don't see
> where "-m64" is ever enabled for gcc ?
>
> My system details are:
>
> %> uname -a
> Linux
> dl145-02
> 2.4.21-23.ELsmp
> x86_64
> x86_64
> GNU/Linux
>


The --enable-64bit support is checked in the macros in tcl.m4. I only see
64bit support checks for AIX, HPUX, IRIX, and SunOS-5. Linux on 64 bit AMD
or Intel processors is a relatively new thing, and it isn't supported in
Tcl, yet.

So the answer is "No, you can't compile 64 bit Tcl on Red Hat Enterprise
Linux." I seriously doubt that your commercial application was compiled on
Red Hat Linux with 64bit Tcl. You should be just fine with a regular, 32
bit build.

Bob
--
Bob Techentin techenti...@NOSPAMmayo.edu
Mayo Foundation (507) 538-5495
200 First St. SW FAX (507) 284-9171
Rochester MN, 55901 USA http://www.mayo.edu/sppdg/

Donal K. Fellows

unread,
Jul 29, 2005, 10:29:36 AM7/29/05
to
Bob Techentin wrote:
> The --enable-64bit support is checked in the macros in tcl.m4. I only see
> 64bit support checks for AIX, HPUX, IRIX, and SunOS-5. Linux on 64 bit AMD
> or Intel processors is a relatively new thing, and it isn't supported in
> Tcl, yet.

Which means "Feel free to hack the Makefile for your platform in 32-bit
mode so that it generates a 64-bit build, and then contribute your
changes back to the core so we can make sure the platform gets supported
in double-quick time!" We're happy to support such builds, but this sort
of thing is where we *require* feedback from people with the platforms
having problems.

Donal.

Cameron Laird

unread,
Jul 29, 2005, 11:08:03 AM7/29/05
to
In article <dcd9n2$no4$1...@tribune.mayo.edu>,
Bob Techentin <techenti...@mayo.edu> wrote:
.
.
.

>64bit support checks for AIX, HPUX, IRIX, and SunOS-5. Linux on 64 bit AMD
>or Intel processors is a relatively new thing, and it isn't supported in
>Tcl, yet.
.
.
.
Who's likely to change this situation? Jeff? Kevin? Is it waiting
on money/schedule/lunar phase/...?

Ian Gay

unread,
Jul 29, 2005, 12:15:45 PM7/29/05
to
"Bob Techentin" <techenti...@mayo.edu> wrote in
news:dcd9n2$no4$1...@tribune.mayo.edu:

I had no trouble building 64 bit versions of 8.5a3 with Suse9.3 on an
athlon 64. What I have not succeeded in doing yet is building a 32 bit
version on that system. Seems hard to get the -m32 in all the right
places with the distributed configure script.

--
*** To reply by e-mail, make double u single in address ***

Bob Techentin

unread,
Jul 29, 2005, 2:03:11 PM7/29/05
to
"Cameron Laird" <cla...@lairds.us> wrote

> Who's likely to change this situation? Jeff? Kevin? Is it waiting
> on money/schedule/lunar phase/...?

Well, probably somebody with a 64 bit Pentium Linux box. Oh, that's me and
Shaun. :-)

Ok, so I tried copying the tcl.m4 code from SunOS-5 which checks for
GCC>3.2, and set -m64 on both CFLAGS and LDFLAGS. But autoconf on my Red
Hat Enterprise Linux and Fedora Core systems doesn't seem to work. Every
configure ends with the error
./configure: line 5583: syntax error near unexpected token `;;'
./configure: line 5583: ` ;;'

So since I can't reconfigure... I'm stuck testing the theory of adding -m64
into the generated makefile. Adding that flag to CFLAGS and LDFLAGS seems
to work. Lots and lots of size mismatch warnings. But the it passes the
tcl test suite, and it can allocate lots of memory.

Vincent Thomas

unread,
Jul 29, 2005, 6:18:25 PM7/29/05
to
Shaun Deacon wrote:
> Hi,
>
> This may seem like a daft question...but can
> I actually do 64-bit compilation of Tcl/Tk
> with gcc (tcl/tk 8.3.5) ?
>

I've compiled 8.5a3 with 64 bit on Fedora Core 3 with just one change
in the configure script for Tk

1359c1359
< if test "${with_tcl}+set" = set; then
---
> if test "${with_tcl+set}" = set; then

Jeff Hobbs

unread,
Jul 31, 2005, 1:46:10 PM7/31/05
to Bob Techentin, sde...@fma.fujitsu.com
Bob Techentin wrote:
> "Shaun Deacon" <sde...@fma.fujitsu.com> wrote
>>...can I actually do 64-bit compilation of Tcl/Tk
>>with gcc (tcl/tk 8.3.5) ?
>>
>>The reason I ask is that the configure script
>>returns the following warning :
>>
>>"64bit support being disabled -- don't know magic
>>for this platform"
>>
>>Looking inside the config script, I don't see
>>where "-m64" is ever enabled for gcc ?

> The --enable-64bit support is checked in the macros in tcl.m4. I only see


> 64bit support checks for AIX, HPUX, IRIX, and SunOS-5. Linux on 64 bit AMD
> or Intel processors is a relatively new thing, and it isn't supported in
> Tcl, yet.
>
> So the answer is "No, you can't compile 64 bit Tcl on Red Hat Enterprise
> Linux." I seriously doubt that your commercial application was compiled on
> Red Hat Linux with 64bit Tcl. You should be just fine with a regular, 32
> bit build.

Tcl builds fine for 64-bit Linux x86_64 systems (we have some,
we build it). The trick is to build locally, as the gcc
toolchain defaults to 64-bit builds on a 64-bit Linux machine
(no need for --enable-64bit, no special gcc flags).

Also, the 32-bit builds should work just fine as well. What
won't work is the cross-compile type builds - building a
64-bit build on a 32-bit gcc or vice versa.

This differs from "big iron" systems because they default to
32-bit builds, even on 64-bit capable platforms.

--
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos

Bob Techentin

unread,
Aug 1, 2005, 8:52:05 AM8/1/05
to
"Jeff Hobbs" <je...@activestate.com> wrote

>
> Tcl builds fine for 64-bit Linux x86_64 systems (we have some,
> we build it). The trick is to build locally, as the gcc
> toolchain defaults to 64-bit builds on a 64-bit Linux machine
> (no need for --enable-64bit, no special gcc flags).


OK. My bad. I guess the real answer is:

"You can't build anything -but- 64 bit on X86_64 systems."

Shaun Deacon

unread,
Aug 1, 2005, 2:10:47 PM8/1/05
to
Thanks, everybody, for the good advice...

cheers
Shaun

0 new messages