EionRobb / purple-googlechat

A Google Chat protocol plugin for libpurple/Pidgin/bitlbee/whatever
GNU General Public License v3.0
112 stars 13 forks source link

Does not compile on OpenBSD. #59

Closed mokkurkalve closed 2 years ago

mokkurkalve commented 2 years ago

I can't compile this on OpenBSD 7.1 with clang or gcc (egcc). The error are: ld: error: unable to find library -ldl

What i can find on the internet are: "On OpenBSD, dlopen() and friends are in libc, and there is no libdl. "

EionRobb commented 2 years ago

Can you try with the above commit and see if that resolves? Thanks! :)

mokkurkalve commented 2 years ago

Hm. The -ldl are still presented to the compiler, so it didn't help.

egcc -fPIC -O2 -g -pipe -shared -o libgooglechat.so libgooglechat.c googlechat.pb-c.c googlechat_json.c googlechat_pblite.c googlechat_connection.c googlechat_auth.c googlechat_events.c googlechat_conversation.c purple2compat/http.c purple2compat/purple-socket.c  -I/usr/local/include -L/usr/local/lib -lprotobuf-c `pkg-config purple glib-2.0 json-glib-1.0 zlib --libs --cflags` -I/usr/include/protobuf-c -ldl -Ipurple2compat -g -ggdb

I compile this way as it seems most promising: CC=egcc gmake

EionRobb commented 2 years ago

Oh, I think I messed up the BSD check in the Makefile. What's the output of uname -s?

mokkurkalve commented 2 years ago

~$ uname -s OpenBSD

EionRobb commented 2 years ago

Another commit, if you could test again :)

mokkurkalve commented 2 years ago
00:28:20 <@root> googlechat:
00:28:20 <@root>   Version: 0.1
00:28:20 <@root>   Description: Adds Google Chat support to libpurple.
00:28:20 <@root>   Author: Eion Robb <eionrobb+googlechat@gmail.com>
00:28:20 <@root>   URL: https://github.com/EionRobb/purple-googlechat/

Compiles, installs and is loaded in bitlbee, as can be seen above. My next step will be to figure out if I now can get my account working in bitlbee on OpenBSD. But that's outside the scope of this ticket, which was about compiling. Thanks :-)

EionRobb commented 2 years ago

Yay, thanks for testing :)