Author Topic: Installing NASM on Redhat 5.2 i386 machine  (Read 10931 times)

Offline jawright

  • Jr. Member
  • *
  • Posts: 5
Installing NASM on Redhat 5.2 i386 machine
« on: January 19, 2012, 03:40:57 AM »
 ??? Will any version of NASM work on Redhat Linux 5.2 kernel version 2.0.36-0? I'm getting GLIBC6 version needed error messages when I run 'make'. Is NASM even possible for Linux this old? If not, what is the cut off version (7, 8, 9.0). I just wanted to experiment with this old IBM/PS1 486/66 box. I've  got DJGPP and NASM for dos on it, so I figured NASM for my linux partition would be no problem.  :D

Any advice?


Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Installing NASM on Redhat 5.2 i386 machine
« Reply #1 on: January 19, 2012, 05:57:59 PM »
I don't know. Nasm "should" be possible, even on an early kernel (I think). I thought I was "obsolete" with a 2.4.33.3 kernel! :)

At some point (I think it was 0.98.xx), we fixed a potential buffer overflow. This required some newer tools, but it was considered that "everybody has that". Not really true. As I recall, I had to use a newer (beta) version of DJGPP to get it to work on dos. I think is was "snprintf()" that was required.

It may be possible to upgrade your glibc and/or gcc version on your current kernel/hardware. I'm not sure how that would go...

According to the Manual, it was 0.98.39 that fixed the buffer overflow, so perhaps 0.98.38 would work for you. That's pretty far back! You'd be missing a lot of new features, and a lot of bugfixes besides the buffer overflow. Better to upgrade your glibc, if you can, I think.

Maybe another, more recently active, member of the development team will check in with a better idea... one may hope...

Best,
Frank


Offline jawright

  • Jr. Member
  • *
  • Posts: 5
Re: Installing NASM on Redhat 5.2 i386 machine
« Reply #2 on: January 19, 2012, 07:38:35 PM »
Yea, I was thinking maybe it is not so much a kernel issue but a binutils update, but I think those go hand in hand within the major kernel releases. It might not be possible but I would like to try if there is a upgrade path. Redhat 5.2 is about as much as this machine can handle resource wise. 64MB and 2GB hard drive is my max on this. It's a 4 slot, 2 bay ISA machine. It's my legacy dos development machine. It was produced before CDROMs and 1GB hard drives were even an option. I got it working with both, so it is a good Linux/DesqView/X workstation for DJGPP development. :)

Offline Bryant Keller

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 360
  • Country: us
    • About Bryant Keller
Re: Installing NASM on Redhat 5.2 i386 machine
« Reply #3 on: January 22, 2012, 09:39:57 AM »
jawright,

You should definitely update to libc6/glibc2 because it introduces quite a few bug-fixes. However, if you are going to be running an older version of Linux, then I wouldn't be in a hurry to remove libc5. A good solution is to install both libc5 & libc6 binaries, then install the libc6 development package. The two libraries can easily co-exist without conflicting but the development package must be either or. This will allow you to continue running your older software that's based on libc5, but as you do source builds of any new software (or updates of old ones), you will slowly transition into libc6. This will allow you to avoid a lot of the headaches that comes with a complete update (I had problems with Perl when I moved from libc5 to libc6).

And that's assuming that you're running libc5... if you are running libc4... well, it'd be easier to just do a full system update because libc4 and older were the ones that used AOUT binary format (with some tweaks for dynamic linkage) and were notoriously buggy. libc5 (iirc) was the first to incorporate ELF, that should be the minimum libc version you are shooting for.

In regards to the IBM/486, wow! I thought I was on some old hardware. The last couple of weeks I've been working under an 80503 with 256MB RAM & 10GB HDD running Bell Labs Plan9. :D

About Bryant Keller
bkeller@about.me

Offline jawright

  • Jr. Member
  • *
  • Posts: 5
Re: Installing NASM on Redhat 5.2 i386 machine
« Reply #4 on: January 28, 2012, 10:20:04 PM »
Thanks for the instructions Bryant.  :-* Yea, this old 486-66 is kind of cool. I have it all maxed out. I'm not sure Linux even existed when this thing was in use. It's a great dos development / Linux - DesqView/X workstation. Linux 5.2 is the highest version I can go concerning hard disk space. I've tried installing 6.22 on it, but it wants to hang during the install. 2GB is all the hard drive (1) I can muster without removing the CDrom drive. Redhat 5.2 performance is very smooth on this machine.

