LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-02-2007, 07:01 AM   #1
toback
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
32-bit SW development in C/C++ on 64-bit Linux


Hello,

I've got some very general questions regarding 32-bit SW development in C/C++ on a 64-bit Linux OS.

As far as I've understood, the 64-bit OS comes with both 32- and 64-bit libraries, so that both 32- and 64-bit applicatons can be run. However, when you consider developing software in C/C++, you do not have the devel-packages for 32-bit (header files), or do you? They can be installed, yes, I know, but by default they aren't installed on my system (RHEL).

In short, is it possible to have both 32- and 64-bit devel-packages installed at the same time or will there be a problem with the header files (/usr/include)? I assume the 64-bit platform is meant to be used for 64-bit SW development and not for 32-bit SW development (cross-compilation?), is this correctly understood?

Thanks a lot!

Best regards,
Tommy
 
Old 01-02-2007, 11:56 PM   #2
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
As I understand it, -devel packages just contain source file headers. In other words, they are just kinda used as a way to let external programs know what a certain library/application is capable of and how to access it. So, I think -devel packages are platform independent, since they don't actually contain any executable code.
 
Old 01-03-2007, 01:52 AM   #3
toback
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Hi,

thanks for the reply!

This is really something I wonder - if the headers are platform independent that is. If they were, then one could assume that there wouldn't be say a 32-bit devel and a 64-bit devel package? Or what do you think? However, there are separate devel packages for most compopnents, so I assume that there might be some differences in those. At least in theory. ;-) Therefore, I posted this thread to see how to approach this.

I stumbled across an issue with openssl on RHEL 64-bit OS, where both 32- and 64-bit openssl were installed. In addition, the 64-bit openssl devel package was installed. Now, openssl 64-bit devel comes with all the same headers as the 32-bit devel package...almost at least. There is a set of openssl configuration headers that are platform dependent, and the 64-bit devel package only contains the 64-bit header, the 32-bit devel package only contains the 32-bit header and so on. Hence, it's not possible to have the 64-bit devel and build 32-bit SW using openssl. Is this maybe some RHEL/openssl issue or is it commonplace?

Hence, the question if a 64-bit Linux should be used for 64-bit SW development or also 32-bit? In addition, is it possible to have both 32- and 64-bit devel packages installed at the same time without any "conflicts" or such?

Best regards,
Tommy
 
Old 01-03-2007, 08:20 AM   #4
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Hrm, perhaps I was wrong then. Maybe the arch of the -devel package only has to match the arch of the compiler. That would be my next guess.
 
Old 01-05-2007, 05:59 AM   #5
toback
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
But you can easily put e.g. the -m32 compiler flag to indicate that you want to build 32-bit software. This will now try to use the missing openssl header as the arch is i386.

Doesn't anyone know? I thought this might be a very general thing... ;-)

Best regards,
Tommy
 
  


Reply



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
Howto install 32-bit libraries on 64-bit Linux using yum shawn_t Linux - Server 16 07-13-2012 02:46 AM
LXer: Community: Why There is Better Driver Support in 64-bit Linux Than 64-bit Windows XP LXer Syndicated Linux News 0 10-18-2006 09:33 PM
32 bit or 64 bit install - is 32 bit easier for a newbie? dms05 Linux - Newbie 3 05-19-2006 03:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:02 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
Open Source Consulting | Domain Registration