Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: coutts on June 12, 2013, 05:41:15 AM

Title: compiling broken in OS X after commit "e01856b"
Post by: coutts on June 12, 2013, 05:41:15 AM
https://bitbucket.org/hudson/magic-lantern/commits/e01856b86df6

Confirming the other comments on the commit from 'Gregory O'Connor', can't compile ML on OS X anymore due to missing `truncate` command.

Anybody figure out a work-around? I went macports last time I re-installed OS X (not brew) and it's kind of a big project to install brew (more work than practical just to install one thing).
Title: Re: compiling broken in OS X after commit "e01856b"
Post by: a1ex on June 12, 2013, 09:33:41 AM
Maybe write a script that does the same job? (not sure what's the best choice for portability)
Title: Re: compiling broken in OS X after commit "e01856b"
Post by: marekk on June 19, 2013, 01:01:49 PM
sudo port install truncate

then in src/Makefile.src replace "@truncate -s 284 $@" with "@truncate $@ 284"
Title: Re: compiling broken in OS X after commit "e01856b"
Post by: GregoryOfManhattan on June 19, 2013, 08:35:37 PM
hi coutts - on the bitbucket thread,  i made sure to provide correct instructions for others and noted that a serverfault post is incorrect

truncate or gnu truncate is not included in osx/darwin (strange that it is on freebsd).
if the code used dd it may have just worked on osx, but it is easy enough to install
one way of which is via homebrew
Code: [Select]
brew install coreutils
which places gnu versions of gnu.org/coreutils in /usr/local/bin/ prefixed with a g
since there is no osx version of truncate, i found it simple to symlink
Code: [Select]
ln -s /usr/local/bin/gtruncate /usr/local/bin/truncate

hope that the macports method above works for you.