Does not build on solaris/joyent due to dependency on mmap-go #2255

Closed
opened 2025-11-02 04:29:42 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @Seep1959 on GitHub (Aug 26, 2018).

When building, get the following error

# code.gitea.io/gitea/vendor/github.com/edsrzf/mmap-go
vendor/github.com/edsrzf/mmap-go/mmap_unix.go:30:12: undefined: syscall.Mmap
vendor/github.com/edsrzf/mmap-go/mmap_unix.go:46:33: undefined: syscall.SYS_MLOCK
vendor/github.com/edsrzf/mmap-go/mmap_unix.go:54:33: undefined: syscall.SYS_MUNLOCK
vendor/github.com/edsrzf/mmap-go/mmap_unix.go:62:33: undefined: syscall.SYS_MUNMAP
vendor/github.com/edsrzf/mmap-go/msync_unix.go:13:20: undefined: syscall.SYS_MSYNC

Full build output here
https://pastebin.com/PYxC4CKz

  • Gitea version (or commit ref): v1.5.0
  • Operating system: Joyent Zone
    SunOS test02 5.11 joyent_20180510T153535Z i86pc i386 i86pc Solaris
Originally created by @Seep1959 on GitHub (Aug 26, 2018). When building, get the following error ``` # code.gitea.io/gitea/vendor/github.com/edsrzf/mmap-go vendor/github.com/edsrzf/mmap-go/mmap_unix.go:30:12: undefined: syscall.Mmap vendor/github.com/edsrzf/mmap-go/mmap_unix.go:46:33: undefined: syscall.SYS_MLOCK vendor/github.com/edsrzf/mmap-go/mmap_unix.go:54:33: undefined: syscall.SYS_MUNLOCK vendor/github.com/edsrzf/mmap-go/mmap_unix.go:62:33: undefined: syscall.SYS_MUNMAP vendor/github.com/edsrzf/mmap-go/msync_unix.go:13:20: undefined: syscall.SYS_MSYNC ``` Full build output here https://pastebin.com/PYxC4CKz - Gitea version (or commit ref): v1.5.0 - Operating system: Joyent Zone SunOS test02 5.11 joyent_20180510T153535Z i86pc i386 i86pc Solaris
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 04:29:43 -06:00
Author
Owner

@techknowlogick commented on GitHub (Aug 26, 2018):

There is an upstream PR to resolve this: https://github.com/edsrzf/mmap-go/pull/15

@techknowlogick commented on GitHub (Aug 26, 2018): There is an upstream PR to resolve this: https://github.com/edsrzf/mmap-go/pull/15
Author
Owner

@Seep1959 commented on GitHub (Aug 26, 2018):

That PR does not resolve the build errors completely.

