mkdir failed

BlitzMax Forums/BlitzMax Beginners Area/mkdir failed

jonmiles(Posted 2005) [#1]
When I use bmk to compile modules on Linux I get this result: "Compile Error! mkdir failed!". I've turned verbose mode on and the error happens just after the "Generating interface..." step. I can use bmk successfully on Windows, so there must be something wrong with my Linux setup. I've been using Ubuntu for a couple of months now, and was able to successfully compile the sample games provided with Blitzmax.


Alden(Posted 2005) [#2]
Looks like you don't have permissions to write in bmax, or one if its subfolders.
You can change permissions for files and folders using chmod.
For example "chmod u+wrX /<path>/<bmax folder> -R" will give the owner all (write, read, execute) rights to bmax and all subfolders and files in it.
Chmod might fail if you installed bmax as root, or some other user, so you don't have rights to change them.
To change ownership of folders/files switch user to root and run "chown <user>:<group> /<path>/<bmax folder> -R", logout root and try chmod again.


jonmiles(Posted 2005) [#3]
I've tried your suggestions but unfortunately with no luck. I installed Blitzmax under my username, but I did chown anyway just to be safe. Then I did chmod on the Blitzmax directory and verified the changes in the file manager, yet I still get the same fail error.

I then tried running bmk as root by prefixing it with sudo, after doing a 'bmk cleanmods'. That didn't work either. One thing I don't entirely understand is what directories bmk is trying to create... the hidden .bmx folder is created successfully, as well as a 'modname.bmx.debug.s' file inside it. Is there anywhere in particular that the Blitzmax directory should reside? Currently it's in my home folder.


Dreamora(Posted 2005) [#4]
have you chmod ed your project directory as well? (it needs to generate .bmx directory there). if it isn't save the blitzmax/tmp directory needs to be chmod ed as well


jonmiles(Posted 2005) [#5]
I appear to have fixed the problem, though I don't entirely understand why the solution worked. What I did was create a new folder, cut the bmx file that wouldn't compile into it, then renamed the folder to the relevant module name. I did this using the Ubuntu file manager and it now compiles my modules quite happily.

As I said, I don't know why this worked - the folder has exactly the same owner and permissions that I just set on the other one (and I have no doubt I did that correctly). All I can imagine is perhaps there was some other difference with the folder, possibly as a result of me using samba to copy it across from my Windows computer? That doesn't explain why all the other folders were unaffected though. Anyway, thank you both as I don't think I would have stumbled upon the solution otherwise.