SteamedPears / Code-Review

A web app for reviewing code (and other text), written in node.js using redis as the persistent store.
http://review.steamedpears.com
ISC License
1 stars 2 forks source link

Modified startup script and server #126

Closed bheesham closed 11 years ago

bheesham commented 11 years ago
psimonyi commented 11 years ago

It seems this still installs node, npm and redis even in development mode.

bheesham commented 11 years ago

@psimonyi , If you already have the things install, why install them again? You should be using start.sh

alias vim=sudo yum install vim && vim
spratt commented 11 years ago

Outstanding issues for @bheesham:

bheesham commented 11 years ago

Currently it does copy client files.

spratt commented 11 years ago

The problem is that there is no mention of copying client files in the description in the header of bin/install_server.sh

bheesham commented 11 years ago

Ah, okay.

Also, for installation of the server to a home directory. When you install this as root, and run it as another person, would that user not be able to find it? Because root's home dir is different.

spratt commented 11 years ago

Why not reply directly to the comments on the lines of code? It's easier to understand when there's context to what you're saying.

bheesham commented 11 years ago

Because I'm replying directly to your comment.

spratt commented 11 years ago

Okay, in general I agree with you. So why are we installing to a home directory?

psimonyi commented 11 years ago

This will also fix #123.

bheesham commented 11 years ago

Because the user we're installing it as, for sure has the permissions to write files there. On WebFaction (our production server), that's the only place we're allowed to write.

psimonyi commented 11 years ago

Let's discuss the home directory thing on its line.

psimonyi commented 11 years ago

Blocking on the paths in start.sh and the swapfile; the other stuff can be done/discussed later if you want.

psimonyi commented 11 years ago

You should also delete bin/exe/.folder.

psimonyi commented 11 years ago

Perhaps stop_dev.sh should be renamed too. Does it work in production mode?

bheesham commented 11 years ago

It should now be mostly non-blocking. I didn't add TMP=${..., because I don't have permissions to write to compile in/tmp.

THIS WORKS FOR ME IN PRODUCTION ON WEBFACTION.

spratt commented 11 years ago

Looks good. I'm going to pull this down and try it out on my webfaction.

spratt commented 11 years ago

Fantastic. git gives errors pushing to webfaction if I don't have the docs submodule pulled in, but after installing it, it won't upload the docs to webfaction....fine, whatever git. You suck.

bheesham commented 11 years ago

Huh... I never got those errors.

On 12/Apr/13 6:30 PM, Simon David Pratt wrote:

Fantastic. git gives errors pushing to webfaction if I don't have the docs submodule pulled in, but after installing it, it won't upload the docs to webfaction....fine, whatever git. You suck.

— Reply to this email directly or view it on GitHub https://github.com/CarletonU-COMP2406-W2013/Steamed-Pears/pull/126#issuecomment-16321021.

spratt commented 11 years ago

Redis fails to build:

make[3]: Entering directory `/home/sdp/tmp/redis-2.6.12/deps/jemalloc'
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/jemalloc.o src/jemalloc.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/arena.o src/arena.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/atomic.o src/atomic.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/base.o src/base.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bitmap.o src/bitmap.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk.o src/chunk.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_dss.o src/chunk_dss.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_mmap.o src/chunk_mmap.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ckh.o src/ckh.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ctl.o src/ctl.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent.o src/extent.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hash.o src/hash.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/huge.o src/huge.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mb.o src/mb.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex.o src/mutex.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prof.o src/prof.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/quarantine.o src/quarantine.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/rtree.o src/rtree.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/stats.o src/stats.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tcache.o src/tcache.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/util.o src/util.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops  -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.o src/tsd.c
ar crus lib/libjemalloc.a src/jemalloc.o src/arena.o src/atomic.o src/base.o src/bitmap.o src/chunk.o src/chunk_dss.o src/chunk_mmap.o src/ckh.o src/ctl.o src/extent.o src/hash.o src/huge.o src/mb.o src/mutex.o src/prof.o src/quarantine.o src/rtree.o src/stats.o src/tcache.o src/util.o src/tsd.o
make[3]: Leaving directory `/home/sdp/tmp/redis-2.6.12/deps/jemalloc'
make[2]: Leaving directory `/home/sdp/tmp/redis-2.6.12/deps'
    CC adlist.o
    CC ae.o
    CC anet.o
    CC dict.o
    CC redis.o
    CC sds.o
    CC zmalloc.o
    CC lzf_c.o
    CC lzf_d.o
    CC pqsort.o
    CC zipmap.o
    CC sha1.o
    CC ziplist.o
    CC release.o
    CC networking.o
    CC util.o
    CC object.o
    CC db.o
    CC replication.o
    CC rdb.o
    CC t_string.o
    CC t_list.o
    CC t_set.o
    CC t_zset.o
    CC t_hash.o
    CC config.o
    CC aof.o
    CC pubsub.o
    CC multi.o
    CC debug.o
    CC sort.o
    CC intset.o
    CC syncio.o
    CC migrate.o
    CC endianconv.o
    CC slowlog.o
    CC scripting.o
    CC bio.o
    CC rio.o
    CC rand.o
    CC memtest.o
    CC crc64.o
    CC bitops.o
    CC sentinel.o
    LINK redis-server
zmalloc.o: In function `zmalloc_used_memory':
/home/sdp/tmp/redis-2.6.12/src/zmalloc.c:223: undefined reference to `__sync_add_and_fetch_4'
collect2: ld returned 1 exit status
make[1]: *** [redis-server] Error 1
make[1]: Leaving directory `/home/sdp/tmp/redis-2.6.12/src'
make: *** [all] Error 2
cd src && make install
make[1]: Entering directory `/home/sdp/tmp/redis-2.6.12/src'
    LINK redis-server
zmalloc.o: In function `zmalloc_used_memory':
/home/sdp/tmp/redis-2.6.12/src/zmalloc.c:223: undefined reference to `__sync_add_and_fetch_4'
collect2: ld returned 1 exit status
make[1]: *** [redis-server] Error 1
make[1]: Leaving directory `/home/sdp/tmp/redis-2.6.12/src'
make: *** [install] Error 2
- installing redis...
cp: cannot stat `/home/sdp/tmp/redis-2.6.12/src/redis-server': No such file or directory
cp: cannot stat `/home/sdp/tmp/redis-2.6.12/src/redis-cli': No such file or directory
spratt commented 11 years ago

The install script works fine on my mac using clang 4.2, but it won't compile on my webfaction host using gcc 4.1. I have a suspicion that gcc 4.1 is a little out of date.

spratt commented 11 years ago

Bhee, I fixed the issues I mentioned above in a pull request to your master branch.

spratt commented 11 years ago

[blocking] I can't execute the node binary file that we download using this script.

spratt commented 11 years ago

For the record, I found the solution to the redis compile bug from: http://www.eschrade.com/page/undefined-reference-to-__sync_add_and_fetch_4/

spratt commented 11 years ago

uname -m returns an architecture that my mac's version of gcc doesn't support...and the redis build uses gcc in particular at one stage of its build (as opposed to $CC which would use clang).

spratt commented 11 years ago

This now works on the main site. See: http://review.steamedpears.com

spratt commented 11 years ago

@psimonyi you should take a look at this request now. I think a lot of issues have been fixed.

spratt commented 11 years ago

This pull request can't be automatically merged...

bheesham commented 11 years ago

It can now.

spratt commented 11 years ago

Builds nicely on my mac. Fails on the server without -march=i686. Now testing with -march=i686.

spratt commented 11 years ago

Builds successfully on server. I'll do one last review then merge.