[root@test02 ~/go/src/code.gitea.io/gitea]# TAGS="bindata" make generate build
go generate code.gitea.io/gitea code.gitea.io/gitea/cmd code.gitea.io/gitea/models code.gitea.io/gitea/models/migrations code.gitea.io/gitea/modules/auth code.gitea.io/gitea/modules/auth/ldap code.gitea.io/gitea/modules/auth/oauth2 code.gitea.io/gitea/modules/auth/openid code.gitea.io/gitea/modules/auth/pam code.gitea.io/gitea/modules/avatar code.gitea.io/gitea/modules/base code.gitea.io/gitea/modules/cache code.gitea.io/gitea/modules/context code.gitea.io/gitea/modules/cron code.gitea.io/gitea/modules/generate code.gitea.io/gitea/modules/highlight code.gitea.io/gitea/modules/httplib code.gitea.io/gitea/modules/indexer code.gitea.io/gitea/modules/lfs code.gitea.io/gitea/modules/log code.gitea.io/gitea/modules/mailer code.gitea.io/gitea/modules/markup code.gitea.io/gitea/modules/markup/external code.gitea.io/gitea/modules/markup/markdown code.gitea.io/gitea/modules/markup/orgmode code.gitea.io/gitea/modules/minwinsvc code.gitea.io/gitea/modules/notification code.gitea.io/gitea/modules/options code.gitea.io/gitea/modules/private code.gitea.io/gitea/modules/process code.gitea.io/gitea/modules/public code.gitea.io/gitea/modules/search code.gitea.io/gitea/modules/setting code.gitea.io/gitea/modules/ssh code.gitea.io/gitea/modules/sync code.gitea.io/gitea/modules/templates code.gitea.io/gitea/modules/test code.gitea.io/gitea/modules/user code.gitea.io/gitea/modules/util code.gitea.io/gitea/modules/validation code.gitea.io/gitea/routers code.gitea.io/gitea/routers/admin code.gitea.io/gitea/routers/api/v1 code.gitea.io/gitea/routers/api/v1/admin code.gitea.io/gitea/routers/api/v1/convert code.gitea.io/gitea/routers/api/v1/misc code.gitea.io/gitea/routers/api/v1/org code.gitea.io/gitea/routers/api/v1/repo code.gitea.io/gitea/routers/api/v1/swagger code.gitea.io/gitea/routers/api/v1/user code.gitea.io/gitea/routers/api/v1/utils code.gitea.io/gitea/routers/dev code.gitea.io/gitea/routers/org code.gitea.io/gitea/routers/private code.gitea.io/gitea/routers/repo code.gitea.io/gitea/routers/routes code.gitea.io/gitea/routers/user code.gitea.io/gitea/routers/user/setting code.gitea.io/gitea/routers/utils
bindata.go
bindata.go
bindata.go
go build -i -v  -tags 'bindata' -ldflags '-s -w -X "main.Version=1.5.0" -X "main.Tags=bindata"' -o gitea
code.gitea.io/gitea/vendor/github.com/edsrzf/mmap-go
# code.gitea.io/gitea/vendor/github.com/edsrzf/mmap-go
vendor/github.com/edsrzf/mmap-go/mmap_solaris.go:39:9: undefined: unix.Msync
Makefile:243: recipe for target 'gitea' failed
make: *** [gitea] Error 2
@Seep1959 commented on GitHub (Aug 26, 2018): That PR does not resolve the build errors completely. ``` [root@test02 ~/go/src/code.gitea.io/gitea]# TAGS="bindata" make generate build go generate code.gitea.io/gitea code.gitea.io/gitea/cmd code.gitea.io/gitea/models code.gitea.io/gitea/models/migrations code.gitea.io/gitea/modules/auth code.gitea.io/gitea/modules/auth/ldap code.gitea.io/gitea/modules/auth/oauth2 code.gitea.io/gitea/modules/auth/openid code.gitea.io/gitea/modules/auth/pam code.gitea.io/gitea/modules/avatar code.gitea.io/gitea/modules/base code.gitea.io/gitea/modules/cache code.gitea.io/gitea/modules/context code.gitea.io/gitea/modules/cron code.gitea.io/gitea/modules/generate code.gitea.io/gitea/modules/highlight code.gitea.io/gitea/modules/httplib code.gitea.io/gitea/modules/indexer code.gitea.io/gitea/modules/lfs code.gitea.io/gitea/modules/log code.gitea.io/gitea/modules/mailer code.gitea.io/gitea/modules/markup code.gitea.io/gitea/modules/markup/external code.gitea.io/gitea/modules/markup/markdown code.gitea.io/gitea/modules/markup/orgmode code.gitea.io/gitea/modules/minwinsvc code.gitea.io/gitea/modules/notification code.gitea.io/gitea/modules/options code.gitea.io/gitea/modules/private code.gitea.io/gitea/modules/process code.gitea.io/gitea/modules/public code.gitea.io/gitea/modules/search code.gitea.io/gitea/modules/setting code.gitea.io/gitea/modules/ssh code.gitea.io/gitea/modules/sync code.gitea.io/gitea/modules/templates code.gitea.io/gitea/modules/test code.gitea.io/gitea/modules/user code.gitea.io/gitea/modules/util code.gitea.io/gitea/modules/validation code.gitea.io/gitea/routers code.gitea.io/gitea/routers/admin code.gitea.io/gitea/routers/api/v1 code.gitea.io/gitea/routers/api/v1/admin code.gitea.io/gitea/routers/api/v1/convert code.gitea.io/gitea/routers/api/v1/misc code.gitea.io/gitea/routers/api/v1/org code.gitea.io/gitea/routers/api/v1/repo code.gitea.io/gitea/routers/api/v1/swagger code.gitea.io/gitea/routers/api/v1/user code.gitea.io/gitea/routers/api/v1/utils code.gitea.io/gitea/routers/dev code.gitea.io/gitea/routers/org code.gitea.io/gitea/routers/private code.gitea.io/gitea/routers/repo code.gitea.io/gitea/routers/routes code.gitea.io/gitea/routers/user code.gitea.io/gitea/routers/user/setting code.gitea.io/gitea/routers/utils bindata.go bindata.go bindata.go go build -i -v -tags 'bindata' -ldflags '-s -w -X "main.Version=1.5.0" -X "main.Tags=bindata"' -o gitea code.gitea.io/gitea/vendor/github.com/edsrzf/mmap-go # code.gitea.io/gitea/vendor/github.com/edsrzf/mmap-go vendor/github.com/edsrzf/mmap-go/mmap_solaris.go:39:9: undefined: unix.Msync Makefile:243: recipe for target 'gitea' failed make: *** [gitea] Error 2 ```
Author
Owner