My current version is libc5, which  I know by querying the Libraries package folder. Now, under the /Development/Libraries/Libc package folder I have
glibc 2.0.7-29
glibc-devel 2.0.7-29

which looks like source and headers, but nothing identified as libc5 there. So, where should I get libc6 development and binaries? I'm thinking ftp://archive.download.redhat/pub
and scalp it from 6.22 or 7.0. I have those CDs right here too. Will that work? :) And also...what package(s) as far as development? ??? binutils and what else?

After the libc6 update I guess I will try installing NASM 0.99.39, or can I go higher?

Offline Bryant Keller

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 360
  • Country: us
    • About Bryant Keller
Re: Installing NASM on Redhat 5.2 i386 machine
« Reply #5 on: January 30, 2012, 12:16:56 AM »
libc6 and glibc are the same version of libc

glibc is version 2 of the GNU C Library, but it's the sixth major version of the Linux C library (libc6)

http://ftp.gnu.org/gnu/glibc/

About Bryant Keller
bkeller@about.me

Offline jawright

  • Jr. Member
  • *
  • Posts: 5
Re: Installing NASM on Redhat 5.2 i386 machine
« Reply #6 on: January 30, 2012, 05:05:13 PM »
O.k. but with what version does libc6 start. (2.x?) The version stuff is not clear to me, I don't understand where I'm at other than I know 2.0.7 is LIBC5.  Running ldd --version on this machine shows me that I have 2.0.7 installed. Take for instance glibc-2.1.92-14.i386.rpm for RH 7.0. What constitutes version 2. or GLIBC6?

Here is what rpm says when I try to install nasm-0.99.06-1.i386.rpm, just to see what is needed. I was looking on http://rpmfind.net to see what my options are. There is no glibc 2.4.x for any RedHat version.
I assume I should stay with a distro spacific rpm?  ???

failed dependences:

libc.so.6 (GLIBC_2.0) is needed by nasm-0.99.06-1
libc.so.6 (GLIBC_2.1) is needed by nasm-0.99.06-1
libc.so.6 (GLIBC_2.1.1) is needed by nasm-0.99.06-1
libc.so.6 (GLIBC_2.3) is needed by nasm-0.99.06-1
libc.so.6 (GLIBC_2.3.4) is needed by nasm-0.99.06-1
libc.so.6 (GLIBC_2.4) is needed by nasm-0.99.06-1
rpmlib (CompressedFileNames) <= 3.0.4-1 is needed by nasm-0.99.06-1
rpmlib (PayLoadFilesHavePrefix) <= 3.0.4-1 is needed by nasm-0.99.06-1
rtld (GNU_HASH) is needed by nasm-0.99.06-1

Offline Bryant Keller

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 360
  • Country: us
    • About Bryant Keller
Re: Installing NASM on Redhat 5.2 i386 machine
« Reply #7 on: January 31, 2012, 02:53:00 AM »
As your error message is explaining, it seems to require at least GLIBC_2.4 and as you said, RPMFind doesn't have one for RHEL.  :'(

But don't worry! As it turns out, Fedora has what you need and it should be close enough to RHEL that it'll work.

http://rpmfind.net//linux/RPM/fedora/updates/14/i386/glibc-2.13-2.i686.html

Try that and let us know if it works. :)

About Bryant Keller
bkeller@about.me

Offline jawright

  • Jr. Member
  • *
  • Posts: 5
Re: Installing NASM on Redhat 5.2 i386 machine
« Reply #8 on: January 31, 2012, 04:10:37 PM »
Okay I'll try that. Just to clarify the steps for what I need to do... I don't need to compile or configure any glibc sources, just nasm when after I get the C library and development system updated, right? You mentioned that I need to upgrade the development to version 6. Now as far as that, which package version should I try installing. I assume it would be from the same fedora release ???

Anyway, give me the 1,2,3 method so I can connect the dots. Not that I know what I plan to do at this point but, explain how you think things will be as far as backward/forward compatibility building software from LIBC5 to version 6. I think I understand that there is binary compatibility, but not sure I am clear on what limitations there are for compiling and building from source? You mentioned them briefly.