Author Topic: compiling broken in OS X after commit "e01856b"  (Read 2310 times)

coutts

  • Developer
  • Senior
  • *****
  • Posts: 401
compiling broken in OS X after commit "e01856b"
« 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).

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12198
  • Maintenance mode
Re: compiling broken in OS X after commit "e01856b"
« Reply #1 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)

marekk

  • Senior
  • ****
  • Posts: 331
  • www.oddajmisie.com
Re: compiling broken in OS X after commit "e01856b"
« Reply #2 on: June 19, 2013, 01:01:49 PM »
sudo port install truncate

then in src/Makefile.src replace "@truncate -s 284 $@" with "@truncate $@ 284"

GregoryOfManhattan

  • Member
  • ***
  • Posts: 170
Re: compiling broken in OS X after commit "e01856b"
« Reply #3 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.