vysheng / tg

telegram-cli
GNU General Public License v2.0
6.45k stars 1.53k forks source link

Error compiling tg on debian-sparc #1065

Open jazzdroid opened 8 years ago

jazzdroid commented 8 years ago

Hi guys! I got this issue that I can't figure out. When I tried to compile tg-cli, I got this error:

generate: tgl/generate.c: 2832: parse_tlo_file: Assertion get_int () == 0x3a2f9be2 failed. make: *\ [auto/auto-skip.h] Error 1

tg-cli

I have this:

machine~$ uname -a Linux 3.2.0-4-sparc64-smp #1 SMP Debian 3.2.68-1+deb7u3 sparc64 GNU/Linux

machine:~$ dpkg -l | grep readline ii libreadline-dev:sparc 6.2+dfsg-0.1 sparc GNU readline and history libraries, development files ii libreadline5:sparc 5.2+dfsg-2~deb7u1 sparc GNU readline and history libraries, run-time libraries ii libreadline6:sparc 6.2+dfsg-0.1 sparc GNU readline and history libraries, run-time libraries ii libreadline6-dev:sparc 6.2+dfsg-0.1 sparc GNU readline and history libraries, development files ii readline-common 6.2+dfsg-0.1 all GNU readline and history libraries, common files

machine:~$ dpkg -l libconfig8-dev libreadline6-dev libssl-dev liblua5.2-dev lua5.2 python-dev python libevent-dev libjansson-dev

ii libconfig8-dev 1.4.8-5 sparc Transitional package for libconfig-dev ii libevent-dev 2.0.19-stable-3+deb7u1 sparc Asynchronous event notification library (development files) ii libjansson-dev:sparc 2.3.1-2 sparc C library for encoding, decoding and manipulating JSON data (dev) ii liblua5.2-dev:sparc 5.2.1-3+deb7u1 sparc Development files for the Lua language version 5.2 ii libreadline6-dev:sparc 6.2+dfsg-0.1 sparc GNU readline and history libraries, development files ii libssl-dev 1.0.1e-2+deb7u17 sparc SSL development libraries, header files and documentation ii lua5.2 5.2.1-3+deb7u1 sparc Simple, extensible, embeddable programming language ii python 2.7.3-4+deb7u1 all interactive high-level object-oriented language (default version) ii python-dev 2.7.3-4+deb7u1 all header files and a static library for Python (default)

machine:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc-linux-gnu/4.6/lto-wrapper Target: sparc-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --with-long-double-128 --enable-checking=release --build=sparc-linux-gnu --host=sparc-linux-gnu --target=sparc-linux-gnu Thread model: posix gcc version 4.6.3 (Debian 4.6.3-14)

I hope you can help me.

jazzdroid commented 8 years ago

