# \[solved\] How to compile pydio cells from github

**URL:** <https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136>\
**Category:** Pydio Cells\
**Created:** [March 8, 2020, 6:03pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136 "2020-03-08T18:03:28Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![gekigek\_99](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/gekigek_99/32/1123_2.png) [@gekigek\_99](https://forum.pydio.com/u/gekigek_99)\
**Post date:** [March 8, 2020, 6:03pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/1 "2020-03-08T18:03:28Z")

</div>

let’s say i made a small tweak in one of the plugins: how can I then compile everything to get my modified executable?

(would it be possible to modify some files after the installation without the need to recompile everything?)

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [March 9, 2020, 7:23am UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/2 "2020-03-09T07:23:10Z")

</div>

Hello @gekigek_99,

To compile I advise you to use the makefile, take a look at the different directives but.  
You will need packr ([https://github.com/gobuffalo/packr](https://github.com/gobuffalo/packr)) to get the interface(webui) built in the binary.  
This command should do the trick.

- `make CELLS_VERSION=x.x.x`

---

<div class="post-metadata">

**Author:** ![gekigek\_99](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/gekigek_99/32/1123_2.png) [@gekigek\_99](https://forum.pydio.com/u/gekigek_99)\
**Post date:** [March 9, 2020, 4:14pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/3 "2020-03-09T16:14:32Z")

</div>

ok thanks a lot!  
but how do i use the packr package you specified?  
do i need to install it? move it somewhere?  
thanks

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [March 9, 2020, 4:33pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/4 "2020-03-09T16:33:55Z")

</div>

It only needs to be on your PATH, (for instance I have my GOBIN in my PATH therefore when I install packr with `go get -u github.com/gobuffalo/packr/packr` it will be in my PATH)

---

<div class="post-metadata">

**Author:** ![gekigek\_99](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/gekigek_99/32/1123_2.png) [@gekigek\_99](https://forum.pydio.com/u/gekigek_99)\
**Post date:** [March 9, 2020, 5:01pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/5 "2020-03-09T17:01:14Z")

</div>

ok thanks a lot 😉  
i’ll try as soon as i can

---

<div class="post-metadata">

**Author:** ![gekigek\_99](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/gekigek_99/32/1123_2.png) [@gekigek\_99](https://forum.pydio.com/u/gekigek_99)\
**Post date:** [March 9, 2020, 5:16pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/6 "2020-03-09T17:16:09Z")

</div>

so, i’m trying but am surely doing something wrong because i put all cells-master folder in:  
~/pydio/cells-master  
and with this command:  
go get -u [github.com/gobuffalo/packr/packr](http://github.com/gobuffalo/packr/packr)  
i have now an executable here:  
~/go/bin/packr

now if i go in this folder ~/pydio/cells-master and run:  
make CELLS\_VERSION=1.0.0  
i get:  
fatal: not a git repository (or any of the parent directories): .git  
rm -f cells cells-\*  
/bin/packr clean  
make: /bin/packr: Command not found  
Makefile:57: recipe for target ‘clean’ failed  
make: \*\*\* [clean] Error 127

sorry but i’m quite new and i cant find any solution on internet since is such a strange problem to explain in few words

[edit]  
ok i copied packr from the directory ~/go/bin/packr to /bin/packr

( [1] is it correct to do so or there is an other more professional way?)

and now it works (for the initial .go files) but after a while it says this:

main.go:99:2: cannot find package “github. com/pydio/cells/broker/activity/actions” in any of:  
/usr/lib/go-1.10/src/github.com/pydio/cells/broker/activity/actions (from $GOROOT)  
/root/go/src/github.com/pydio/cells/broker/activity/actions (from $GOPATH)  
main.go:35:2: cannot find package “github. com/pydio/cells/broker/activity/grpc” in any of:  
/usr/lib/go-1.10/src/github.com/pydio/cells/broker/activity/grpc (from $GOROOT)  
/root/go/src/github.com/pydio/cells/broker/activity/grpc (from $GOPATH)  
main.go:36:2: cannot find package “github. com/pydio/cells/broker/activity/rest” in any of:  
/usr/lib/go-1.10/src/github.com/pydio/cells/broker/activity/rest (from $GOROOT)  
/root/go/src/github.com/pydio/cells/broker/activity/rest (from $GOPATH)  
main.go:37:2: cannot find package “github. com/pydio/cells/broker/chat/grpc” in any of:  
/usr/lib/go-1.10/src/github.com/pydio/cells/broker/chat/grpc (from $GOROOT)  
/root/go/src/github.com/pydio/cells/broker/chat/grpc (from $GOPATH)  
main.go:38:2: cannot find package “github. com/pydio/cells/broker/log/grpc” in any of:  
/usr/lib/go-1.10/src/github.com/pydio/cells/broker/log/grpc (from $GOROOT)  
/root/go/src/github.com/pydio/cells/broker/log/grpc (from $GOPATH)  
main.go:39:2: cannot find package “github. com/pydio/cells/broker/log/rest” in any of:  
/usr/lib/go-1.10/src/github.com/pydio/cells/broker/log/rest (from $GOROOT)  
/root/go/src/github.com/pydio/cells/broker/log/rest (from $GOPATH)

… ecc

Makefile:22: recipe for target ‘main’ failed  
make: \*\*\* [main] Error 1

[2] what should i do to solve this problem?

( [3] and then, other question, where will i be able to find my executable at the end of the compilation?)

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [March 10, 2020, 7:39am UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/7 "2020-03-10T07:39:36Z")

</div>

Are you working inside your $GOPATH, (we are using a vendor but it was the default way),  
`/go/src/github.com/pydio/cells` you should be working in a path similar to this one.

(Also are you sure that your gopath, is set?)  
You can run `go env GOPATH` and see if you have a result, and also `go env GOROOT` to be sure.

for instance:

```auto
➜ cells git:(master) go env GOPATH
/Users/zayn/go
➜ cells git:(master) go env GOROOT
/usr/local/go

```

---

<div class="post-metadata">

**Author:** ![gekigek\_99](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/gekigek_99/32/1123_2.png) [@gekigek\_99](https://forum.pydio.com/u/gekigek_99)\
**Post date:** [March 10, 2020, 12:41pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/8 "2020-03-10T12:41:57Z")

</div>

ok thanks!

command:

```auto
go env GOPATH

```

gives me: /root/go (i am working as root)

```auto
go env GOROOT

```

gives me: /usr/lib/go-1.10

> is that correct?

putting everything in this dir  
`/go/src/github.com/pydio/cells`  
now seems to work better but now it gives me an error at the end.

here is the log:

root@myserver:~/go/src/github.com/pydio/cells# make CELLS\_VERSION=1.0.0  
fatal: not a git repository (or any of the parent directories): .git  
rm -f cells cells-\*  
/bin/packr clean  
`# Removing existing packr files and running packr`  
find . -name \*-packr.go | xargs rm -f  
`# manually filtering out ory/x/dbal package`  
grep -ri -l “packr.NewBox” _/_ | while read -r line; do if ! [ “$line” = “vendor/gne”; /bin/packr --compress --input=. ; cd -; fi; done;  
Run packr for broker/activity/lang/i18n.go  
/root/go/src/github.com/pydio/cells  
Run packr for broker/mailer/lang/bundle.go  
/root/go/src/github.com/pydio/cells  
Run packr for common/service/frontend/http-union\_test.go  
/root/go/src/github.com/pydio/cells  
Run packr for common/sql/index/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for common/sql/resources/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for data/key/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for data/meta/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for data/templates/embedded.go  
/root/go/src/github.com/pydio/cells  
Run packr for data/versions/lang/bundle.go  
/root/go/src/github.com/pydio/cells  
Run packr for discovery/config/lang/bundle.go  
/root/go/src/github.com/pydio/cells  
Run packr for discovery/install/assets/assets.go  
/root/go/src/github.com/pydio/cells  
Run packr for discovery/update/lang/bundle.go  
/root/go/src/github.com/pydio/cells  
Run packr for frontend/front-srv/rest/plugins.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/acl/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/auth/lang/bundle.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/auth/web/resources/init.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/key/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/meta/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/meta/namespace/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/policy/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/policy/lang/bundle.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/role/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/user/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for idm/workspace/sql.go  
/root/go/src/github.com/pydio/cells  
Run packr for scheduler/lang/bundle.go  
/root/go/src/github.com/pydio/cells  
Run packr for vendor/github.com/rubenv/sql-migrate/README.md  
/root/go/src/github.com/pydio/cells  
Run packr for vendor/github.com/rubenv/sql-migrate/doc.go  
/root/go/src/github.com/pydio/cells  
Run packr for vendor/github.com/gobuffalo/packr/README.md  
/root/go/src/github.com/pydio/cells  
go build -a  
` -ldflags "-X github.com/pydio/cells/common.version=1.0.0\ -X github.com/pydio/cells/common.BuildStamp=2020-03-10T12:29:05\ -X github.com/pydio/cells/common.BuildRevision=\ -X github.com/pydio/cells/vendor/github.com/pydio/minio-srv/cmd.Version=\ -X github.com/pydio/cells/vendor/github.com/pydio/minio-srv/cmd.ReleaseTag="\ -o cells\ `

`# github.com/pydio/cells/vendor/github.com/ory/viper`  
vendor/github.com/ory/viper/viper.go:1613:2: undefined: io.StringWriter  
Makefile:22: recipe for target ‘main’ failed  
make: \*\*\* [main] Error 2

> i think i am almost there but i really don’t know what to do to solve this last error

`

> did i solve the packr executable correctly? (is it an acceptable solution to just move it from `~/go/bin/packr` to `/bin/packr`)

`

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [March 10, 2020, 1:16pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/9 "2020-03-10T13:16:26Z")

</div>

> [@gekigek\_99](#):
>
> did i solve the packr executable correctly? (is it an acceptable solution to just move it from `~/go/bin/packr` to `/bin/packr` )

Yes as long as packr is in your $PATH it should be good.

> [@gekigek\_99](#):
>
> i think i am almost there but i really don’t know what to do to solve this last error

weird errors it seems to point that there is an issue with this specific package.

Could you tell me on which branch you are currently working on?

---

<div class="post-metadata">

**Author:** ![gekigek\_99](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/gekigek_99/32/1123_2.png) [@gekigek\_99](https://forum.pydio.com/u/gekigek_99)\
**Post date:** [March 10, 2020, 11:14pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/10 "2020-03-10T23:14:25Z")

</div>

thanks for the fast response!!

i am actually not working on anything, i am just trying to build a clean executable from [https://github.com/pydio/cells](https://github.com/pydio/cells) without modifying anything just to see how to do it and to not add other variables in the “game”.

could that be something related to that “fatal: not a git repository (or any of the parent directories): .git”? because it really doesn’t sound right to me…

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [March 11, 2020, 8:00am UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/11 "2020-03-11T08:00:58Z")

</div>

> [@gekigek\_99](#):
>
> gives me: /usr/lib/go-1.10

Oh yeah I just realised that you had go 1.10, could you tell me if that really is the case? (`go version` will give you the answer), if that is the case then make sure to update go to at least 1.12 or latest.

---

<div class="post-metadata">

**Author:** ![gekigek\_99](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/gekigek_99/32/1123_2.png) [@gekigek\_99](https://forum.pydio.com/u/gekigek_99)\
**Post date:** [March 12, 2020, 12:23am UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/12 "2020-03-12T00:23:58Z")

</div>

go version gives me:  
go version go1.10.4 linux/amd64

which is strange because i installed it just few days ago (probably did something wrong)

anyway… installed go version 1.14 and now it works (seems like a charm for now --\> doesn’t throw any errors so i would assume it works just as the precompiled version right?)  
i got the executable and now it’s time to modify some code!

thanks a lot for all your generous help!!!

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [March 12, 2020, 12:45pm UTC](https://forum.pydio.com/t/solved-how-to-compile-pydio-cells-from-github/3136/13 "2020-03-12T12:45:19Z")

</div>


