Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make failed macos sierra #7261

Closed
hanselke opened this issue Aug 20, 2017 · 8 comments
Closed

make failed macos sierra #7261

hanselke opened this issue Aug 20, 2017 · 8 comments

Comments

@hanselke
Copy link

Summary

make fails after following developer setup instructuctions

Steps to reproduce

How can we reproduce the issue (what version are you using?)
20aug2017 pulled from master.

Observed behavior (that appears unintentional)

make ℹ info Invoking all target
make ℹ info Invoking run target
make ℹ info Invoking run-server target
make ℹ info Invoking prepare-enterprise target
sh: @echo: command not found
sh: line 2: BUILD_ENTERPRISE_DIR: command not found
cp: /imports/imports.go: No such file or directory
sh: line 4: BUILD_ENTERPRISE_DIR: command not found
make ℹ info Invoking start-docker target
sh: @echo: command not found
sh: -c: line 1: syntax error near unexpected token then' sh: -c: line 1: @if [ $(shell docker ps -a | grep -ci mattermost-mysql) -eq 0 ]; then '
make ✖ ERR @echo Starting docker containers
@if [ $(shell docker ps -a | grep -ci mattermost-mysql) -eq 0 ]; then
echo starting mattermost-mysql;
docker run --name mattermost-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mostest
-e MYSQL_USER=mmuser -e MYSQL_PASSWORD=mostest -e MYSQL_DATABASE=mattermost_test -d mysql:5.7 > /dev/null;
elif [ $(shell docker ps | grep -ci mattermost-mysql) -eq 0 ]; then
echo restarting mattermost-mysql;
docker start mattermost-mysql > /dev/null;
fi
@if [ $(shell docker ps -a | grep -ci mattermost-postgres) -eq 0 ]; then
echo starting mattermost-postgres;
docker run --name mattermost-postgres -p 5432:5432 -e POSTGRES_USER=mmuser -e POSTGRES_PASSWORD=mostest
-d postgres:9.4 > /dev/null;
elif [ $(shell docker ps | grep -ci mattermost-postgres) -eq 0 ]; then
echo restarting mattermost-postgres;
docker start mattermost-postgres > /dev/null;
fi
@if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 0 ]; then
echo starting mattermost-inbucket;
docker run --name mattermost-inbucket -p 9000:10080 -p 2500:10025 -d jhillyerd/inbucket:latest > /dev/null;
elif [ $(shell docker ps | grep -ci mattermost-inbucket) -eq 0 ]; then
echo restarting mattermost-inbucket;
docker start mattermost-inbucket > /dev/null;
fi
@echo Ldap test user test.one
@if [ $(shell docker ps -a | grep -ci mattermost-openldap) -eq 0 ]; then
echo starting mattermost-openldap;
docker run --name mattermost-openldap -p 389:389 -p 636:636
-e LDAP_TLS_VERIFY_CLIENT="never"
-e LDAP_ORGANISATION="Mattermost Test"
-e LDAP_DOMAIN="mm.test.com"
-e LDAP_ADMIN_PASSWORD="mostest"
-d osixia/openldap:1.1.6 > /dev/null;
sleep 10;
docker exec -ti mattermost-openldap bash -c 'echo -e "dn: ou=testusers,dc=mm,dc=test,dc=com\nobjectclass: organizationalunit" | ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';
docker exec -ti mattermost-openldap bash -c 'echo -e "dn: uid=test.one,ou=testusers,dc=mm,dc=test,dc=com\nobjectclass: iNetOrgPerson\nsn: User\ncn: Test1\nmail: success+testone@simulator.amazonses.com" | ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';
docker exec -ti mattermost-openldap bash -c 'ldappasswd -s Password1 -D "cn=admin,dc=mm,dc=test,dc=com" -x "uid=test.one,ou=testusers,dc=mm,dc=test,dc=com" -w mostest';
docker exec -ti mattermost-openldap bash -c 'echo -e "dn: uid=test.two,ou=testusers,dc=mm,dc=test,dc=com\nobjectclass: iNetOrgPerson\nsn: User\ncn: Test2\nmail: success+testtwo@simulator.amazonses.com" | ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';
docker exec -ti mattermost-openldap bash -c 'ldappasswd -s Password1 -D "cn=admin,dc=mm,dc=test,dc=com" -x "uid=test.two,ou=testusers,dc=mm,dc=test,dc=com" -w mostest';
docker exec -ti mattermost-openldap bash -c 'echo -e "dn: cn=tgroup,ou=testusers,dc=mm,dc=test,dc=com\nobjectclass: groupOfUniqueNames\nuniqueMember: uid=test.one,ou=testusers,dc=mm,dc=test,dc=com" | ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';
elif [ $(shell docker ps | grep -ci mattermost-openldap) -eq 0 ]; then
echo restarting mattermost-openldap;
docker start mattermost-openldap > /dev/null;
sleep 10;
fi
@if [ $(shell docker ps -a | grep -ci mattermost-elasticsearch) -eq 0 ]; then
echo starting mattermost-elasticsearch;
docker run --name mattermost-elasticsearch -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "ES_JAVA_OPTS=-Xms250m -Xmx250m" -d grundleborg/elasticsearch:latest > /dev/null;
elif [ $(shell docker ps | grep -ci mattermost-elasticsearch) -eq 0 ]; then
echo restarting mattermost-elasticsearch;
docker start mattermost-elasticsearch> /dev/null;
fi
@if [ $(shell docker ps -a | grep -ci mattermost-redis) -eq 0 ]; then
echo starting mattermost-redis;
docker run --name mattermost-redis -p 6379:6379 -d redis > /dev/null;
elif [ $(shell docker ps | grep -ci mattermost-redis) -eq 0 ]; then
echo restarting mattermost-redis;
docker start mattermost-redis > /dev/null;
fi
make ℹ info Invoking run-client target
make ✖ ERR Recipe exited with code %d
sh: @echo: command not found
sh: line 1: BUILD_WEBAPP_DIR: command not found
(node:16164) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Recipe exited with code %d
sh: line 1: MAKE: command not found
sh: line 1: run: command not found
make ✖ ERR @echo Running mattermost client for development
cd $(BUILD_WEBAPP_DIR) && $(MAKE) run

