Git Product home page Git Product logo

Comments (16)

mmikowski avatar mmikowski commented on September 23, 2024

Hi @scriptype

I am almost certain you are using a Mac which uses the BSD tool chain instead of the GNU tool chain like Linux. Bash on Ubuntu 16.10, for example, is version 4.3.46, not 3.2. Version 3 was first released in 2004. Bash 4 was released in 2009, and the scripts rely on version 4 associative array support.

The simplest solution is to run Ubuntu 16.10 Server in a Virtual Box or on an AWS instance. Everything should just work. Another option is to install the GNU tools in Mac and upgrade to Bash 4+.

Now if you're one of those who insist on getting Linux stuff to work on a Mac and want to provide a pull request, I'm open to that. But at present I suggest we update the documentation to include the above information and then close this issue.

from hi_score.

scriptype avatar scriptype commented on September 23, 2024

Yes, I'm using a mac and yes seems like it's 3.x, although I'm not sure the toolchain part. I'm now trying to update it to 4.x via homebrew.

bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
Copyright (C) 2007 Free Software Foundation, Inc.

from hi_score.

scriptype avatar scriptype commented on September 23, 2024

Now I've updated bash to

bash --version
GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin15.4.0)

and I've done some additional stuff to make it default bash like appending the path /usr/local/bin/bash to /etc/shells.

But the problem persists exactly as it was before:

asciicast

I've even changed the first line of prep-libs script to use the new bash's path, as the bash at the path it was pointing still is 3.x. This is the exact change I made (from git diff):

-#!/bin/bash
+#!/usr/local/bin/bash

I'm still unavailable to run the script. Running the whole thing in a VM-like environment isn't a viable option for me (I'm not that much familiar with that stuff). Wouldn't making the script more compatible be a more solid solution?

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

You will want to swap out the BSD utilities for GNU utils too. Here is the link:

https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/

Once you've confirmed that is complete and working, we can update the README.md to include the Mac-specific instructions. I you want to offer a pull request, that would be welcome :)

from hi_score.

scriptype avatar scriptype commented on September 23, 2024

I've installed coreutils and the first group of packages and ignored the last 2 groups of packages mentioned in that post, because I'm using some of them and don't want to touch their version or override them.

And, problem is still there.

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

It looks like the path isn't being set to use the GNU tools since readlink definitely supports an 'f' option in GNU. Have you set the path per this guide?

export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"

If you continue to have trouble, you may try running it on a Linux VM like an AWS instance running Ubuntu 16.10 server with developer tools installed first. Once you see how its supposed to work, then you can port it over to Mac if you want.

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

@scriptype here is almost certainly a fix for your problem: http://stackoverflow.com/a/4031502

  $ brew install coreutils
  $ alias readlink="greadlink"
  $ readlink -f file.txt

I believe the coreutils package also provides a means to ensure the original file names are used. One just needs to ensure that the path is first when using a Linux-like environment.

  $ export PATH="path/to/gnu/utils:$PATH"
  $ readlink -f file.txt

I have updated the README.md to include what we have learned so far (sorry, I don't own a Mac). Please let me know if that works for you and I will update the documentation further

Cheers, Mike

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

You may also try this. Mac comes with a recent Perl installation, and Perl is required for SuperPack, so this may be a valid approach:

# Replace this in hi_score/bin/prep-libs.sh, line 19
LINK_PATH=$( readlink -f -- "${0}" ); 

# With this
readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";}
LINK_PATH=$( readlinkf "${0}" );

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

@scriptype please let me know if any of these suggestions resolve the issue so I may update the documentation and scripts and close this issue :)

from hi_score.

scriptype avatar scriptype commented on September 23, 2024

I lost my interest and didn't try any of the given solutions.

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

Documentation has been updated. Closed for now.

from hi_score.

stevenkasparwork avatar stevenkasparwork commented on September 23, 2024

FYI I had the same issue on a MAC

> [email protected] setup /Users/stevenkaspar/Documents/Personal/Piano App/Code/hi_score
> bin/setup

start setup
  > layout vars
  > main
  >> main / verify env
  !! FAIL: Cannot write to /Users/stevenkaspar/Documents/Personal/Piano App/Code/node_modules/uglifyjs/lib/scope.js.
        Did you forget to run 'npm install' first?

npm ERR! Darwin 14.3.0
npm ERR! argv "/Users/stevenkaspar/.nvm/versions/node/v6.10.1/bin/node" "/Users/stevenkaspar/.nvm/versions/node/v6.10.1/bin/npm" "run" "setup"
npm ERR! node v6.10.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] setup: `bin/setup`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] setup script 'bin/setup'.

I am firing up Ubuntu 16.04 VirtualBox now though :)

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

Thanks @stevenkasparwork. I will update the docs once someone runs the gauntlet. Notice that prep-libs is now replaced by setup in the latest release.

from hi_score.

stevenkasparwork avatar stevenkasparwork commented on September 23, 2024

Yea, I ran it with both

npm run setup

> [email protected] setup /Users/stevenkaspar/Documents/Personal/Piano App/Code/hi_score
> bin/setup

start setup
  > layout vars
  > main
  >> main / verify env
  !! FAIL: Cannot write to /Users/stevenkaspar/Documents/Personal/Piano App/Code/node_modules/uglifyjs/lib/scope.js.
        Did you forget to run 'npm install' first?

npm ERR! Darwin 14.3.0
npm ERR! argv "/Users/stevenkaspar/.nvm/versions/node/v5.0.0/bin/node" "/Users/stevenkaspar/.nvm/versions/node/v5.0.0/bin/npm" "run" "setup"
npm ERR! node v5.0.0
npm ERR! npm  v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] setup: `bin/setup`
npm ERR! Exit status 1

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

This would be a serious issue if we were to deploy production code on Macs. However nobody does that.

from hi_score.

mmikowski avatar mmikowski commented on September 23, 2024

@stevenkasparwork @scriptype FYI, hi_score 1.3 has been released and this issue should be resolved on Mac since most shell scripts have been replaced with the NodeJS xhi tool.

from hi_score.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.