tg
tg copied to clipboard
Make failed on Ubuntu 20.04
Hello all,
configure works normal, but on make i get this errors on Ubuntu 20.04
gcc -I. -I. -I./tgl -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/lua5.2 -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl -c -MP -MD -MF dep/queries.d -MQ objs/queries.o -o objs/queries.o tgl/queries.c
gcc -I. -I. -I./tgl -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/lua5.2 -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl -c -MP -MD -MF dep/crypto/rsa_pem_openssl.d -MQ objs/crypto/rsa_pem_openssl.o -o objs/crypto/rsa_pem_openssl.o tgl/crypto/rsa_pem_openssl.c
gcc -I. -I. -I./tgl -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/lua5.2 -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl -c -MP -MD -MF dep/auto-free-ds.d -MQ objs/auto-free-ds.o -o objs/auto/auto-free-ds.o auto/auto-free-ds.c
gcc -I. -I. -I./tgl -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/lua5.2 -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl -c -MP -MD -MF dep/auto-store-ds.d -MQ objs/auto-store-ds.o -o objs/auto/auto-store-ds.o auto/auto-store-ds.c
bin/generate -g print-ds auto/scheme.tlo > auto/auto-print-ds.c || ( rm auto/auto-print-ds.c && false )
gcc -I. -I. -I./tgl -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/lua5.2 -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl -c -MP -MD -MF dep/auto-print-ds.d -MQ objs/auto-print-ds.o -o objs/auto/auto-print-ds.o auto/auto-print-ds.c
tgl/crypto/rsa_pem_openssl.c: In function ‘TGLC_rsa_new’:
tgl/crypto/rsa_pem_openssl.c:41:6: error: dereferencing pointer to incomplete type ‘RSA’ {aka ‘struct rsa_st’}
41 | ret->e = unwrap_bn (TGLC_bn_new ());
| ^~
tgl/crypto/rsa_pem_openssl.c: In function ‘TGLC_rsa_n’:
tgl/crypto/rsa_pem_openssl.c:50:3: error: control reaches end of non-void function [-Werror=return-type]
50 | } \
| ^
tgl/crypto/rsa_pem_openssl.c:52:1: note: in expansion of macro ‘RSA_GETTER’
52 | RSA_GETTER(n);
| ^~~~~~~~~~
tgl/crypto/rsa_pem_openssl.c: In function ‘TGLC_rsa_e’:
tgl/crypto/rsa_pem_openssl.c:50:3: error: control reaches end of non-void function [-Werror=return-type]
50 | } \
| ^
tgl/crypto/rsa_pem_openssl.c:53:1: note: in expansion of macro ‘RSA_GETTER’
53 | RSA_GETTER(e);
| ^~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile.tgl:20: objs/crypto/rsa_pem_openssl.o] Fehler 1
make: *** Auf noch nicht beendete Prozesse wird gewartet …
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]
2091 | ((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]
2108 | ((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]
2141 | ((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] Fehler 1
Can you help me with? I would like to buld a DEB-Package and Upload it to us public Apt-Repository: https://apt.iteas.at
I can relate I got the same issue, I installed it using the following commands:
git clone --recursive https://github.com/vysheng/tg.git && cd tg
sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make
./configure
make
I am not on Ubuntu though, I am on Debian
Debian, Buster:
sudo apt install libssl1.0-dev
On Ubuntu there is the package libssl-dev. But this did not work here.
On Ubuntu 20.04 try this:
sudo apt install libssl1.1=1.1.1f-1ubuntu2
Thank you for that information. I also installed the dev package in the same version. But if i start make, i get an error again.
gcc -I. -I. -I./tgl -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/lua5.2 -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl -c -MP -MD -MF dep/queries.d -MQ objs/queries.o -o objs/queries.o tgl/queries.c
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]
2091 | ((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]
2108 | ((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]
2141 | ((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] Fehler 1
Best Regards
Have you install libssl-dev after that, libssl1.1 depends on that.
Perhaps this helps also #1633.
I got this, on my ubuntu machine.. so you might have to change your apt install line to reflect it
Package libpython-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libpython2-dev
I've tested here an build process on debian 10. It is also not buildable.
tgl/crypto/rsa_pem_openssl.c: In function 'TGLC_rsa_new':
tgl/crypto/rsa_pem_openssl.c:41:6: error: dereferencing pointer to incomplete type 'RSA' {aka 'struct rsa_st'}
ret->e = unwrap_bn (TGLC_bn_new ());
^~
tgl/crypto/rsa_pem_openssl.c: In function 'TGLC_rsa_n':
tgl/crypto/rsa_pem_openssl.c:52:1: error: control reaches end of non-void function [-Werror=return-type]
RSA_GETTER(n);
^~~~~~~~~~
tgl/crypto/rsa_pem_openssl.c: In function 'TGLC_rsa_e':
tgl/crypto/rsa_pem_openssl.c:53:1: error: control reaches end of non-void function [-Werror=return-type]
RSA_GETTER(e);
^~~~~~~~~~
@boospy Have you install libssl1.0-dev? It works on Raspberry Pi OS Lite.
@boospy Have you install libssl1.0-dev? It works on Raspberry Pi OS Lite.
This version is on actual debian not available anymore.
root@debiandev:~/tg# dpkg -l libssl-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================-================-============-================================================
ii libssl-dev:amd64 1.1.1d-0+deb10u6 amd64 Secure Sockets Layer toolkit - development files
root@debiandev:~/tg# apt-cache madison libssl-dev
libssl-dev | 1.1.1d-0+deb10u6 | http://ftp.debian.org/debian-buster-security buster/updates/main amd64 Packages
libssl-dev | 1.1.1d-0+deb10u5 | http://ftp.debian.org/debian-buster/debian buster/main amd64 Packages
libssl1.0-dev ≠ libssl-dev
Try sudo apt install libssl1.0-dev
Raspberry Pi OS Lite is now a Debian 10 distribution.
You are right PI is now Debian10, and this packages is there available, i've tested it for a minute. But on normal x86_64 Debian10, this package is not available anymore.
Perhaps this help: rvm / rvm: cannot install on Debian stable (libssl1.0-dev)
i have solve it by running env CFLAGS="-Wno-cast-function-type" ./configure --disable-openssl
Got the same error, solved running: sudo apt-get install -y libgcrypt-dev