Function not implemented — hugo_build.loc

I have a hugo installation on an Android device running Termux. It’s been working great until recently when I started seeing

hugo
Start building sites …
hugo v0.92.1+extended android/arm64 BuildDate=unknown
Error: Error building site: failed to acquire a build lock: Lock /data/data/com.termux/files/home/storage/shared/hugo/<site>/.hugo_build.lock: function not implemented
Total in 353 ms

I was using the latest Hugo binary from the Termux repositories.

I downloaded the source and built:

hugo v0.93.0-DEV+extended android/arm64 BuildDate=unknown

but ended up with the same result.

I’m not sure whether the problem is Termux, Android or Hugo related.

Edit: After posting I wondered whether it was a softlink to the shared directory that was the problem. CDing to the true path made no difference.

See https://github.com/gohugoio/hugo/issues/9461

I don’t see any workaround other than downgrading to a Hugo version before we introduced – I will investigate this. We’re using the same file locking library used in Go, but perhaps we need to disable that on certain platforms.

Thanks. I’ll revert to a previous version in the meanwhile.

noBuildLock flag was added since v0.100.0.
It might help to resolve this issue.

I can confirm, the noBuildLock flag allows Hugo to run in Termux on my Android 12 device. Great stuff.

2 Likes

Had you find workaround?

hugo --noBuildLock ...
1 Like

A post was split to a new topic: Error: failed to acquire build lock