You are not logged in.

#1 2018-02-13 23:42:25

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Attempting to install Mastodon

The Mastodon packages in the AUR are badly out of date and so I'm attempting to install Mastodon following their apt-based instructions. But I'm not having too much luck.

Anybody trying the same thing, and we compare notes?

Current problem:

bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test

fails apparently because gem cld3 reports:

Failed to locate protobuf

The apt-based instructions talk about installing packages

libprotobuf-dev protobuf-compiler

which do not seem to exist in the same form on Arch. The closest I find are:

pacman -Ss protobuf
extra/protobuf 3.5.1.1-1 [installed]
    Protocol Buffers - Google's data interchange format
extra/protobuf-c 1.3.0-2 [installed]
    Protocol Buffers implementation in C
extra/python-protobuf 3.5.1.1-1
    Python 3 bindings for Google Protocol Buffers
extra/python2-protobuf 3.5.1.1-1
    Python 2 bindings for Google Protocol Buffers

Given this is Ruby, I ignore the python ones and install the others, but no luck. I'm not a Ruby person, so I don't quite know what exactly it is looking for, and where.

Ideas?

Offline

#2 2018-02-14 00:14:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: Attempting to install Mastodon

jernst wrote:

The Mastodon packages in the AUR are badly out of date

Which ones?  The one named just 'mastadon' is flagged out of date, but more importantly than that is it just a completely broken (totally incomplete) PKGBUILD.  It could never do anything at all.

But there is a 'mastadon-git' - a git PKGBUILD can't really be out of date.  It *might* fail, but if that's the case you should report the errors.

Starting with a debian package is probably not the right approach.

EDIT: nevermind the 'mastadon-git' note.  That PKGBUILD is also a complete shit show.  The submitter of both of those "packages" is deliberately littering the AUR with PKGBUILDs that he knows full well don't work.  That's ridiculous.  But the problem isn't that they are "out of date", it doesn't look like they were ever working.

Last edited by Trilby (2018-02-14 00:17:59)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-02-14 00:23:15

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Re: Attempting to install Mastodon

The mastodon-git PKGBUILD fails during build():

rails aborted!
Devise.secret_key was not set. Please add the following to your Devise initializer:

  config.secret_key = 'd3eaca194604409a4da0db38c4bc987d53c0c5efba8ed2bde97e9fabf0fd4458ef5713d08f4035f8d77c9de81e71243932d8028e4c8b7d7cc66dc671407b2cbe'

Please ensure you restarted your application after installing Devise or setting the key.

I can't tell whether this is something that's inherently wrong with the PKGBUILD, or that dependent packages work differently (would be my guess) or the fact that Mastodon is now at version 2.2, and those PKGBUILDs seem to assume version 1.2.2.

Offline

#4 2018-02-14 00:29:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: Attempting to install Mastodon

jernst wrote:

I can't tell whether this is something that's inherently wrong with the PKGBUILD

Given the state of the author's PKGBUILDs, this would not at all surprise me.  However ...

jernst wrote:

...the fact that Mastodon is now at version 2.2, and those PKGBUILDs seem to assume version 1.2.2.

That doesn't make any sense.  The PKGBUILD makes no such assumption: it pulls the most recent development code from git.  The pkgver shown on the aur web interface for -git packages is meangless, that is not the version that makepkg attempts to build: it always builds from the most recent git code.

As for the error you quoted, it's a bit out of context, but seems pretty self explanatory.  I've never even touched 'rails' before, but a web search for 'rails Devise' led to immediate results that suggested how to fix this error.

Last edited by Trilby (2018-02-14 00:32:33)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2018-02-14 00:59:28

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Re: Attempting to install Mastodon

I understand that it pulls the latest, but Mastodon has been moving fast and what worked for a 1.2 version (if it ever did) may well not work for a 2.2. Which is why I attempted to first reproduce the upstream build instructions... and I note that they do not mention anything about Devise, so attempting to make Devise work by adding that setting sounded like a dead end to me.

I guess I'll try a combination of upstream instructions and the existing PKGBUILD next and see whether I can muddle through...

Offline

#6 2018-02-21 01:47:48

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Re: Attempting to install Mastodon

It turns out that if I run an identical bash script on the command-line (as opposed to from PKGBUILD), the above error does not occur.

The commands are the same. The computer is the same. The user is the same. The environment variables are the same (I unset a bunch of apparently pacman-set ones like CFLAGS and CHOST which I found by diff'ing the output of printenv). The sources are the same (diff -r).

Script that works:

git clone https://github.com/tootsuite/mastodon.git
cd mastodon/
bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test
yarn install --pure-lockfile

Relevant parts from PKGBUILD that does not work:

source=("git+https://github.com/tootsuite/mastodon.git")

build() {
    cd ${srcdir}/${pkgname}

    export -n CFLAGS
    export -n CHOST
    export -n COMMAND_MODE
    export -n CPPFLAGS
    export -n CXXFLAGS
    export -n LDFLAGS
    export -n TEXTDOMAIN
    export -n TEXTDOMAINDIR

    bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test
    yarn install --pure-lockfile   # <= error occurs here
}

I'm running out of ideas what could account for the difference in behavior.

Offline

Board footer

Powered by FluxBB