Menu

#35 makefiles fail is NITROS9DIR path has spaces in it.

v3.3.1
open
nobody
None
5
2022-07-03
2020-04-25
No

It looks like we should quote the makefile references to $(NITROS9DIR) to make them work when installed on a path that has a space in it.

Thanks to things like OneDrive and iCloud and other shared folders, now much of my stuff is buried in folders that have spaces in them that I don't control.

Discussion

  • Tormod Volden

    Tormod Volden - 2020-04-25

    Oh, that will be some work :) Take back control! But actually there are workarounds too: On Linux and MacOS and even on Windows you can use a soft link to the repo in a place without spaces in its path.

     
    • Allen Huffman

      Allen Huffman - 2020-04-25

      If the work is just quoting all the references, I could knock that out one evening. Assuming that works.

       
    • Tormod Volden

      Tormod Volden - 2020-04-25

      This would be a quick way to just add those quotes:
      sed -i 's/\$(NITROS9DIR)/"$(NITROS9DIR)"/g' $(find . -name makefile)
      but frankly I am unsure if that would be enough. "make" simply doesn't deal well with spaces.

      However we have a mix of using NITROS9DIR and using relative path e.g. ../../../rules.mak that it would be nice to clean up. I think relative paths are good, and they are already used in half of the places for finding rules.mak. Apart from rules.mak, NITROS9DIR is only used a few places.

       
      • Anonymous

        Anonymous - 2020-04-26

        I think it has to quote the whole thing, like if it did:

        $(NITROS9DIR)/make

        That whole thing needs quoted:

        "$(NITROS9DIR)/make"

        I will do some tests.

        As to hard-coded path versus relative, going all relative would solve this as well, since as long as the make is ran from the initial directory, everything would be controlled below it and the upper install path (spaces or no) would not matter.

         
      • Allen Huffman

        Allen Huffman - 2020-04-26

        I don't mind doing the "trained monkey" work for massive cleanups like this. I tend to be the one that takes those on at companies I work for because no one else will do it and I know it pays off in the end ;-)

         
        • Allen Huffman

          Allen Huffman - 2022-07-02

          This hit me again tonight when I started trying to get NitrOS9 going ;-) It's the first time I've tried to build from an iCloud drive on Mac, and it has the same issue any Windows system with OneDrive has -- space in the path name, darnit.

           
          • Tormod Volden

            Tormod Volden - 2022-07-02

            Go to a folder with no spaces in it, i.e. /Users/allen then create a soft link there:

            cd /Users/allen
            ln -s /Volumes/WhatNot/With Spaces/etc/nitros-9
            cd nitros-9
            make
            
             

            Last edit: Tormod Volden 2022-07-02
            • Allen Huffman

              Allen Huffman - 2022-07-03

              Is this documented?

              As it stands today, anyone with a modern Window PC would have defaulted to OneDrive, and would be unable to build this.

              Likewise, anyone with a modern Mac, with iCloud on by default, would be unable to build this.

              At the very least, this needs to be documented. I consider myself a far more advanced user than most, and it's bitten me on both operating systems.

              And if it can be fixed simply by adding quotes around things in makefiles, why don't we just do that and solve it for everyone?

              The days of paths without spaces is long, long gone. That's been supported by OSes for so long, it's stunning this is still an issue with so many programs -- including commercial ones that cost $$$$.

               
          • Tormod Volden

            Tormod Volden - 2022-07-03

            anyone with a modern Window PC would have defaulted to OneDrive

            Good grief, I hope you are not right, and I think you aren't.

            One could say that anyone with a Windows PC usually doesn't build his own software, and that's why we are providing release and snapshot binaries :)

            And if it can be fixed simply by adding quotes around things in makefiles, why don't we just do that and solve it for everyone?

            I think you tried that 2 years ago, and I think it is not so easy. GNU Make doesn't deal well with spaces, period. You will often see people install things like Cygwin, Python or many other cross-platform things on their C:\ root and that is for a reason. But here, also C:\Users\allen\Documents\nitros9 or anything like this will work too. Even Microsoft went way from using "Documents & Settings" or whatever stupid standard path element they used in the '95 days.

            Anyway I think using relative paths instead of NITROS9DIR is a better way to solve this.

            The days of paths without spaces is long, long gone.

            That's why we like retro-computing!

            At the very least, this needs to be documented.

            Yes, please. If you don't have wiki access just post the text here and I'll copy it it.

             
            • Allen Huffman

              Allen Huffman - 2022-07-03

              On Jul 3, 2022, at 4:20 PM, Tormod Volden wrote:

              anyone with a modern Window PC would have defaulted to OneDrive

              Good grief, I hope you are not right, and I think you aren't.

              I’ve reinstalled my Work DELL laptop so many times — it’s been back in the shop 6 or 7 times, and each time I get it back I do a Restart and fresh install to make sure nothing got “put” on my machine.

              And if you just go through all the defaults, it wants you to specify a Microsoft login, and it sets up OneDrive, etc. by default. Windows 11, too.

              One could say that anyone with a Windows PC usually doesn't build his own software, and that's why we are providing release and snapshot binaries :)

              Wait … there’s binaries for these packages available? Mac, Windows, Pi, etc.? I did not know that.

              And if it can be fixed simply by adding quotes around things in makefiles, why don't we just do that and solve it for everyone?

              I think you tried that 2 years ago, and I think it is not so easy. GNU Make doesn't deal well with spaces, period. You will often see people install things like Cygwin, Python or many other cross-platform things on their C:\ root and that is for a reason. But here, also C:\Users\allen\Documents\nitros9 or anything like this will work too. Even Microsoft went way from using "Documents & Settings" or whatever stupid standard path element they used in the '95 days.

              Does't Unix/Linux allow spaces in filenames?Surely this isn’t a new change?

              Anyway I think using relative paths instead of NITROS9DIR is a better way to solve this.

              I like that idea. I’d put in the work to help convert all the makefiles. Heavens know I spent enough time at Microware with their MWOS directory structure and makefiles that I think I could re-learn this pretty easily.

              The days of paths without spaces is long, long gone.

              That's why we like retro-computing!

              At the very least, this needs to be documented.

              Yes, please. If you don't have wiki access just post the text here and I'll copy it it.

              Wiki access?

              I have so much to learn here.

               

              Last edit: Tormod Volden 2022-07-03
            • Tormod Volden

              Tormod Volden - 2022-07-03

              https://nitros9.sourceforge.io/wiki/index.php/Building_NitrOS9
              It says "prebuilt" but that means binaries.

              Unix/etc allow spaces in filenames, but many tools are not so much at ease with it. If you do shell scripting, adding quotation marks all over (except where you shouldn't) works. If you do Makefiles, it is well, complicated.

               

              Anonymous
              Anonymous

              Add attachments
              Cancel





              Auth0 Logo