Compiling on Mac OS X

About Monkey 2 Forums Monkey 2 Development Compiling on Mac OS X

This topic contains 9 replies, has 4 voices, and was last updated by  abakobo 2 years, 8 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2844

    Danilo
    Participant

    Just got latest sources from github, and module std does not build here:

    [/crayon]

    Ted2 and Launcher also can’t be build then (missing std.a).

    Latest OS X ‘El Capitan’, Version 10.11.6

    #2845

    Simon Armstrong
    Participant

    It sounds like your xcode tools are wrong.

    I would check my steps against readme.txt:

     

     

    and maybe version of your as:

    #2846

    Mark Sibly
    Keymaster

    Actually, the ‘-c’ flag shouldn’t be in there, will remove.

    #2847

    Danilo
    Participant

    Thanks Simon, but still not working.

    Xcode Version 7.3.1 (7D1014)
    Xcode command-line tools Version 7.3.1 (7D1014)

    ‘as’ is there, but it does not understand the ‘-c’ flag.

    ‘ld -v’ output:

    [/crayon]

    ‘as -v’ output:
    Apple Inc version cctools-877.5, GNU assembler version 1.38

    Your ‘ld’ shows LLVM version 7.3.0, mine shows version 3.7.1 –
    looks like a typo and should probably be 7.3.1 😀

    #2848

    Danilo
    Participant

    > Actually, the ‘-c’ flag shouldn’t be in there, will remove.

    Thanks, Mark! Do you have a hint where I need to remove the ‘-c’ flag?
    Can’t compile anything… 🙁

    #3110

    abakobo
    Participant

    just tried to compile v1.03 on osx 10.11.3 with latest xcode and comand line get this error (no -c flag problem anymore

    [/crayon]
    #3153

    Mark Sibly
    Keymaster

    Just a did a ‘download zip’ of monkey2-master and rebuild all worked fine.

    It looks like an EOL conversion problem to me – but this shouldn’t happen on Mac!

    Are you using git to get the project? Can you confirm a zip download/.rebuild instead works?

    #3164

    abakobo
    Participant

    uninstalled xcode and command line tools. downloaded zip master from github, installed command line tools with readme suggested command and still have the same error.
    I’m on a hackintosh(asus laptop but no virtual machine) so it may be that. though it would be the first time I have issues like that with it (MX1 runs perfectly for example). Usualy only drivers problems occur.
    Should I update to 10.11.6? (don’t want to because it can be painfull with a hackintosh).

    #3222

    abakobo
    Participant

    solved the problem by editing the following files:

    jump_x86_64_sysv_macho_gas.S
    make_x86_64_sysv_macho_gas.S
    ontop_x86_64_sysv_macho_gas.S

    “unixed” them with sublime_text_3 view>line_endings>Unix (there’s a osx9 choice too but i chose unix first and it worked)

    don’t know how to manage that in github though, will try on my fork using this manual “https://help.github.com/articles/dealing-with-line-endings/” or other googled sources. any suggestion is appreciated.

    modified files are attached to this post

    #3235

    abakobo
    Participant

    Not all the files in the repo are ending their lines with linefeed (unix/linux/osx). The files in modules/std/fiber/native/asm are all ending lines with CRLF (windows style) (LINCENSE.TXT has the same problem but doesn’t matter for code of course)
    I tried to play with .gitattributes on a branch but I could not force the .S and .asm (or any file with some CR or CRLF in it) to stop having the CR (chr13) at eol. I could force files with LF as eol to be transformed to CRLF though so I don’t understand, must learn more about git/.gitattribute use.

    There probably is a solution with .gitattributes but for now I copied the 3 modified files in in a branch and all compiles ok directly with it when dowloading the zip… it should probably be better if all files in the repo had LF eol as it seems to be the standard with git repos.

    PS: By trying all this I accidentaly deleted the branch with a pull request for ted2 “file>open”, sorry if you received duplicate messages about it.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.