Ugh.
One of our internal servers crashed so bad I just went out and bought a new machine to replace it.
The old server was Pentium-4 based and running CentOS-5. When I installed CentOS on the new machine, I used the 64-bit version, partly because that habit is almost automatic nowadays, and partly because the new machine has 6GB of RAM, so 32-bit seemed not very appropriate.
Anyway, I've managed to configure every one of the old server's many functions to match on the new server but one: I need the 32-bit version of compat-gcc-34. (Or at least I need to be able to compile 32-bit binaries with the already available version.) I can't seem to do this; am I just missing something?
In retrospect, installing the 64-bit OS may have been foolish. But it's too late now. I've spent several days installing/loading/configuring this system to the point it's at now. It would be a pity to have to start over completely just to enable this one (very critical) function.
-Alan
On Tue, Mar 29, 2011 at 5:35 PM, Alan M. Evans ame1@extratech.com wrote:
Ugh.
One of our internal servers crashed so bad I just went out and bought a new machine to replace it.
The old server was Pentium-4 based and running CentOS-5. When I installed CentOS on the new machine, I used the 64-bit version, partly because that habit is almost automatic nowadays, and partly because the new machine has 6GB of RAM, so 32-bit seemed not very appropriate.
Anyway, I've managed to configure every one of the old server's many functions to match on the new server but one: I need the 32-bit version of compat-gcc-34. (Or at least I need to be able to compile 32-bit binaries with the already available version.) I can't seem to do this; am I just missing something?
In retrospect, installing the 64-bit OS may have been foolish. But it's too late now. I've spent several days installing/loading/configuring this system to the point it's at now. It would be a pity to have to start over completely just to enable this one (very critical) function.
-Alan
You do not provide a lot of detail on what the actual problem is, but have you tried the -m32 flag with gcc. that will tell it to create 32-bit code. You will also need to pass that option to the linker and be sure any dependent libraries have the 32 bit versions installed.
-- Jeff
On Tue, 2011-03-29 at 17:43 -0500, Jeff wrote:
On Tue, Mar 29, 2011 at 5:35 PM, Alan M. Evans ame1@extratech.com wrote:
Ugh.
One of our internal servers crashed so bad I just went out and bought a new machine to replace it.
The old server was Pentium-4 based and running CentOS-5. When I installed CentOS on the new machine, I used the 64-bit version, partly because that habit is almost automatic nowadays, and partly because the new machine has 6GB of RAM, so 32-bit seemed not very appropriate.
Anyway, I've managed to configure every one of the old server's many functions to match on the new server but one: I need the 32-bit version of compat-gcc-34. (Or at least I need to be able to compile 32-bit binaries with the already available version.) I can't seem to do this; am I just missing something?
In retrospect, installing the 64-bit OS may have been foolish. But it's too late now. I've spent several days installing/loading/configuring this system to the point it's at now. It would be a pity to have to start over completely just to enable this one (very critical) function.
You do not provide a lot of detail on what the actual problem is
That would be because I don't really know what's relevant. Have you ever felt so ignorant about something that you can't even formulate an intelligent question? That's me, right now.
, but have you tried the -m32 flag with gcc. that will tell it to create 32-bit code. You will also need to pass that option to the linker and be sure any dependent libraries have the 32 bit versions installed.
I've tried the -m32 flag, along with "CC=gcc34" to actually cause it to use the compat compiler instead of the new one. The build process produces a lot of warnings that may or may not have been there before, then bails out with:
make: *** No rule to make target `/usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h', needed by `hostcom.o'. Stop.
On the old server, which I have limited access to, that file is owned by the compat-gcc-34 package. And the 64-bit version of this package is installed on the new server, so the directory is x86_64-redhat-linux instead of i386-redhat-linux.
-Alan
Alan M. Evans wrote:
On Tue, 2011-03-29 at 17:43 -0500, Jeff wrote:
On Tue, Mar 29, 2011 at 5:35 PM, Alan M. Evans ame1@extratech.com wrote:
The old server was Pentium-4 based and running CentOS-5. When I installed CentOS on the new machine, I used the 64-bit version, partly because that habit is almost automatic nowadays, and partly because the new machine has 6GB of RAM, so 32-bit seemed not very appropriate.
Anyway, I've managed to configure every one of the old server's many functions to match on the new server but one: I need the 32-bit version of compat-gcc-34. (Or at least I need to be able to compile 32-bit binaries with the already available version.) I can't seem to do this; am I just missing something?
<snip>
I've tried the -m32 flag, along with "CC=gcc34" to actually cause it to use the compat compiler instead of the new one. The build process produces a lot of warnings that may or may not have been there before, then bails out with:
make: *** No rule to make target `/usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h', needed by `hostcom.o'. Stop.
On the old server, which I have limited access to, that file is owned by the compat-gcc-34 package. And the 64-bit version of this package is installed on the new server, so the directory is x86_64-redhat-linux instead of i386-redhat-linux.
Got it: you need to install the 386 *sources*; you can do that without hurting anything, and then the things you need will be where you expect them to be.
mark
On Wed, 2011-03-30 at 13:27 -0400, m.roth@5-cent.us wrote:
Alan M. Evans wrote:
On Tue, 2011-03-29 at 17:43 -0500, Jeff wrote:
On Tue, Mar 29, 2011 at 5:35 PM, Alan M. Evans ame1@extratech.com wrote:
The old server was Pentium-4 based and running CentOS-5. When I installed CentOS on the new machine, I used the 64-bit version, partly because that habit is almost automatic nowadays, and partly because the new machine has 6GB of RAM, so 32-bit seemed not very appropriate.
Anyway, I've managed to configure every one of the old server's many functions to match on the new server but one: I need the 32-bit version of compat-gcc-34. (Or at least I need to be able to compile 32-bit binaries with the already available version.) I can't seem to do this; am I just missing something?
<snip> > I've tried the -m32 flag, along with "CC=gcc34" to actually cause it to > use the compat compiler instead of the new one. The build process > produces a lot of warnings that may or may not have been there before, > then bails out with: > > make: *** No rule to make target > `/usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h', needed by > `hostcom.o'. Stop. > > On the old server, which I have limited access to, that file is owned by > the compat-gcc-34 package. And the 64-bit version of this package is > installed on the new server, so the directory is x86_64-redhat-linux > instead of i386-redhat-linux.
Got it: you need to install the 386 *sources*; you can do that without hurting anything, and then the things you need will be where you expect them to be.
Excuse my ignorance: What *sources* are you talking about?
-Alan
Alan M. Evans wrote:
On Wed, 2011-03-30 at 13:27 -0400, m.roth@5-cent.us wrote:
Alan M. Evans wrote:
On Tue, 2011-03-29 at 17:43 -0500, Jeff wrote:
On Tue, Mar 29, 2011 at 5:35 PM, Alan M. Evans ame1@extratech.com wrote:
The old server was Pentium-4 based and running CentOS-5. When I installed CentOS on the new machine, I used the 64-bit version, partly because that habit is almost automatic nowadays, and partly
because
the new machine has 6GB of RAM, so 32-bit seemed not very
appropriate.
Anyway, I've managed to configure every one of the old server's many functions to match on the new server but one: I need the 32-bit version of compat-gcc-34. (Or at least I need to be able to compile 32-bit binaries with the already available version.) I can't seem
to
do this; am I just missing something?
<snip> > I've tried the -m32 flag, along with "CC=gcc34" to actually cause it > to use the compat compiler instead of the new one. The build process > produces a lot of warnings that may or may not have been there before, > then bails out with: > > make: *** No rule to make target > `/usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h', needed by > `hostcom.o'. Stop. > > On the old server, which I have limited access to, that file is owned > by the compat-gcc-34 package. And the 64-bit version of this package is > installed on the new server, so the directory is x86_64-redhat-linux > instead of i386-redhat-linux.
Got it: you need to install the 386 *sources*; you can do that without hurting anything, and then the things you need will be where you expect them to be.
Excuse my ignorance: What *sources* are you talking about?
gcc headers, and maybe kernel headers and sources (depending on what you're compiling). You've apparently only got the x86_64 sources.
mark
On Wed, 2011-03-30 at 14:34 -0400, m.roth@5-cent.us wrote:
Alan M. Evans wrote:
On Wed, 2011-03-30 at 13:27 -0400, m.roth@5-cent.us wrote:
Alan M. Evans wrote:
On Tue, 2011-03-29 at 17:43 -0500, Jeff wrote:
On Tue, Mar 29, 2011 at 5:35 PM, Alan M. Evans ame1@extratech.com wrote:
The old server was Pentium-4 based and running CentOS-5. When I installed CentOS on the new machine, I used the 64-bit version, partly because that habit is almost automatic nowadays, and partly
because
the new machine has 6GB of RAM, so 32-bit seemed not very
appropriate.
Anyway, I've managed to configure every one of the old server's many functions to match on the new server but one: I need the 32-bit version of compat-gcc-34. (Or at least I need to be able to compile 32-bit binaries with the already available version.) I can't seem
to
do this; am I just missing something?
<snip> > I've tried the -m32 flag, along with "CC=gcc34" to actually cause it > to use the compat compiler instead of the new one. The build process > produces a lot of warnings that may or may not have been there before, > then bails out with: > > make: *** No rule to make target > `/usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h', needed by > `hostcom.o'. Stop. > > On the old server, which I have limited access to, that file is owned > by the compat-gcc-34 package. And the 64-bit version of this package is > installed on the new server, so the directory is x86_64-redhat-linux > instead of i386-redhat-linux.
Got it: you need to install the 386 *sources*; you can do that without hurting anything, and then the things you need will be where you expect them to be.
Excuse my ignorance: What *sources* are you talking about?
gcc headers, and maybe kernel headers and sources (depending on what you're compiling). You've apparently only got the x86_64 sources.
What set of packages would that be? Like I said, the header in question is owned by compat-gcc-34, and there is only a 64-bit version available in the repos.
I've installed all the i386 libc and devel stuff that I can find and think appropriate.
-Alan
From: Alan M. Evans ame1@extratech.com
What set of packages would that be? Like I said, the header in question is owned by compat-gcc-34, and there is only a 64-bit version available in the repos.
Not sure what you meant but there is a 32-bit version...
/centos/5/os/i386/CentOS/compat-gcc-34-3.4.6-4.i386.rpm /centos/5/os/i386/CentOS/compat-gcc-34-c++-3.4.6-4.i386.rpm /centos/5/os/i386/CentOS/compat-gcc-34-g77-3.4.6-4.i386.rpm
/centos/5/os/x86_64/CentOS/compat-gcc-34-3.4.6-4.x86_64.rpm /centos/5/os/x86_64/CentOS/compat-gcc-34-c++-3.4.6-4.x86_64.rpm /centos/5/os/x86_64/CentOS/compat-gcc-34-g77-3.4.6-4.x86_64.rpm
But not sure you can have both installed at the same time...
JD
John Doe wrote:
From: Alan M. Evansame1@extratech.com
What set of packages would that be? Like I said, the header in question is owned by compat-gcc-34, and there is only a 64-bit version available in the repos.
Not sure what you meant but there is a 32-bit version...
/centos/5/os/i386/CentOS/compat-gcc-34-3.4.6-4.i386.rpm /centos/5/os/i386/CentOS/compat-gcc-34-c++-3.4.6-4.i386.rpm /centos/5/os/i386/CentOS/compat-gcc-34-g77-3.4.6-4.i386.rpm
/centos/5/os/x86_64/CentOS/compat-gcc-34-3.4.6-4.x86_64.rpm /centos/5/os/x86_64/CentOS/compat-gcc-34-c++-3.4.6-4.x86_64.rpm /centos/5/os/x86_64/CentOS/compat-gcc-34-g77-3.4.6-4.x86_64.rpm
But not sure you can have both installed at the same time...
As suggested by JD, you could try downloading the i386 package for compat-gcc-34. You will have to get the rpm manually (eg with wget) since it's not in the x86_64 repo. Then try to install it, hopefully any deps can be found in the x86_64 centos repos (eg 32-bit versions of libgcc and glibc are there). If it conflicts with 64-bit compat-gcc-34, you can rpm -e this package and try again (assuming you only need to compile for 32-bit with gcc34).
Than see if your project builds, and if it does carefully check the shared libs with ldd - and test in your embedded system. Might work, might not. But it will be a lot faster than reinstalling, so may be worth a shot.
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Alan M. Evans Sent: Wednesday, March 30, 2011 12:48 To: CentOS mailing list Subject: Re: [CentOS] 32-bit compat-gcc on 64-bit CentOS?
On Tue, 2011-03-29 at 17:43 -0500, Jeff wrote:
On Tue, Mar 29, 2011 at 5:35 PM, Alan M. Evans ame1@extratech.com
wrote:
, but have you tried the -m32 flag with gcc. that will tell it to create 32-bit code. You will also need to pass that option to the linker
and
be sure any dependent libraries have the 32 bit versions installed.
I've tried the -m32 flag, along with "CC=gcc34" to actually cause it
to
use the compat compiler instead of the new one. The build process produces a lot of warnings that may or may not have been there before, then bails out with:
make: *** No rule to make target `/usr/lib/gcc/i386-redhat- linux/3.4.6/include/stdarg.h', needed by `hostcom.o'. Stop.
On the old server, which I have limited access to, that file is owned by the compat-gcc-34 package. And the 64-bit version of this package is installed on the new server, so the directory is x86_64-redhat-linux instead of i386-redhat-linux.
Unfortunately, from what I see, the x86_64 yum repos only offer an x86_64 version of compat-gcc-34. compat-gcc-34.x86_64 has /usr/lib/gcc/x86_64-redhat-linux/3.4.6/include/stdarg.h
*Perhaps* this (that it does not provide the *gcc/i386-* include tree, or that the i386 version is not also in the x86_64 repo) can be seen as a bug in the x86_64 package, to report upstream???
The error above looks like either by specifying the -m32 flag or by a hard code in either hostcom.c (or one of its included files) the 32bit version of the stdarg.h header is included instead of the available x86_64 version.
Seeing as you have source I would first try to compile it as 64bit and if the build works, then test heavily to verify the functionality. The drawback is that we have seen several open source projects*** with issues while they ported their software from 32 to 64. Perhaps there is a URL of Frequently seen 32 to 64 bit porting problems, that you could look at to be aware of the kinds of errors others have seen.
Again my first option would be try to go native (x86_64) and see if it works correctly.
Another option to keep from reinstalling, granted only slightly easier than reinstalling, is setup a KVM or XEN virtual machine on the server and install enough of the 32 bit CentOS to allow you to compile the source in a 32 bit environment and then install the binary onto the 64 bit system and make sure all the needed 32bit libs are available. You might even be able to fallback to running just that application in the VM while running everything else in the bare metal, granted then you get twice the effort for securing the OS (it IS another machine) and keeping the OS up to date.
Third option may be as others suggested, try to use mock to build the 32bit binary using the 64bit system. You would still need to make sure all the needed 32bit libs are available on the 64bit machine. [I have not used mock yet so I am unsure of the ability for it to provide the cross environment needed.]
*** ( the closed ones probably had issues too, but well being closed we don't hear about them. :)
My opinions, YMMV and all that jazz.
On Wed, 2011-03-30 at 14:33 -0400, Denniston, Todd A CIV NAVSURFWARCENDIV Crane wrote:
I've tried the -m32 flag, along with "CC=gcc34" to actually cause it
to
use the compat compiler instead of the new one. The build process produces a lot of warnings that may or may not have been there before, then bails out with:
make: *** No rule to make target `/usr/lib/gcc/i386-redhat- linux/3.4.6/include/stdarg.h', needed by `hostcom.o'. Stop.
On the old server, which I have limited access to, that file is owned by the compat-gcc-34 package. And the 64-bit version of this package is installed on the new server, so the directory is x86_64-redhat-linux instead of i386-redhat-linux.
Unfortunately, from what I see, the x86_64 yum repos only offer an x86_64 version of compat-gcc-34. compat-gcc-34.x86_64 has /usr/lib/gcc/x86_64-redhat-linux/3.4.6/include/stdarg.h
*Perhaps* this (that it does not provide the *gcc/i386-* include tree, or that the i386 version is not also in the x86_64 repo) can be seen as a bug in the x86_64 package, to report upstream???
Ugh. These are not the kind of words I relish hearing.
The error above looks like either by specifying the -m32 flag or by a hard code in either hostcom.c (or one of its included files) the 32bit version of the stdarg.h header is included instead of the available x86_64 version.
I'm sure it's not hard coded in hostcom.c. I'm not even sure why system header files are being included here. The projects are firmwares embedded systems that don't include libc at all. But I'm not, in this case, qualified to speculate on the reason or even the propriety of it.
Seeing as you have source I would first try to compile it as 64bit and if the build works, then test heavily to verify the functionality. The drawback is that we have seen several open source projects*** with issues while they ported their software from 32 to 64. Perhaps there is a URL of Frequently seen 32 to 64 bit porting problems, that you could look at to be aware of the kinds of errors others have seen.
Again my first option would be try to go native (x86_64) and see if it works correctly.
Unfortunately, the resulting binary is loaded and run on a 32-bit embedded system that bears almost no resemblance to a PC except that the processor is x86 compatible. Compiling as 64-bit would be a serious challenge and testing the output would be impossible.
Another option to keep from reinstalling, granted only slightly easier than reinstalling, is setup a KVM or XEN virtual machine on the server and install enough of the 32 bit CentOS to allow you to compile the source in a 32 bit environment and then install the binary onto the 64 bit system and make sure all the needed 32bit libs are available. You might even be able to fallback to running just that application in the VM while running everything else in the bare metal, granted then you get twice the effort for securing the OS (it IS another machine) and keeping the OS up to date.
*sigh* I can see that's where I'm headed. I might as well give in and start the process of installing the 32-bit OS and build environment on another machine now. The boss is not going to be happy about this.
Third option may be as others suggested, try to use mock to build the 32bit binary using the 64bit system. You would still need to make sure all the needed 32bit libs are available on the 64bit machine. [I have not used mock yet so I am unsure of the ability for it to provide the cross environment needed.]
I've never done mock, so I don't think I will be going that direction. Not while I have half the company breathing over my shoulder asking when the build system will be running again.
Does anybody know how to set up KVM on a headless, unattended server to run a virtual machine automatically on boot? I've only ever used it on my desktop with pointy-clicky tools like virt-manager. Even still, I usually use VirtualBox for virtual machines on my desktop.
-Alan
-snip
Does anybody know how to set up KVM on a headless, unattended server to run a virtual machine automatically on boot? I've only ever used it on my desktop with pointy-clicky tools like virt-manager. Even still, I usually use VirtualBox for virtual machines on my desktop.
-Alan
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
So you can still use virt-manager if using 5.4 and up and have it has a setting to autostart when the physical machine boots, virt-manager works fine as long as your vm's are fairly straight forward, I have several running this way. To make it headless I would just load freenx and then you can get into the box and do whatever you need to do, plus I load freenx in all of my vm's so I have access to them, although you can do most everything with KVM from the command prompt if needed with virsh...
On Tue, Mar 29, 2011 at 6:35 PM, Alan M. Evans ame1@extratech.com wrote:
Ugh.
One of our internal servers crashed so bad I just went out and bought a new machine to replace it.
The old server was Pentium-4 based and running CentOS-5. When I installed CentOS on the new machine, I used the 64-bit version, partly because that habit is almost automatic nowadays, and partly because the new machine has 6GB of RAM, so 32-bit seemed not very appropriate.
Anyway, I've managed to configure every one of the old server's many functions to match on the new server but one: I need the 32-bit version of compat-gcc-34. (Or at least I need to be able to compile 32-bit binaries with the already available version.) I can't seem to do this; am I just missing something?
Perhaps you can use "mock" to build chroot cages for such 32-bit operations?