hoehermann / purple-gowhatsapp

Pidgin/libpurple plugin for WhatsApp Web.
GNU General Public License v3.0
277 stars 34 forks source link

Compilation error on Debian #128

Closed ZaxonXP closed 1 year ago

ZaxonXP commented 1 year ago

Trying to compile on Debian, but probably I have some missing depedencies and I do not know how to check what is missing. When compiling I am getting such output:

user@trekstor:~/Software/zzz_temp/purple-gowhatsapp/build$ cmake ..
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking for module 'purple'
--   Found purple, version 2.14.1
-- Checking for module 'gdk-pixbuf-2.0'
--   Found gdk-pixbuf-2.0, version 2.42.2
-- PURPLE_INCLUDE_DIRS: /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/include/libpurple
-- PURPLE_LIBRARY_DIRS:
-- PURPLE_LIBRARIES: purple;glib-2.0
-- PURPLE_PLUGIN_DIR: /usr/lib/purple-2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/Software/zzz_temp/purple-gowhatsapp/build
user@trekstor:~/Software/zzz_temp/purple-gowhatsapp/build$ cmake --build .
Scanning dependencies of target purple-dummy
[  4%] Building C object src/go/CMakeFiles/purple-dummy.dir/purple-dummy.c.o
[  9%] Building C object src/go/CMakeFiles/purple-dummy.dir/__/c/constants.c.o
[ 13%] Linking C static library libpurple-dummy.a
[ 13%] Built target purple-dummy
Scanning dependencies of target purple-go-whatsapp
[ 18%] Updating go modules...
go: downloading github.com/alfg/mp4 v0.0.0-20210728035756-55ea58c08aeb
go: downloading github.com/go-sql-driver/mysql v1.6.0
go: downloading github.com/lib/pq v1.10.4
go: downloading github.com/mattn/go-sqlite3 v1.14.10
go: downloading github.com/mdp/qrterminal/v3 v3.0.0
go: downloading github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
go: downloading go.mau.fi/whatsmeow v0.0.0-20220811191500-f650c10b0068
go: downloading google.golang.org/protobuf v1.28.0
go: downloading go.mau.fi/libsignal v0.0.0-20220628090436-4d18b66b087e
go: downloading rsc.io/qr v0.2.0
go: downloading filippo.io/edwards25519 v1.0.0
go: downloading golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
go: downloading github.com/gorilla/websocket v1.5.0
go: downloading github.com/google/go-cmp v0.5.5
go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: downloading github.com/mdp/qrterminal v1.0.1
[ 22%] Generating purple-go-whatsapp.a, purple-go-whatsapp.h
# runtime/internal/sys
/usr/local/go/src/runtime/internal/sys/consts.go:16:7: DefaultPhysPageSize redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch_amd64.go:10:2: other declaration of DefaultPhysPageSize
/usr/local/go/src/runtime/internal/sys/consts.go:20:7: PCQuantum redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch_amd64.go:11:2: other declaration of PCQuantum
/usr/local/go/src/runtime/internal/sys/consts.go:23:7: Int64Align redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch_amd64.go:12:2: other declaration of Int64Align
/usr/local/go/src/runtime/internal/sys/consts.go:30:7: MinFrameSize redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch_amd64.go:13:2: other declaration of MinFrameSize
/usr/local/go/src/runtime/internal/sys/stubs.go:16:7: StackGuardMultiplier redeclared in this block
        /usr/local/go/src/runtime/internal/sys/consts.go:13:7: other declaration of StackGuardMultiplier
# math
/usr/local/go/src/math/acosh.go:43:6: Acosh defined in both Go and assembly
/usr/local/go/src/math/asin.go:20:6: Asin defined in both Go and assembly
/usr/local/go/src/math/asin.go:58:6: Acos defined in both Go and assembly
/usr/local/go/src/math/asinh.go:40:6: Asinh defined in both Go and assembly
/usr/local/go/src/math/atan.go:96:6: Atan defined in both Go and assembly
/usr/local/go/src/math/atan2.go:30:6: Atan2 defined in both Go and assembly
/usr/local/go/src/math/atanh.go:48:6: Atanh defined in both Go and assembly
/usr/local/go/src/math/cbrt.go:26:6: Cbrt defined in both Go and assembly
/usr/local/go/src/math/erf.go:189:6: Erf defined in both Go and assembly
/usr/local/go/src/math/erf.go:274:6: Erfc defined in both Go and assembly
/usr/local/go/src/math/erf.go:274:6: too many errors
gmake[2]: *** [src/go/CMakeFiles/purple-go-whatsapp.dir/build.make:94: src/go/purple-go-whatsapp.a] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:135: src/go/CMakeFiles/purple-go-whatsapp.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2

I installed GO using following instruction

Kind regards, Piotr

hoehermann commented 1 year ago

It looks like the go installation was corrupted. Posts describing similar problems:

I suggest you sudo rm -r /usr/local/go and then do a clean re-install of go.

ZaxonXP commented 1 year ago

You were right. I did what you suggested and I managed to compile the plugin. Thank you!