LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-18-2004, 05:41 AM   #1
jkmccarthy
LQ Newbie
 
Registered: Oct 2004
Location: Los Angeles, CA
Distribution: Red Hat Linux
Posts: 10

Rep: Reputation: 0
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 05:46 AM.
 
Old 10-21-2004, 08:19 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
I don't know about any -m32 -swiches, but using long pointers (or better yet, pointters of type "foo*" or "void*") should fix the problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about gcc thorney Linux - Newbie 4 11-25-2005 04:47 PM
GCC cross compiling to alpha sparc? jon_k Linux - Software 2 12-07-2004 03:23 PM
gcc question ?????? jmax24 Programming 7 04-24-2004 08:36 PM
Woody Debian 3.0 r2 newbie question joolzzz Linux - Newbie 10 03-16-2004 05:57 AM
GCC Question SainT1337 Linux - General 2 11-30-2003 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration