mschwartz / SilkJS

V8 Based JavaScript Swiss Army Knife (and HTTP Server!)
https://github.com/decafjs/decaf
Other
323 stars 37 forks source link

Doesn't compile on 32-bit ubuntu #5

Closed dotnetCarpenter closed 12 years ago

dotnetCarpenter commented 12 years ago

When following the Build Instructions but setting GYP_GENERATORS=make make x32.release for 32-bit, the make fails with /usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file or directory compilation terminated. make: *** [main.o] Error 1

dotnetCarpenter commented 12 years ago

On Ubuntu 11.04 changing 64 to 32 in the Makefile will output g++ -O6 -fomit-frame-pointer -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-rtti -fno-exceptions -fvisibility=hidden -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -m32 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fno-strict-aliasing -o silkjs main.o base32.o global.o console.o process.o net.o fs.o buffer.o mysql.o http.o gd.o ncurses.o sem.o logfile.o v8.o md5.o -L../v8-read-only/out/x32.release/obj.target/tools/gyp/ -lv8_base -lv8_snapshot -L/usr/local/lib/mysql -lmysqlclient -lmm -lgd -lncurses -lssl -lpthread g++: base32.o: No such file or directory make: *** [silkjs] Error 1

dotnetCarpenter commented 12 years ago

Changing the Makefile to: OBJ= main.o base64.o global.o console.o process.o net.o fs.o buffer.o mysql.o http.o gd.o ncurses.o sem.o logfile.o v8.o md5.o

CFLAGS = -O6 -fomit-frame-pointer -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-rtti -fno-exceptions -fvisibility=hidden -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -m32 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fno-strict-aliasing

%.o: %.cpp SilkJS.h Makefile g++ $(CFLAGS) -c -I../v8-read-only/include -I/usr/include/mysql -g -o $.o $.cpp

silkjs: $(OBJ) SilkJS.h Makefile g++ $(CFLAGS) -o silkjs $(OBJ) -L../v8-read-only/out/ia32.release/obj.target/tools/gyp/ -lv8_base -lv8_snapshot -L/usr/local/lib/mysql -lmysqlclient -lmm -lgd -lncurses -lssl -lpthread ... rest is removed for breveity

seems to make a correct build. But I still haven't been able to get the httpd thingy to work though.

mschwartz commented 12 years ago

I think it's ia32.release :)

On Wed, Dec 14, 2011 at 9:12 AM, Jon Ege Ronnenberg < reply@reply.github.com

wrote:

When following the Build Instructions but setting GYP_GENERATORS=make make x32.release for 32-bit, the make fails with /usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file or directory compilation terminated. make: *** [main.o] Error 1


Reply to this email directly or view it on GitHub: https://github.com/mschwartz/SilkJS/issues/5

mschwartz commented 12 years ago

Aside from the ia32.release, you'll have to edit the Makefile and change -m64 to -m32 in a couple of places. I've received a few emails from people saying they've built it on 32 bit systems, and I've built it myself on a 32 bit system.

On Dec 14, 2011, at 9:12 AM, Jon Ege Ronnenberg wrote:

When following the Build Instructions but setting GYP_GENERATORS=make make x32.release for 32-bit, the make fails with /usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file or directory compilation terminated. make: *** [main.o] Error 1


Reply to this email directly or view it on GitHub: https://github.com/mschwartz/SilkJS/issues/5

dotnetCarpenter commented 12 years ago

When running ab -t 30 -c 50 -k http://localhost:9090/anchor.png in the httpd folder I get

apr_socket_recv: Connection refused (111)

ok, this is getting rather lengthy but it might serve as a tutorial on how to get SilkJS to run on a 32-bit system.

dotnetCarpenter commented 12 years ago

Hi Michael.

I didn't see your replies until now. It look like SilkJS is build on my machine but I can't get it to start the http server. Can you point me to any resource that could help me?

Cheers, Jon

mschwartz commented 12 years ago

from the SilkJS directory:

./silkjs httpd/main.js

It should print something like "started with 250 processes"

If you can't get the WWW page to open, try http://127.0.0.1:9090/ instead

What operating system are you building this on?

On Dec 14, 2011, at 12:04 PM, Jon Ege Ronnenberg wrote:

Hi Michael.

I didn't see your replies until now. It look like SilkJS is build on my machine but I can't get it to start the http server. Can you point me to any resource that could help me?

Cheers, Jon


Reply to this email directly or view it on GitHub: https://github.com/mschwartz/SilkJS/issues/5#issuecomment-3148086

mschwartz commented 12 years ago

Also, if you want to do the ab tests:

ab -t 30 -k -c 50 http://127.0.0.1:9090/anchor.png

The localhost thing has to do with your /etc/hosts file being set up for IPv6, so I'm told.

My MacBook has the same problem :)

On Dec 14, 2011, at 12:04 PM, Jon Ege Ronnenberg wrote:

Hi Michael.

I didn't see your replies until now. It look like SilkJS is build on my machine but I can't get it to start the http server. Can you point me to any resource that could help me?

Cheers, Jon


Reply to this email directly or view it on GitHub: https://github.com/mschwartz/SilkJS/issues/5#issuecomment-3148086