Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Issue running 32bit code on 64bit system

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
db_404
Guru
Guru
Posts: 336
Joined: Thu Dec 05, 2002 2:41 pm

Issue running 32bit code on 64bit system

  • Quote

Post by db_404 » Fri Mar 27, 2009 3:07 am

I have been investigating a glibc emerge issue I am having http://forums.gentoo.org/viewtopic-t-74 ... ight-.html.

However this now seems to be a more general issue with the system. Some simple core

Code: Select all

#include <stdio.h>

int main(int argc,char *argv[]){
	printf("%d\n",sizeof(long double));
}
When compiled 64bit will run OK, but when compiled as 32 bit code (with -m32) I get a segfault upon running.

Any ideas what could cause this? The kernel has 32 bit support built in.
Top
richard.scott
Veteran
Veteran
Posts: 1497
Joined: Mon May 19, 2003 5:19 pm
Location: Oxfordshire, UK
Contact:
Contact richard.scott
Website

  • Quote

Post by richard.scott » Fri Mar 27, 2009 10:21 am

Hi,

I think your issue will be the sys-libs/glibc-2.8 installation on 64bit.

I'm having no end of compile issues since upgrading it.

Do you have a 64bit system available with the older glibc-2.6 installed to test?

Rich.
Top
db_404
Guru
Guru
Posts: 336
Joined: Thu Dec 05, 2002 2:41 pm

  • Quote

Post by db_404 » Fri Mar 27, 2009 1:36 pm

Actually this is an install (upgrade) from a stock 2008 stage 3 (which I think is 2.6.1).
Top
avendesora
Veteran
Veteran
User avatar
Posts: 1739
Joined: Fri Aug 16, 2002 1:04 pm
Location: Betelgeuse vicinity

  • Quote

Post by avendesora » Sun Mar 29, 2009 1:03 pm

Using -Wall when you compile your code is always a good idea. You have a format string problem
on 64bit, and you're supposed to return a value from main. Both these issues can cause random behavior I think
Top
Post Reply

4 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic