vysheng / tg

telegram-cli
GNU General Public License v2.0
6.5k stars 1.54k forks source link

Error MAKE FreeBSD don't know how to make objs/%.o #1607

Open SkyLakeRT opened 5 years ago

SkyLakeRT commented 5 years ago

SYSTEM

root@okhsrv:~/tg # uname -aa
FreeBSD okhsrv 12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 GENERIC  amd64

CONFIGURE

root@okhsrv:~/tg # ./configure 
checking for gcc... no
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for library containing clock_gettime... none required
checking for library containing backtrace... -lexecinfo
checking for event_base_new in -levent... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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/local/bin/pkg-config
checking for openssl/ssl.h in /usr/local/ssl... no
checking for openssl/ssl.h in /usr/lib/ssl... no
checking for openssl/ssl.h in /usr/ssl... no
checking for openssl/ssl.h in /usr/pkg... no
checking for openssl/ssl.h in /usr/local... no
checking for openssl/ssl.h in /usr... yes
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... no
checking for lua5.2... no
checking for lua52... /usr/local/bin/lua52
checking if /usr/local/bin/lua52 is a Lua interpreter... yes
checking for lua version... Hello Lua 5.2!
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/local/include/lua52
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... none required
checking for library containing lua_load... -llua-5.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... no
checking malloc.h presence... no
checking for malloc.h... no
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

MAKE PROCESSING

root@okhsrv:~/tg # make
make: don't know how to make objs/%.o:. Stop

make: stopped in /root/tg

What is the problem, any ideas? I tried it gmake and it also gives an error, only another

gmake
gmake: *** Нет правила для сборки цели «tgl/scheme.tl», требуемой для «auto/scheme.tl».  Останов.
Paulchen232 commented 5 years ago

gmake is right for you. Look #630

SkyLakeRT commented 5 years ago

No, it's not what i need. I copy from option --recursive, run ./configure, run make, gmake

MAKE


root@okhsrv:~/tg # make 
make: don't know how to make objs/%.o:. Stop

make: stopped in /root/tg

GMAKE

root@okhsrv:~/tg # gmake
cat tgl/scheme.tl tgl/encrypted_scheme.tl tgl/binlog.tl tgl/append.tl tgl/mtproto.tl > auto/scheme.tl
cc -I. -I. -I./tgl -g -O2  -I/usr/local/include -I/usr/include -I/usr/include -I/usr/local/include/lua52 -I/usr/include -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
In file included from tgl/tl-parser/tl-parser.c:38:
./tgl/tl-parser/portable_endian.h:56:10: error: 'be16toh' macro redefined [-Werror,-Wmacro-redefined]
#       define be16toh(x) betoh16(x)
               ^
/usr/include/sys/endian.h:77:9: note: previous definition is here
#define be16toh(x)      bswap16((x))
        ^
In file included from tgl/tl-parser/tl-parser.c:38:
./tgl/tl-parser/portable_endian.h:57:10: error: 'le16toh' macro redefined [-Werror,-Wmacro-redefined]
#       define le16toh(x) letoh16(x)
               ^
/usr/include/sys/endian.h:80:9: note: previous definition is here
#define le16toh(x)      ((uint16_t)(x))
        ^
In file included from tgl/tl-parser/tl-parser.c:38:
./tgl/tl-parser/portable_endian.h:59:10: error: 'be32toh' macro redefined [-Werror,-Wmacro-redefined]
#       define be32toh(x) betoh32(x)
               ^
/usr/include/sys/endian.h:78:9: note: previous definition is here
#define be32toh(x)      bswap32((x))
        ^
In file included from tgl/tl-parser/tl-parser.c:38:
./tgl/tl-parser/portable_endian.h:60:10: error: 'le32toh' macro redefined [-Werror,-Wmacro-redefined]
#       define le32toh(x) letoh32(x)
               ^
/usr/include/sys/endian.h:81:9: note: previous definition is here
#define le32toh(x)      ((uint32_t)(x))
        ^
In file included from tgl/tl-parser/tl-parser.c:38:
./tgl/tl-parser/portable_endian.h:62:10: error: 'be64toh' macro redefined [-Werror,-Wmacro-redefined]
#       define be64toh(x) betoh64(x)
               ^
/usr/include/sys/endian.h:79:9: note: previous definition is here
#define be64toh(x)      bswap64((x))
        ^
In file included from tgl/tl-parser/tl-parser.c:38:
./tgl/tl-parser/portable_endian.h:63:10: error: 'le64toh' macro redefined [-Werror,-Wmacro-redefined]
#       define le64toh(x) letoh64(x)
               ^
/usr/include/sys/endian.h:82:9: note: previous definition is here
#define le64toh(x)      ((uint64_t)(x))
        ^
6 errors generated.
gmake: *** [Makefile.tl-parser:4: objs/tl-parser.o] Ошибка 1
Paulchen232 commented 5 years ago

You have now another message from gmake. Have you the folder tg remove? And then do git clone --recursive https://github.com/vysheng/tg.git && cd tg and pkg install libconfig libexecinfo lua52 python and gmake

Paulchen232 commented 5 years ago

I have forget ./configure before gmake

SkyLakeRT commented 5 years ago

I done. but libexecinfo not found in freebsd 12 repository. In /usr/ports/ not found.

root@okhsrv:~/tg # pkg install libexecinfo
Updating FreeBSD repository catalogue...                                                                                                                                                        
FreeBSD repository is up to date.                                                                                                                                                               
All repositories are up to date.                                                                                                                                                                
pkg: No packages available to install matching 'libexecinfo' have been found in the repositories 
SkyLakeRT commented 5 years ago

Gmake the same error

SkyLakeRT commented 5 years ago

https://forums.freebsd.org/threads/devel-libexecinfo-missing.62573/ Speaking what library already installed in system.

Paulchen232 commented 5 years ago

Try pkg install libexecinfo-dev

SkyLakeRT commented 5 years ago
root@okhsrv:~ # pkg install libexecinfo-dev
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'libexecinfo-dev' have been found in the repositories
root@okhsrv:~ # pkg search libexecinfo
root@okhsrv:~ # pkg search execinfo
root@okhsrv:~ # 

It's pretty sad, I do not understand what is missing gmake? Those names which it displays are some kind of dependencies included in the library whose name I do not know? A separate story with make, it refers to the file and can not find it, how to specify the exact location or some alternative?

Paulchen232 commented 5 years ago

Try this: pkg delete libexecinfo because libexecinfo must in the base System.

Alcadramin commented 5 years ago

Well you can just use snap version as well

areese commented 3 years ago

@Paulchen232 this is happening because both sys/endian.h and tgl/tl-parser/portable_endian.h are defining the macros on FreeBSD.

The fix is to wrap the macro definitions in tgl/tl-parser/portable_endian.h with ifdefs.