WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: MbedTLS Illegal Instruction on i586  (Read 840 times)

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 313
MbedTLS Illegal Instruction on i586
« on: May 19, 2024, 01:35:03 AM »
I'm getting "illegal instruction" errors with MbedTLS libs on a Pentium 1 (i586), such as from the selftest program in mbedtls-bin:
Code: [Select]
$ /tmp/tcloop/mbedtls-bin/usr/local/bin/selftest
Illegal instruction

It seems from the build script that the x86 mbedtls-lib.tcz and mbedtls-bin.tcz extensions on TC12 and later were built with the x86_64 compiler flags instead of these x86 flags shown on the Wiki:
Code: [Select]
export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export LDFLAGS="-Wl,-O1"

Since I built the updated Dillo extension for MbedTLS instead of OpenSSL, I expect this is why it's also failing with "Illegal instrucion" in TC15 on i586.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14900
Re: MbedTLS Illegal Instruction on i586
« Reply #1 on: May 19, 2024, 03:23:36 AM »
Maybe you could pm the maintainer and request a replacement?

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 313
Re: MbedTLS Illegal Instruction on i586
« Reply #2 on: May 19, 2024, 03:59:15 AM »
Thanks Juanito, yes PM sent.

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 313
Re: MbedTLS Illegal Instruction on i586
« Reply #3 on: January 23, 2025, 05:27:44 AM »
I never got a response to my PM.

Mbed TLS 2 reached end of support with the end of 2024 according to the release notes. Should there be mbedtls3 extensions for version 3.6 (suported "until at least March 2027")? I think programs need to be recompiled to work with version 3.6.

I could submit mbedtls extensions built with the right compiler flags for x86 for the current Mbed TLS 3.6.2 release. I could also do the same for the x86_64 extension if its maintainer (polikuo) doesn't want to build v. 3.

Otherwise I'll go back to OpenSSL for building the new version of Dillo that's been released.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 769
Re: MbedTLS Illegal Instruction on i586
« Reply #4 on: January 24, 2025, 05:06:45 AM »
I never got a response to my PM.

Mbed TLS 2 reached end of support with the end of 2024 according to the release notes. Should there be mbedtls3 extensions for version 3.6 (suported "until at least March 2027")? I think programs need to be recompiled to work with version 3.6.

I could submit mbedtls extensions built with the right compiler flags for x86 for the current Mbed TLS 3.6.2 release. I could also do the same for the x86_64 extension if its maintainer (polikuo) doesn't want to build v. 3.

Otherwise I'll go back to OpenSSL for building the new version of Dillo that's been released.

Hi, CNK.

Sorry for the late reply.

Feel free to take over if you already have a working build.

I'm mostly on raspberry pi now.