Opa won't compile hello_web.opa

2019-08-13 17:48发布

I'm following the http://blog.opalang.org/2011/06/first-steps-hello-web-in-opa.html, so the code is simply:

server = Server.one_page_server("Hello", ( -> <>Hello web</>))

saved to hello.opa, then I try to compile:

me@myhost:~/src/opa/helloweb$ opa hello.opa 
sh: as: not found
File "bsl_init_.ml", line 1, characters 0-1:
Error: Assembler error, input left in file /tmp/camlasm313d73.s
make: *** [bsl_init_.cmx] Error 2
error during ocaml compilation -- the command was :
make --makefile=MakefileLinking -W MakefileLinking -j 7 cmxa -s

Hopefully I've made an obvious mistake, but I didn't come with any hits after searching on the error message. I am using an Ubuntu 64bit distro on EC2. I installed the .deb with dpkg after fulfilling the dependencies.

Any assistance would be appreciated because I'd very much like to play around with opa.

标签: opa
2条回答
Animai°情兽
2楼-- · 2019-08-13 18:14

I've just tried on a EC2 Large, with a fresh Ubuntu 11.04, installing :

sudo apt-get install libgomp1 binutils libc-dev-bin linux-libc-dev gcc-4.5 libc6-dev libgif4 zlib1g-dev libssl-dev gcc libgdbm-dev

Then

sudo dpkg -i opa_1.0s3.5+build520_amd64.stable.deb 

and

opa hello.opa

And it works. Can you please share more information about the ubuntu or the AMI id you used?

Best,

Cédric

查看更多
放我归山
3楼-- · 2019-08-13 18:18

Maybe you need to install libgdbm-dev package. I have a similar error when I try to compile the first example.

Good luck.

查看更多
登录 后发表回答