dMZX Forums: config.sh doesn't support PPC or other non-x86/amd64/arm architectures on linux -> Archived MegaZeux Bugs -> Tracker

Jump to content

Report ID 581 Title config.sh doesn't support PPC or other non-x86/amd64/arm architectures on linux
Product Archived MegaZeux Bugs Status Fixed (Severity 3 - Medium)
Version - Fixed in GIT
Introduced In Version ----Operating System Debian Wheezy (PowerPC)

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #581: config.sh doesn't support PPC or other non-x86/amd64/arm architectures on linux

#1 User is offline  
GetDizzy 

  • Touch Fuzzy.
  • Group: DigiStaff
  • Posts: 3,567
  • Joined: 22-November 01
  • Gender:Other
  • Location:MA

Posted 06 June 2013 - 09:17 PM

I could swear MZX used to run fine on PPC Linux, and it certainly runs fine on PPC OSX last I checked.

config.sh however spits out "Add a friendly MACH to config.sh" when I try to run it on Linux PPC. I have absolutely 0 idea what this means, but I looked into config.sh and found this section that seems to be the culrpit:

elif [ "$PLATFORM" = "unix" -o "$PLATFORM" = "unix-devel" ]; then
        OS="`uname -s`"
        MACH="`uname -m`"
[...]
        if [ "$MACH" = "x86_64" -o "$MACH" = "amd64" ]; then
                ARCHNAME=amd64
                LIBDIR=lib64
                # FIXME: FreeBSD amd64 hack
                [ "$UNIX" = "freebsd" ] && LIBDIR=lib
                if [ "$MODULAR" = "true" ]; then
                        echo "ARCH_CFLAGS+=-fPIC" >> platform.inc
                        echo "ARCH_CXXFLAGS+=-fPIC" >> platform.inc
                fi
        elif [ "`echo $MACH | sed 's,i.86,x86,'`" = "x86" ]; then
                ARCHNAME=x86
                LIBDIR=lib
        elif [ "`echo $MACH | sed 's,^arm.*,arm,'`" = "arm" ]; then
                ARCHNAME=arm
                LIBDIR=lib
        else
                echo "Add a friendly MACH to config.sh."
                exit 1
        fi


It seems a case of simply looking at uname -m (which is just "ppc"), and adding a line along the lines of

        elif [ "$MACH" == "ppc" ]; then
                ARCHNAME=ppc
                LIBDIR=lib


above the else, but if this is the case, why is there a hardline "Oops, you're compiling on an unsupported platform, stopping now" bit with an inscrutable error message in the first place? Its not as though MegaZeux generally seems to have all that many unfixable issues compiling on random architectures that all run linux.

As in, why isn't the else simply this:

        else
                ARCHNAME=$MACH
                LIBDIR=lib # The default for most systems
                echo "WARNING: Compiling on an unsupported architecture. Add a friendly MACH to config.sh."


So, yeah, I guess I'm confused by the design decisions here mostly, but submitting this as a bug.
- Your Jumpy Neighborhood Admin

<@Tixus> Anyway, I set the year to 1988 for some reason.
<@Tixus> And set the microwave to run for a minute and 28 seconds.
<@Tixus> But it failed to send me back in time, and I was disappointed.
<Insidious> Tixus accidentally microwaved the 80s
<Insidious> that is my takeaway from this


Page 1 of 1  
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Replies (1 - 7)

#2 User is offline  
ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 06 June 2013 - 09:23 PM

Your suggestion of a liberal fall-through sounds fine to me.

The code block is there for two reasons. Firstly, to get LIBDIR right, but you're right that on non-multi-arch Linux machines that's going to be 'lib'. Secondly, ARCHNAME is used for the updater; not really a problem since it's disabled by default for Linux, but it was developed and does work on Linux. We can't have a million different uname -m variants handled in the updater, so we have to compress this down to the true ELF/ABI class.

Obviously with your 'guesswork' fallback you run the risk of enabling the updater and getting undefined results, but that's better than just flat failing to compile.

--ajs.

#3 User is offline  
GetDizzy 

  • Touch Fuzzy.
  • Group: DigiStaff
  • Posts: 3,567
  • Joined: 22-November 01
  • Gender:Other
  • Location:MA

Posted 06 June 2013 - 09:52 PM

Thanks for the explanation, I understand the purpose of that section much better now.

And yeah, I think having a liberal fall-through like the above is a good idea, and have implemented the bit I suggested above in my own copy that I'm using with my VMs.
- Your Jumpy Neighborhood Admin

<@Tixus> Anyway, I set the year to 1988 for some reason.
<@Tixus> And set the microwave to run for a minute and 28 seconds.
<@Tixus> But it failed to send me back in time, and I was disappointed.
<Insidious> Tixus accidentally microwaved the 80s
<Insidious> that is my takeaway from this

#4 User is offline  
GetDizzy 

  • Touch Fuzzy.
  • Group: DigiStaff
  • Posts: 3,567
  • Joined: 22-November 01
  • Gender:Other
  • Location:MA

Posted 07 June 2013 - 08:27 PM

Updating status to: Proposed Fix
Updating severity to: 3 - Medium
- Your Jumpy Neighborhood Admin

<@Tixus> Anyway, I set the year to 1988 for some reason.
<@Tixus> And set the microwave to run for a minute and 28 seconds.
<@Tixus> But it failed to send me back in time, and I was disappointed.
<Insidious> Tixus accidentally microwaved the 80s
<Insidious> that is my takeaway from this

#5 User is offline  
GetDizzy 

  • Touch Fuzzy.
  • Group: DigiStaff
  • Posts: 3,567
  • Joined: 22-November 01
  • Gender:Other
  • Location:MA

Posted 03 April 2015 - 01:42 AM

Hey, I hate to be That Guy, but since this was reported around the same time as the recently fixed armhf linker bug, I'm kind of bumping this to see if my proposed fix was ever actually accepted into the code. Was it?
- Your Jumpy Neighborhood Admin

<@Tixus> Anyway, I set the year to 1988 for some reason.
<@Tixus> And set the microwave to run for a minute and 28 seconds.
<@Tixus> But it failed to send me back in time, and I was disappointed.
<Insidious> Tixus accidentally microwaved the 80s
<Insidious> that is my takeaway from this

#6 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 19 June 2015 - 07:03 PM

Not certain—I'll look into it...
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#7 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 19 May 2017 - 04:28 AM

Updating status to: Fixed
Issue fixed in: GIT

The answer is no, it wasn't. Added in GIT 572c534.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#8 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 29 June 2017 - 07:07 AM

Moving to: Archived MegaZeux Bugs


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

0 User(s) are reading this issue
0 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2024  IPS, Inc.