Possible fixes

If you can, link to the line of code that might be responsible for the problem

@lindy65
Copy link
Contributor

lindy65 commented Aug 20, 2017

Hi @hanselke

Thank you for your feedback,

Could you tell me what version of OS Sierra you're using? We've also had this report which seems to be an issue similar to yours and we're just wondering whether it might have something to do with the Sierra version.

@hanselke
Copy link
Author

hanselke commented Aug 21, 2017 via email

@lindy65
Copy link
Contributor

lindy65 commented Aug 22, 2017

Thanks @hanselke

I've asked our devs for feedback and will post back here when I've heard from them...

@MusikPolice
Copy link
Contributor

@hanselke are you sure that you've run through all of the developer setup steps, checked everything out, and that you're running make from the correct directory? It looks to me like your dev machine is missing some prerequisite that the makefile depends on

@hmhealey
Copy link
Member

Also, the @echo command is part of the Makefile. An @ can be added to any line in a Makefile to stop it from printing the line itself. For example, having the Makefile run echo test outputs

echo test
test

while running @echo test just outputs

test

That's very odd that it's trying to run @echo in the shell though

@moonmeister
Copy link
Contributor

moonmeister commented Aug 22, 2017

I've done quite a lot of development on Sierra (10.12.6) without issue. Make sure you've followed the instructions at https://docs.mattermost.com/developer/dev-setup-osx.html. My only question would be, are you doing anything "non-standard" on your mac? Are you using a non-standard shell terminal, or anything else? If you are try using the normal shell, etc...

@hanselke
Copy link
Author

hanselke commented Aug 26, 2017 via email

@lindy65
Copy link
Contributor

lindy65 commented Aug 26, 2017

Thanks @hanselke,

I'll close the issue off for now then. Please feel free to reopen it, if required, in future.

@lindy65 lindy65 closed this as completed Aug 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants