LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   32-bit SW development in C/C++ on 64-bit Linux (https://www.linuxquestions.org/questions/linux-software-2/32-bit-sw-development-in-c-c-on-64-bit-linux-515559/)

toback 01-02-2007 07:01 AM

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

PatrickNew 01-02-2007 11:56 PM

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.

toback 01-03-2007 01:52 AM

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

PatrickNew 01-03-2007 08:20 AM

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.

toback 01-05-2007 05:59 AM

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


All times are GMT -5. The time now is 01:58 PM.