OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 1:20 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: "mtools" commands not working on MacOS
PostPosted: Sat Aug 14, 2021 10:27 am 
Offline

Joined: Wed Jul 07, 2021 7:18 pm
Posts: 10
I have just switched over to my Mac from windows because Mac has the command line tools I need for OS Development.
I have just installed mtools with Homebrew:
Code:
brew install mtools

The issue is when I go to compile using "make building", it stops at the first "mtools" command, "mformat" and says:
Code:
mformat -i iso/BirdOS.img -f 1440 ::

Assertion failed: (clusters_fit_into_fat(Fs)), function check_fs_params_and_set_fat, file mformat.c, line 354.
make: *** [building] Abort trap: 6


All of the "mtools" commands produce some sort of error no matter what I do.
Just to let you know, it was working perfectly fine on windows.

I think it could possibly be that I recently upgraded to MacOS 12 (Monterey) Beta, and I also noticed that brew says this when updating:

Code:
Warning: You are using macOS 12.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
pre-release version.


Anyways, is there any way to fix this error, or any other ways to install mtools on MacOS without Homebrew?

Thanks so much!


Top
 Profile  
 
 Post subject: Re: "mtools" commands not working on MacOS
PostPosted: Sat Aug 14, 2021 11:01 am 
Offline
Member
Member
User avatar

Joined: Tue Sep 15, 2020 8:07 am
Posts: 264
Location: London, UK
I do all my stuff with Homebrew on my Mac because it’s just so much easier than Windows for OS Dev, perhaps not as easy as using a Linux box, but the Linux needs way too much of my time to get working how I want it to.

Anyway, I ran homebrew on a hugely out of date MacOS Sierra install until early this year always had that “not supported” message and it never caused issue.

I don’t use mtools so I’m going to need to read up about it, but my guess is some incompatibility between platforms!

_________________
CuriOS: A single address space GUI based operating system built upon a fairly pure Microkernel/Nanokernel. Download latest bootable x86 Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip
Discord:https://discord.gg/zn2vV2Su


Top
 Profile  
 
 Post subject: Re: "mtools" commands not working on MacOS
PostPosted: Sat Aug 14, 2021 11:56 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
amandude wrote:
I have just switched over to my Mac from windows because Mac has the command line tools I need for OS Development.

Out of curiosity, which tools were missing? Everything I've needed so far has been available on Windows through WSL.


Top
 Profile  
 
 Post subject: Re: "mtools" commands not working on MacOS
PostPosted: Sat Aug 14, 2021 12:19 pm 
Offline

Joined: Wed Jul 07, 2021 7:18 pm
Posts: 10
Octocontrabass wrote:
amandude wrote:
I have just switched over to my Mac from windows because Mac has the command line tools I need for OS Development.

Out of curiosity, which tools were missing? Everything I've needed so far has been available on Windows through WSL.


I couldn't seem to compile C++ code for my OS using the x86_64-w64-mingw32-gcc cross compiler because it said cc1plus not found, so I switched over to MacOS to find that x86_64-w64-mingw32-g++ was available, where on windows, I could not seem to get the x86_64-w64-mingw32-g++ command (because it said command not found, but the x86_64-w64-mingw32-gcc command was), or find out how to fix cc1plus not found. But yes, WSL does have most of the command line tools I need. I just couldn't seem to fix some problems listed above and was doing some testing on my Mac to find out if it worked (And now I have the "mtools" problem). :)


Top
 Profile  
 
 Post subject: Re: "mtools" commands not working on MacOS
PostPosted: Sat Aug 14, 2021 12:28 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
amandude wrote:
I could not seem to get the x86_64-w64-mingw32-g++ command

Sounds like you didn't install it. For Ubuntu or Debian in WSL, run "sudo apt install g++-mingw-w64-x86-64" to install it.


Top
 Profile  
 
 Post subject: Re: "mtools" commands not working on MacOS
PostPosted: Sun Aug 15, 2021 11:03 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
This link: https://bbs.archlinux.org/viewtopic.php?id=268320 suggests that you may want to downgrade to an earlier version of mtools.

Personally, I find OS X a pain when it comes to OS development. Linux in a VM on a Mac, or WSL on a PC are much more friendly solutions.

Edit: On second thoughts - why do you need mtools? OS X is able to create and mount FAT disk images natively.


Top
 Profile  
 
 Post subject: Re: "mtools" commands not working on MacOS
PostPosted: Sun Aug 15, 2021 2:26 pm 
Offline
Member
Member
User avatar

Joined: Tue Sep 15, 2020 8:07 am
Posts: 264
Location: London, UK
iansjack wrote:
Edit: On second thoughts - why do you need mtools? OS X is able to create and mount FAT disk images natively.


Good point! I use the MacOS tool “hdiutil” for all my Disk image stuff.

_________________
CuriOS: A single address space GUI based operating system built upon a fairly pure Microkernel/Nanokernel. Download latest bootable x86 Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip
Discord:https://discord.gg/zn2vV2Su


Top
 Profile  
 
 Post subject: Re: "mtools" commands not working on MacOS
PostPosted: Tue Aug 17, 2021 4:31 pm 
Offline

Joined: Wed Jul 07, 2021 7:18 pm
Posts: 10
iansjack wrote:

On second thoughts - why do you need mtools? OS X is able to create and mount FAT disk images natively.


Thanks for the information. I had no idea that you could create a disk image on a mac without mtools!
I will give it a try.

Octocontrabass wrote:
amandude wrote:
I could not seem to get the x86_64-w64-mingw32-g++ command

Sounds like you didn't install it. For Ubuntu or Debian in WSL, run "sudo apt install g++-mingw-w64-x86-64" to install it.


That fixed my problem with compiling C++ code. Thanks for your help! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: 8infy, Google [Bot] and 72 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group