Coder Social home page Coder Social logo

Comments (5)

jmattheis avatar jmattheis commented on May 28, 2024

Golang currently doesn't allow loading the same plugin twice with different names golang/go#47298

Your required functionality could be included as a feature request in the gotify-mqtt project or you could build the plugin with a different package path yourself.

$ git clone https://github.com/tystuyfzand/gotify-mqtt.git
$ cd gotify-mqtt
$ sed -i 's|gotify-mqtt|gotify-mqtt-copy|' go.mod plugin.go
$ make GOTIFY_VERSION="v2.4.0" FILE_SUFFIX="for-gotify-v2.4.0" build-linux-amd64

and then move the build/mqtt-linux-amd64for-gotify-v2.4.0.so file into your plugin directory.

from server.

mStirner avatar mStirner commented on May 28, 2024

Have opend a issue on the plugin, but i think this also get ignored like my other question.
I think the only solution i have is the one you provided.

But i ran in to the following error while building the plugin:

make GOTIFY_VERSION="v2.4.0" FILE_SUFFIX="for-gotify-v2.4.0" build-linux-amd64
mkdir -p ./build || true
rm ./build/gotify-server-go-version || true
wget -O ./build/gotify-server-go-version https://raw.githubusercontent.com/gotify/server/v2.4.0/GO_VERSION
--2024-01-09 11:34:34--  https://raw.githubusercontent.com/gotify/server/v2.4.0/GO_VERSION
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 7 [text/plain]
Wird in »./build/gotify-server-go-version« gespeichert.

./build/gotify-server-go-version                   100%[================================================================================================================>]       7  --.-KB/s    in 0s      

2024-01-09 11:34:34 (147 KB/s) - »./build/gotify-server-go-version« gespeichert [7/7]

go install github.com/gotify/plugin-api/cmd/gomod-cap@latest
wget -O ./build/gotify-server.mod https://raw.githubusercontent.com/gotify/server/v2.4.0/go.mod
--2024-01-09 11:34:34--  https://raw.githubusercontent.com/gotify/server/v2.4.0/go.mod
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 2165 (2,1K) [text/plain]
Wird in »./build/gotify-server.mod« gespeichert.

./build/gotify-server.mod                          100%[================================================================================================================>]   2,11K  --.-KB/s    in 0s      

2024-01-09 11:34:34 (16,8 MB/s) - »./build/gotify-server.mod« gespeichert [2165/2165]

gomod-cap -from ./build/gotify-server.mod -to go.mod
make: gomod-cap: Command not found
Makefile:18: recipe for target 'update-go-mod' failed
make: *** [update-go-mod] Error 127

from server.

jmattheis avatar jmattheis commented on May 28, 2024

Try running make download-tools before the other make command.

from server.

mStirner avatar mStirner commented on May 28, 2024

Unfortunately, same error:

marc@stirner:~/projects/playground/gotify-mqtt$ make download-tools
go install github.com/gotify/plugin-api/cmd/gomod-cap@latest
marc@stirner:~/projects/playground/gotify-mqtt$ make GOTIFY_VERSION="v2.4.0" FILE_SUFFIX="for-gotify-v2.4.0" build-linux-amd64
mkdir -p ./build || true
rm ./build/gotify-server-go-version || true
wget -O ./build/gotify-server-go-version https://raw.githubusercontent.com/gotify/server/v2.4.0/GO_VERSION
--2024-01-09 12:50:20--  https://raw.githubusercontent.com/gotify/server/v2.4.0/GO_VERSION
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.110.133, 185.199.111.133, 185.199.108.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 7 [text/plain]
Wird in »./build/gotify-server-go-version« gespeichert.

./build/gotify-server-go-version                   100%[================================================================================================================>]       7  --.-KB/s    in 0s      

2024-01-09 12:50:20 (273 KB/s) - »./build/gotify-server-go-version« gespeichert [7/7]

go install github.com/gotify/plugin-api/cmd/gomod-cap@latest
wget -O ./build/gotify-server.mod https://raw.githubusercontent.com/gotify/server/v2.4.0/go.mod
--2024-01-09 12:50:20--  https://raw.githubusercontent.com/gotify/server/v2.4.0/go.mod
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 2165 (2,1K) [text/plain]
Wird in »./build/gotify-server.mod« gespeichert.

./build/gotify-server.mod                          100%[================================================================================================================>]   2,11K  --.-KB/s    in 0s      

2024-01-09 12:50:20 (11,3 MB/s) - »./build/gotify-server.mod« gespeichert [2165/2165]

gomod-cap -from ./build/gotify-server.mod -to go.mod
make: gomod-cap: Command not found
Makefile:18: recipe for target 'update-go-mod' failed
make: *** [update-go-mod] Error 127

from server.

jmattheis avatar jmattheis commented on May 28, 2024

make download-tools installs a go binary in $HOME/go/bin, you need to have this directory on your $PATH.

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.