Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile on Arch Linux due to compilation error; _tgl_do_send_photo function #1542

Open
FredrikAugust opened this issue Jul 7, 2018 · 6 comments

Comments

@FredrikAugust
Copy link

Trying to compile with makepkg -cs on arch linux (Linux 4.17.3-1-ARCH).

Output is as following:

tgl/queries.c: In function ‘_tgl_do_send_photo’:
tgl/queries.c:2091:10: error: cast between incompatible function types from ‘void (*)(struct tgl_state *, void *, int,  struct tgl_message *)’ to ‘void (*)(struct tgl_state *, void *, int)’ [-Werror=cast-function-type]
         ((void (*)(struct tgl_state *, void *, int))callback) (TLS, callback_extra, 0);
          ^
tgl/queries.c:2108:10: error: cast between incompatible function types from ‘void (*)(struct tgl_state *, void *, int,  struct tgl_message *)’ to ‘void (*)(struct tgl_state *, void *, int)’ [-Werror=cast-function-type]
         ((void (*)(struct tgl_state *, void *, int))callback) (TLS, callback_extra, 0);
          ^
tgl/queries.c:2141:10: error: cast between incompatible function types from ‘void (*)(struct tgl_state *, void *, int,  struct tgl_message *)’ to ‘void (*)(struct tgl_state *, void *, int)’ [-Werror=cast-function-type]
         ((void (*)(struct tgl_state *, void *, int))callback) (TLS, callback_extra, 0);
          ^
cc1: all warnings being treated as errors
make: *** [Makefile.tgl:20: objs/queries.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
@deltaxflux
Copy link

Have the same compilation error.

@ulrickno94
Copy link

Same problem...

@sitano
Copy link

sitano commented Nov 7, 2018

GCC 8.1.1 (on Arch Linux) does not like this and reports many Werror=cast-function-type errors. Use env CFLAGS="-Wno-cast-function-type" ./configure

@bhoylloza
Copy link

Have the same compilation error.

@kenorb
Copy link

kenorb commented Feb 2, 2019

I've fixed the errors in my forks at https://github.com/kenorb-contrib/tg & https://github.com/kenorb-contrib/tgl

@oqilkarimov
Copy link

GCC 8.1.1 (on Arch Linux) does not like this and reports many Werror=cast-function-type errors. Use env CFLAGS="-Wno-cast-function-type" ./configure

For ubuntu 19.04 same but should run ./configure with --disable-openssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants