Woody ALPHA gcc and/or libc6.1 question
Hi --
First off, I know FORTRAN but not very much C ... nevertheless, I'm trying to build from source some non-commercial (academic/scientific) Linux C software under Debian GNU/Linux 3.0r2 (Woody) on my *ALPHA* (the source is intended for [and tested with] the gcc compiler on Red Hat PC Linux) . The author of the software has provided a '<pckg>_check' shell script that confirms the existence of all libraries and *.h files needed (e.g., X11), and my Debian GNU/Linux ALPHA installation passed. He also provided a '<pckg>_build' shell script that automates the build from source process (so simple, even *I* can initiate the build :-).
During the build, however, I receive warnings such as:
file.c:###: warning: cast from pointer to integer of different size
file.c:###: warning: cast to pointer from integer of different size
... which when reported to the author, he traced to void* pointers being equated (cast) to integers ... nothing out-of-the-ordinary, at least on 32-bit computers. So he suspects this has something to do with ALPHA machines having 64-bit processors, and says I need to look for a compiler switch to correct this and eliminate the warnings.
Searching the web, I found (but don't pretend to understand completely) this web page: www .alphalinux.org/faq/FAQ-1.html#ss1.3 ...that underscores some *possible* Linux differences with ALPHAs. But I *don't* know if(?) Debian GNU/Linux (Woody) on the ALPHA platform shares these C-programming variable-length differences vs. 32-bit Intel PC Linux. I *do* know that I'm not up to the task of modifying this fellow's scientific C source code to change variable declarations !
So my question for this group is: for Debian GNU/Linux 3.0_r2 on ALPHA, is there a compiler switch for gcc equivalent to "-m32" that limits addresses (pointers) to 32-bits, for ease of porting code from 32-bit Intel PC Linux ?
Attempting to run the executables built on my ALPHA Debian Woody (the cast messages were just "warnings" afterall :-), I *do* encounter run-time errors consistent with problems in the subroutines where the warnings were reported ... not that this proves anything (the run-time errors could be unrelated), but I'd like to eliminate the warnings (if possible via some compiler switch?) and try again.
Thanks in advance for any shared insights,
-- Jim
P.S. I also found (and contacted the author of) this old post to alphalinux.org: www .alphalinux.org/archives/axp-list/May2000/0100.shtml (Johannes Nix ... who told me that he never received any responses, and he is no longer programming on the ALPHA platform). Anyone know (or able to find out) what the current ALSA sources do to address int<->void* casting ?
P.P.S. For what it's worth, on my machine 'dpkg --list' reports the following version information:
...
gcc 2.95.4-14
gcc-2.95 2.95.4-11woody
gcc-3.0 3.0-4.7
gcc-3.0-base 3.0-4.7
...
libc6.1 2.2.5-11.5
libc6.1-dev 2.2.5-11.5
...
libdb2 2.7.7.0-7
libdb3 3.2.9-16
...
Last edited by jkmccarthy; 10-18-2004 at 04:46 AM.
|