Closed xet7 closed 6 years ago
From @kentonv on February 11, 2018 6:18
It appears as if Sandstorm isn't installed inside the Vagrant image, which is weird. Maybe there's some more initialization that needs to be done by vagrant-spk? TBH I have never used vagrant-spk so I don't really know. Maybe @dwrensha (who created the Wordpress package) has an idea.
From @dwrensha on February 11, 2018 14:3
~Yeah I probably forgot to include the Sandstorm capnp files in the vagrant-spk build: https://github.com/dwrensha/wordpress-sandstorm/commit/17d397180e48282fe37d432aa8c9eb4d2786f4c8~
EDIT: hm. Those sandstorm files really should be there. When I do vagrant-spk up
and vagrant-spk ssh
, I see them in /opt/sandstorm/
From @dwrensha on February 11, 2018 14:31
When I try to build https://github.com/dwrensha/wordpress-sandstorm, it looks like I get farther than you did, but I still hit an error:
(cd sandstorm && make CXX=g++)
make[1]: Entering directory '/opt/app/sandstorm'
mkdir -p tmp
capnp compile --src-prefix=/opt/sandstorm/latest/usr/include -oc++:tmp /opt/sandstorm/latest/usr/include/sandstorm/*.capnp
*** Uncaught exception ***
kj/filesystem-disk-unix.c++:469: failed: mmap: Invalid argument
stack: 0x405b42 0x43a40e 0x43af2c 0x7f7d19cb38c5 0x7f7d19cb52c6
c++: plugin failed: exit code 1
Makefile:21: recipe for target 'tmp/genfiles' failed
I conjecture that this has to do with the fact that the /vagrant
directory is synced between the host and guest.
From @kentonv on February 11, 2018 21:33
Ugh, apparently shared folders don't implement writable mmap(). I'm surprised they can get away with that. I guess maybe the capnp C++ output plugin needs to go back to using write(). Sad.
This is the PR they used to fix their Vagrant 1.9.6 downloading the sandstorm version of the box: github.com/sandstorm-io/vagrant-spk/pull/209
Got that from @ocdtrekkie . I did change previously to probably broken box version.
From @JamborJan on March 6, 2018 19:38
Hi guys,
I have updated my fork of wordpress for Sandstorm (see https://github.com/JamborJan/wordpress-sandstorm/commit/cb93151f8b0901b6db1eb85aec7dbc28e230a4ef). Now I'm running into a different error:
(cd sandstorm && make CXX=g++)
make[1]: Entering directory '/opt/app/sandstorm'
generating capnp files...
/opt/sandstorm/latest/usr/include/sandstorm/payments.capnp:21:14-37: error: Import failed: /sandstorm/util.capnp
/opt/sandstorm/latest/usr/include/sandstorm/payments.capnp:28:29-42: error: Not defined: LocalizedText
/opt/sandstorm/latest/usr/include/sandstorm/payments.capnp:65:25-38: error: Not defined: LocalizedText
/opt/sandstorm/latest/usr/include/sandstorm/payments.capnp:73:17-30: error: Not defined: LocalizedText
/opt/sandstorm/latest/usr/include/sandstorm/payments.capnp:22:14-43: error: Import failed: /sandstorm/supervisor.capnp
/opt/sandstorm/latest/usr/include/sandstorm/payments.capnp:87:58-74: error: Not defined: SystemPersistent
/opt/sandstorm/latest/usr/include/sandstorm/payments.capnp:88:62-78: error: Not defined: SystemPersistent
/opt/sandstorm/latest/usr/include/sandstorm/payments.capnp:89:46-62: error: Not defined: SystemPersistent
Makefile:21: recipe for target 'tmp/genfiles' failed
make[1]: *** [tmp/genfiles] Error 1
make[1]: Leaving directory '/opt/app/sandstorm'
Makefile:26: recipe for target 'sandstorm/bin/getPublicId' failed
make: *** [sandstorm/bin/getPublicId] Error 2
I was not able yet to dig a bit deeper into these error messages but will do so as soon as possible. I wanted to leave a note here just in case someone of you can easily help or solve this.
PS: @xet7 as soon as we have figured out how we deal with the app key I will contribute to your repo. Until then I use my fork for testing reasons. Otherwise I would not be able to build packages and test them.
Thanks
From @ocdtrekkie on March 6, 2018 19:44
@JamborJan payments.capnp is a weird thing to show up here. I know that @kentonv just merged that back into Sandstorm proper, so it's possible something's missing there, and it's never been an issue with building before for that reason: https://github.com/sandstorm-io/sandstorm/pull/3042
@JamborJan
No problem, a moment ago I did fetch and merge changes from your repo to this repo, and also add some more modifications for php5 to php7. I will look at app key when bulding wp-sandstorm works, and there is something worth releasing.
From @JamborJan on March 7, 2018 8:3
@xet7
You also took my sandstorm-pkgdef.capnp. I can send you my private app key (over another secure channel) so that you are able tu build packages. If this is okay for you, I would be able to delete my fork and use yours instead.
@JamborJan
Yes it's OK. You can install desktop or mobile client of https://about.riot.im so we can enable end-to-end encryption, my Riot nickname is xet7wekan
Hey @ocdtrekkie, did I get your comment right and the payments.capnp will be analysed or is there something I need to do because I did something wrong when I tried to build the Wordpress app?
I am just suspecting it's a new problem cause by the fact that payments.capnp is new to the Sandstorm repo. Kenton should be around this weekend and can probably explain why it's showing up as an error.
It looks like there's a bug in the makefile:
capnp compile --src-prefix=/opt/sandstorm/latest/usr/include -oc++:tmp /opt/sandstorm/latest/usr/include/sandstorm/*.capnp
This line is missing an argument:
-I/opt/sandstorm/latest/usr/include
It fails on payments.capnp because that file contains absolute imports rather than relative, which is vestigial since it used to live in Blackrock rather than Sandstorm. I will change it to use relative imports in today's release, but it may also make sense to fix the Wordpress app's Makefile.
With latest changes in git I have this progress, after installing vagrant:
git clone git@github.com:wpsandstorm/wordpress-sandstorm.git
cd wordpress-sandstorm
./build-spk-in-vagrant.sh
Then inside VirtualBox VM window, where is username: vagrant password: vagrant
sudo apt install task-lxde-desktop
startx
Then on Firefox ESR http://local.sandstorm.io:6080
I guess it's about the new PHP7 version according to the error log. I tried to run and enter a grain to figure out what is wrong but I ran into another issue (see https://github.com/sandstorm-io/vagrant-spk/issues/213).
I've realised that there are some php config files in the repo. There is one line which seems to be wrong for PHP7, but it seems these config files are not used at all.
@xet7 I guess you added this symlink to solve the issue, which didn't work out. Right?
...** SANDSTORM SUPERVISOR: Starting up grain. Sandbox type: userns
[12-Mar-2018 06:48:59] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[12-Mar-2018 06:48:59] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[12-Mar-2018 06:48:59] ERROR: unable to bind listening socket for address '/run/php/php7.0-fpm.sock': No such file or directory (2)
[12-Mar-2018 06:48:59] ERROR: FPM initialization failed
started php-fpm. status code: 70
started nginx. status code: 0
@JamborJan
Yes, it did not work, it caused error about symlink to symlink, or something like that.
@JamborJan
I removed that symlink from repo.
We are able to build the app again. For details see https://github.com/wpsandstorm/wordpress-sandstorm/commit/fec80241dd53a8e70074b2706835e1bdbaeb62d9
Is there anything left we need to clean up or can we close this issue @xet7 ?
I am super excited that progress has been made here!
From @xet7 on February 7, 2018 21:41
@kentonv
When I try to build wordpress-sandstorm .spk file in vagrant with this script: https://github.com/wekan/wordpress-sandstorm/blob/master/build-spk-in-vagrant.sh
I get this error when building capnp. How can this be fixed?
BR, xet7
Copied from original issue: wekan/wordpress-sandstorm#1