gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.87k stars 7.54k forks source link

Azure support breaks Solaris compatibility #6324

Closed fazalmajid closed 7 months ago

fazalmajid commented 5 years ago
local64 ~/go>go get github.com/gohugoio/hugo
# github.com/Azure/azure-storage-blob-go/azblob
src/github.com/Azure/azure-storage-blob-go/azblob/highlevel.go:144:7: undefined: mmf
src/github.com/Azure/azure-storage-blob-go/azblob/highlevel.go:146:12: undefined: newMMF
src/github.com/Azure/azure-storage-blob-go/azblob/highlevel.go:275:13: undefined: newMMF

I have zero interest in Azure, and this is breaking my SmartOS hosted environment. Is there a way to disable Azure support in Hugo at compile time?

bep commented 5 years ago

Is there a way to disable Azure support in Hugo at compile time?

Currently, no. But we should at least make sure to turn it off for unsupported platforms.

You're the first Hugo user on Solaris I've heard of. I thought we had a bug in file watching on Solaris (in fsnotify)

/cc @vangent

https://github.com/Azure/azure-storage-blob-go/blob/8a1deeeabe0a24f918d29630ede0da2a1c8f3b2f/azblob/zc_mmf_unix.go#L12

vangent commented 5 years ago

It looks like the Azure library is working on this already:

fazalmajid commented 5 years ago

@bep Yes, it helps me feel special and unique that way :-)

The fsnotify issue https://github.com/fsnotify/fsnotify/pull/196 is not a problem, I've been running Hugo on SmartOS since I converted over from WP two years ago. Then again I don't use Hugo in watch mode.

Would you be OK if I restructured deploy/deploy.go with build tags so Go Cloud Azure BLOB support isn't built on Solaris? There's no actual code, the Azure support is entirely done as a side-effect of importing the module, just as with database/sql DB-specific drivers, so it could be as simple as adding a deploy/deploy_azure.go that imports the module and has !solaris build tags.

bep commented 5 years ago

@fazalmajid sure, I'll merge that. We can possibly revisit this later at some point.

I have had my share of Solaris (Sun) use myself in my work life, and I liked it a lot.

uniapi commented 3 years ago

He is not the only Solaris user as there are plenty of us!

The same issue:

# github.com/Azure/azure-storage-blob-go/azblob
../../Go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.7.0/azblob/highlevel.go:144:7: undefined: mmf
../../Go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.7.0/azblob/highlevel.go:146:12: undefined: newMMF
../../Go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.7.0/azblob/highlevel.go:275:13: undefined: newMMF

Still not fixed?

jmooring commented 7 months ago

https://github.com/Azure/azure-storage-blob-go/pull/117 was merged on 23 June 2020. Can anyone confirm that this issue is resolved?

fazalmajid commented 7 months ago

I can confirm I can build Hugo@latest on my SmartOS (Illumos) box, using Go 1.20.6. I'm not seeing Azure packages in the log, however, only a bunch of AWS and Google ones.

To be frank, I use build tags to avoid the cloud provider libraries bloat in my Hugo builds, even if I host on AWS CloudFront. I use rclone to push instead and a small custome binary to invalidate the cache.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.