@lunny commented on GitHub (Aug 27, 2018):

@Seep1959 this repo is dependent by github.com/couchbase/vellum and github.com/blevesearch/bleve and they cannot be removed. I think you have to open an issue on github.com/edsrzf/mmap-go to report this problem.

@lunny commented on GitHub (Aug 27, 2018): @Seep1959 this repo is dependent by github.com/couchbase/vellum and github.com/blevesearch/bleve and they cannot be removed. I think you have to open an issue on github.com/edsrzf/mmap-go to report this problem.
Author
Owner

@tuxillo commented on GitHub (Aug 27, 2018):

Hi,

I've downloaded the 1.5.0 tarball and it contains a golang/sys checkout (vendor/golang.org/x/sys) which does not have the "Msync" commit for Solaris/Illumos hence it's failing:

# fgrep -rI Msync
syscall_bsd.go://       Msync(addr *byte, len int, flags int) (err error)
syscall_darwin.go:// Msync_nocancel
syscall_dragonfly.go:// Msync_nocancel
syscall_freebsd.go:// Msync_nocancel
syscall_linux.go:// Msync

If you want to keep gitea self-contained I'd updated the golang/sys version there. If not then the "system" one should be picked.

@Seep1959 there is a pkgsrc/WIP gitea package (that I am maintaining for now) which you can use. Currently it is in version 1.4.3 until I manage to update it.

Regards,
Antonio Huete

@tuxillo commented on GitHub (Aug 27, 2018): Hi, I've downloaded the 1.5.0 tarball and it contains a golang/sys checkout (vendor/golang.org/x/sys) which does not have the "Msync" commit for Solaris/Illumos hence it's failing: # fgrep -rI Msync syscall_bsd.go:// Msync(addr *byte, len int, flags int) (err error) syscall_darwin.go:// Msync_nocancel syscall_dragonfly.go:// Msync_nocancel syscall_freebsd.go:// Msync_nocancel syscall_linux.go:// Msync If you want to keep gitea self-contained I'd updated the golang/sys version there. If not then the "system" one should be picked. @Seep1959 there is a pkgsrc/WIP gitea package (that I am maintaining for now) which you can use. Currently it is in version 1.4.3 until I manage to update it. Regards, Antonio Huete
Author
Owner

@tuxillo commented on GitHub (Aug 27, 2018):

@Seep1959 I've pushed an update to wip/gitea in case you want to give it a try.

@tuxillo commented on GitHub (Aug 27, 2018): @Seep1959 I've pushed an update to wip/gitea in case you want to give it a try.
Author
Owner

@Toasterson commented on GitHub (Jan 4, 2019):

@lunny @tuxillo I have looked into the mmap issue with the developer of mmap upstream it is now fixed and there is a Realease Branch v1.0.0 which should be used from now on. Please update the vendored Copy

@Toasterson commented on GitHub (Jan 4, 2019): @lunny @tuxillo I have looked into the mmap issue with the developer of mmap upstream it is now fixed and there is a Realease Branch v1.0.0 which should be used from now on. Please update the vendored Copy
Author
Owner

@tuxillo commented on GitHub (Feb 12, 2019):

@Toasterson indeed it's been fixed, thanks. In any case if you're using SmartOS for example you can use pkgsrc-wip's gitea package. I've just updated it to version 1.7.1.

@tuxillo commented on GitHub (Feb 12, 2019): @Toasterson indeed it's been fixed, thanks. In any case if you're using SmartOS for example you can use pkgsrc-wip's gitea package. I've just updated it to version 1.7.1.
Author
Owner

@tuxillo commented on GitHub (Feb 12, 2019):

@zeripath hmm why close?

@tuxillo commented on GitHub (Feb 12, 2019): @zeripath hmm why close?
Author
Owner

@zeripath commented on GitHub (Feb 12, 2019):

Sorry I thought you were saying it was fixed in Gitea.

@zeripath commented on GitHub (Feb 12, 2019): Sorry I thought you were saying it was fixed in Gitea.
Author
Owner

@stale[bot] commented on GitHub (Apr 13, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Apr 13, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@mrsdizzie commented on GitHub (Sep 8, 2020):

Should be resolved as we have mmap v1.0.2 in dependencies now (comment above suggests it was fixed in v1.0.0)

@mrsdizzie commented on GitHub (Sep 8, 2020): Should be resolved as we have mmap v1.0.2 in dependencies now (comment above suggests it was fixed in v1.0.0)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2255