Mac compile fails
#116413
11/12/19 07:41 PM
|
Joined: Dec 2005
Posts: 108
CRP
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2005
Posts: 108 |
Hi, I compile mame for macos myself by cloning the github source, then running make. Lately, I keep getting errors like this:
Archiving libformats.a...
fatal error: /Library/Developer/CommandLineTools/usr/bin/ranlib: can't move the output file to its final location: ../../../../osx_clang/bin/x64/Release/mame_mame/libformats.a (Resource busy)
/Library/Developer/CommandLineTools/usr/bin/ar: internal ranlib command failed
make[2]: *** [../../../../osx_clang/bin/x64/Release/mame_mame/libformats.a] Error 1
make[1]: *** [formats] Error 2
make: *** [macosx_x64_clang] Error 2
If I run make again it fails at a different point. Not sure what's wrong here... any ideas?
|
|
|
Re: Mac compile fails
[Re: CRP]
#116415
11/12/19 08:43 PM
|
Joined: Sep 2000
Posts: 224
will
Senior Member
|
Senior Member
Joined: Sep 2000
Posts: 224 |
I just compiled mame from the GitHub source yesterday without a problem. I'm running 10.15.1 and SDL 2.0.10
Have you installed the latest Xcode? Tell us which macOS version you're running and what kind of Mac you have.
=will=
|
|
|
Re: Mac compile fails
[Re: CRP]
#116417
11/12/19 09:00 PM
|
Joined: Dec 2005
Posts: 108
CRP
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2005
Posts: 108 |
macos ver 10.15.1
Mac Mini 2018 3 GHz 6-Core Intel Core i5
I am using Command Line Tools
clang -v Apple clang version 11.0.0 (clang-1100.0.33.8) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Last edited by CRP; 11/12/19 09:01 PM.
|
|
|
Re: Mac compile fails
[Re: CRP]
#116418
11/12/19 09:07 PM
|
Joined: Sep 2000
Posts: 224
will
Senior Member
|
Senior Member
Joined: Sep 2000
Posts: 224 |
I have a slightly newer clang (?) - don't know if installing latest Xcode would help.
clang -v Apple clang version 11.0.0 (clang-1100.0.33.12) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
=will=
|
|
|
Re: Mac compile fails
[Re: CRP]
#116419
11/12/19 09:13 PM
|
Joined: Mar 2001
Posts: 16,391
R. Belmont
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 16,391 |
Is MAME running when you're trying to compile? That's usually what "Resource busy" means. I build at least once a day on my MacBook Pro and haven't had any problems.
|
|
|
Re: Mac compile fails
[Re: R. Belmont]
#116422
11/13/19 07:32 PM
|
Joined: Dec 2005
Posts: 108
CRP
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2005
Posts: 108 |
no, mame is not running. I am really at a loss about these errors...
|
|
|
Re: Mac compile fails
[Re: CRP]
#116429
11/14/19 07:32 PM
|
Joined: Dec 2005
Posts: 108
CRP
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2005
Posts: 108 |
I was compiling with the source files on my NAS. If I compile with files on the local HD everything works fine. Not sure what the NAS is doing, but it generates those Resource Busy messages...
|
|
|
Re: Mac compile fails
[Re: CRP]
#116430
11/14/19 08:39 PM
|
Joined: Mar 2004
Posts: 648
belegdol
Senior Member
|
Senior Member
Joined: Mar 2004
Posts: 648 |
Probably the latency introduced by the NAS is causing race conditions.
|
|
|
Re: Mac compile fails
[Re: CRP]
#116431
11/14/19 09:03 PM
|
Joined: Oct 2019
Posts: 21
Robert Hildinger
Member
|
Member
Joined: Oct 2019
Posts: 21 |
Agreed. You can try adjusting your parallel build level to see if you can accomplish a build from NAS. Of course -j1 should avoid race conditions, but will be very, very slow...
|
|
|
Re: Mac compile fails
[Re: CRP]
#116432
11/14/19 09:23 PM
|
Joined: Mar 2001
Posts: 16,391
R. Belmont
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 16,391 |
Is the NAS mounted via NFS or SMB? In my experience, NFS on macOS got flakey somewhere around 10.9 or 10.10 and hasn't improved since. I switched my MacBook to use SMB mounts instead of NFS and it's been totally stable (and gotten faster transfers).
|
|
|
Re: Mac compile fails
[Re: CRP]
#116524
11/30/19 12:50 PM
|
Joined: Dec 2005
Posts: 108
CRP
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2005
Posts: 108 |
I have tried remounting the NAS as smb, then I have re-cloned the git repository, and finally I run "make -j 1". compile always fails with the following message:
Generating ../build/projects/sdl/mame/gmake-osx-clang/mame.make... Done. Generated 364/364 projects. Creating ../../../../osx_clang/bin/x64/Release Precompiling src/emu/emu.h... Compiling src/emu/drivers/empty.cpp... fatal error: malformed or corrupted AST file: 'malformed block record in AST file' 1 error generated. make[2]: *** [../../../../osx_clang/obj/x64/Release/src/emu/drivers/empty.o] Error 1 make[1]: *** [precompile] Error 2 make: *** [macosx_x64_clang] Error 2
|
|
|
Re: Mac compile fails
[Re: CRP]
#116525
11/30/19 03:55 PM
|
Joined: Mar 2001
Posts: 16,391
R. Belmont
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 16,391 |
That's an internal Clang error. Apparently it can happen if there's bad/stale data in ~/Library/Developer/Xcode/DerivedData/ModuleCache, so deleting the contents of that directory can help.
|
|
|
Re: Mac compile fails
[Re: CRP]
#116526
11/30/19 04:37 PM
|
Joined: Dec 2005
Posts: 108
CRP
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2005
Posts: 108 |
Thanks, I found a similar suggestion online, but there is no Developer folder in my Library. btw I am just using Command Line tools (which has always worked in the past for me). Do I need a full XCode installation?
|
|
|
Re: Mac compile fails
[Re: CRP]
#116527
11/30/19 05:19 PM
|
Joined: Mar 2001
Posts: 16,391
R. Belmont
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 16,391 |
No, you shouldn't need a full install. I guess for now the advice is to only compile MAME on your Mac's internal drive, and then move it to external afterwards.
|
|
|
Re: Mac compile fails
[Re: CRP]
#116528
11/30/19 05:37 PM
|
Joined: Dec 2005
Posts: 108
CRP
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2005
Posts: 108 |
I will do that, thanks for your help!
|
|
|
|
1 registered members (Doc Flareon),
148
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics8,722
Posts114,638
Members4,873
|
Most Online510 Aug 26th, 2019
|
|
|