BTW: machine:~$ ./configure 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 library containing clock_gettime... -lrt checking for library containing backtrace... none required checking for event_base_new in -levent... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -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 event2/event.h usability... yes checking event2/event.h presence... yes checking for event2/event.h... yes checking for pkg-config... /usr/bin/pkg-config checking whether compiling and linking against OpenSSL works... yes checking if zlib is wanted... yes checking for inflateEnd in -lz... yes checking zlib.h usability... yes checking zlib.h presence... yes checking for zlib.h... yes checking for rl_save_prompt in -lreadline... yes checking for libconfig... enabled checking for config_init in -lconfig... yes checking for liblua... enabled checking for lua... /usr/bin/lua checking if /usr/bin/lua is a Lua interpreter... yes checking for lua version... 5.2 checking for lua platform... unknown checking for lua script directory... ${prefix}/share/lua/5.2 checking for lua module directory... ${exec_prefix}/lib/lua/5.2 checking if LUA_VERSION is defined... yes checking lua.h usability... no checking lua.h presence... no checking for lua.h... no checking lualib.h usability... no checking lualib.h presence... no checking for lualib.h... no checking lauxlib.h usability... no checking lauxlib.h presence... no checking for lauxlib.h... no checking luaconf.h usability... no checking luaconf.h presence... no checking for luaconf.h... no checking for Lua headers in... /usr/include/lua5.2 checking lua.h usability... yes checking lua.h presence... yes checking for lua.h... yes checking lualib.h usability... yes checking lualib.h presence... yes checking for lualib.h... yes checking lauxlib.h usability... yes checking lauxlib.h presence... yes checking for lauxlib.h... yes checking luaconf.h usability... yes checking luaconf.h presence... yes checking for luaconf.h... yes checking for Lua header version... 5.2 checking if Lua header version matches 5.2... yes checking if LUA_VERSION is defined... yes checking for library containing exp... -lm checking for library containing dlopen... -ldl checking for library containing lua_load... -llua5.2 checking for python... disabled checking for libjansson... enabled checking for json_array_set_new in -ljansson... yes checking progname... default checking execinfo.h usability... yes checking execinfo.h presence... yes checking for execinfo.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for unistd.h... (cached) yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking mach/mach.h usability... no checking mach/mach.h presence... no checking for mach/mach.h... no checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking for size_t... yes checking for uid_t in sys/types.h... yes checking for inline... inline checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking for alarm... yes checking for endpwent... yes checking for memset... yes checking for memmove... yes checking for mkdir... yes checking for select... yes checking for socket... yes checking for strdup... yes checking for strndup... yes checking for uname... yes checking for __builtin_bswap32... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged

bakaslon commented 8 years ago

I have the same problem Linux 3.2.0-4-sparc64-smp #1 SMP Debian 3.2.78-1 sparc64 GNU/Linux

root@sun-3:/opt/tg# make cat tgl/scheme.tl tgl/encrypted_scheme.tl tgl/binlog.tl tgl/append.tl tgl/mtproto.tl > auto/scheme.tl 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/tl-parser -c -MP -MD -MF dep/tl-parser.d -MQ objs/tl-parser.o -o objs/tl-parser.o tgl/tl-parser/tl-parser.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/tl-parser -c -MP -MD -MF dep/tlc.d -MQ objs/tlc.o -o objs/tlc.o tgl/tl-parser/tlc.c gcc objs/tl-parser.o objs/tlc.o -L/usr/local/lib -L/usr/lib -L/usr/lib -rdynamic -ggdb -levent -ljansson -lconfig -lz -levent -lrt -lreadline -llua5.2 -lm -ldl -lssl -lcrypto -ldl -lpthread -lutil -o bin/tl-parser bin/tl-parser -e auto/scheme.tlo auto/scheme.tl 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/generate.d -MQ objs/generate.o -o objs/generate.o tgl/generate.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/tools.d -MQ objs/tools.o -o objs/tools.o tgl/tools.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/rand_openssl.d -MQ objs/crypto/rand_openssl.o -o objs/crypto/rand_openssl.o tgl/crypto/rand_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/crypto/rand_altern.d -MQ objs/crypto/rand_altern.o -o objs/crypto/rand_altern.o tgl/crypto/rand_altern.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/err_openssl.d -MQ objs/crypto/err_openssl.o -o objs/crypto/err_openssl.o tgl/crypto/err_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/crypto/err_altern.d -MQ objs/crypto/err_altern.o -o objs/crypto/err_altern.o tgl/crypto/err_altern.c gcc objs/generate.o objs/tools.o objs/crypto/rand_openssl.o objs/crypto/rand_altern.o objs/crypto/err_openssl.o objs/crypto/err_altern.o -L/usr/local/lib -L/usr/lib -L/usr/lib -rdynamic -ggdb -levent -ljansson -lconfig -lz -levent -lrt -lreadline -llua5.2 -lm -ldl -lssl -lcrypto -ldl -lpthread -lutil -o bin/generate bin/generate -g skip-header auto/scheme.tlo > auto/auto-skip.h || ( rm auto/auto-skip.h && false ) generate: tgl/generate.c:2832: parse_tlo_file: Assertion `get_int () == 0x3a2f9be2' failed. make: *\ [auto/auto-skip.h] Error 1

Please help!