sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
290 stars 27 forks source link

Compile Error #77

Closed Kays closed 7 years ago

Kays commented 7 years ago

Hello, Been a while and wanted to update my client. So I updated my clone and pulled. Then compiling gave me this error:

In file included from discord.c:17:0:
discord.h:84:7: error: unknown type name ‘bee_chat_info_t’
discord.c: In function ‘discord_logout’:
discord.c:92:18: error: ‘struct im_connection’ has no member named ‘chatlist’
discord.c: In function ‘discord_chat_list’:
discord.c:104:3: warning: implicit declaration of function ‘imcb_chat_list_finish’ [-Wimplicit-function-declaration]
discord.c: In function ‘discord_chat_join’:
discord.c:124:28: error: request for member ‘topic’ in something not a structure or union
discord.c:125:54: error: request for member ‘topic’ in something not a structure or union
discord.c: In function ‘init_plugin’:
discord.c:210:5: error: unknown field ‘chat_list’ specified in initializer
discord.c:210:5: warning: initialization from incompatible pointer type [enabled by default]
discord.c:210:5: warning: (near initialization for ‘pp.chat_with’) [enabled by default]
make[2]: *** [discord_la-discord.lo] Error 1

What am I missing? I am using the latest bitlbee v3.5.1. Thanks!

sm00th commented 7 years ago

Are you building bitlbee by hand? Looks like you forgot to update the headers with 'make install-dev' last time you updated bitlbee.

Kays commented 7 years ago

My apologies for the delayed followup. I did run make install-dev on bitlbee 3.5.1.

Then, I did: PKG_CONFIG_PATH=/home/ksham/apps/bitlbee/3.5.1/lib/pkgconfig ./configure --prefix="/home/ksham/apps/bitlbee/3.5.1/lib/bitlbee"

dequis commented 7 years ago

make clean?

Kays commented 7 years ago

make clean in bitlbee-discord? I did that, then ./configure again. Still getting the errors though.

Edit: tried on a fresh clone on another machine and still seeing this. Using Bitlbee 3.5.1

make: *** No rule to make target `clean'.  Stop.
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -Im4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory build-aux
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:29: installing `build-aux/compile'
configure.ac:32: installing `build-aux/config.guess'
configure.ac:32: installing `build-aux/config.sub'
configure.ac:26: installing `build-aux/install-sh'
configure.ac:26: installing `build-aux/missing'
src/Makefile.am: installing `build-aux/depcomp'
autoreconf: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether make supports nested variables... yes
checking for gcc option to accept ISO C99... -std=gnu99
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for BITLBEE... yes
checking for GLIB... yes
checking for size_t... yes
checking for memset... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make  all-recursive
make[1]: Entering directory `/home/kays/cvs/git/bitlbee-discord'
Making all in src
make[2]: Entering directory `/home/kays/cvs/git/bitlbee-discord/src'
  CC     discord_la-discord.lo
In file included from discord.c:17:0:
discord.h:84:7: error: unknown type name ‘bee_chat_info_t’
discord.c: In function ‘discord_logout’:
discord.c:92:18: error: ‘struct im_connection’ has no member named ‘chatlist’
discord.c: In function ‘discord_chat_list’:
discord.c:104:3: warning: implicit declaration of function ‘imcb_chat_list_finish’ [-Wimplicit-function-declaration]
discord.c: In function ‘discord_chat_join’:
discord.c:124:28: error: request for member ‘topic’ in something not a structure or union
discord.c:125:54: error: request for member ‘topic’ in something not a structure or union
discord.c: In function ‘init_plugin’:
discord.c:210:5: error: unknown field ‘chat_list’ specified in initializer
discord.c:210:5: warning: initialization from incompatible pointer type [enabled by default]
discord.c:210:5: warning: (near initialization for ‘pp.chat_with’) [enabled by default]
make[2]: *** [discord_la-discord.lo] Error 1
make[2]: Leaving directory `/home/kays/cvs/git/bitlbee-discord/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kays/cvs/git/bitlbee-discord'
make: *** [all] Error 2
sm00th commented 7 years ago

It looks like your headers/pkgconfig is screwed up in some way. Check the includedir in /home/ksham/apps/bitlbee/3.5.1/lib/pkgconfig/bitlbee.pc and see if bitlbee.h from that includedir is of the right version. It should contain bee_chat_info_t typedef.

sm00th commented 7 years ago

@Kays, can you try rebuilding the plugin with the latest commit?

Kays commented 7 years ago

@sm00th @dequis sorry for the late response. I have not been monitoring GitHub recently. dequis's commit did solve the problem. Thank you very much!!!