vysheng / tg

telegram-cli
GNU General Public License v2.0
6.44k stars 1.52k forks source link

OpenBSD 5.6 #429

Open ivomarino opened 9 years ago

ivomarino commented 9 years ago

./configure checking event.h presence... yes checking for 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... no configure: error: no libreadline found

suggestions? Thanks.

eliafino commented 9 years ago

apt-get install libreadline-dev

ivomarino commented 9 years ago

thanks but this is for Debian/Ubuntu, I'm on OpenBSD 5.6 here.

eliafino commented 9 years ago

On OpenBSD: pkg_add libconfig libexecinfo lua

ivomarino commented 9 years ago

done, also installed libreadline but still:

configure: error: no libreadline found

there must be some libreadline-dev also in OpenBSD 5.6 but no idea.

eliafino commented 9 years ago

readline-devel ? Sorry, I don't know OpenBSD -_- Have you tried pkg_add libconfig libexecinfo lua ?

Ciao

ivomarino commented 9 years ago

yes, but no success for now.

On 19 Feb 2015, at 10:55, eliafino notifications@github.com wrote:

readline-devel ? Sorry, I don't know OpenBSD -_- Have you tried pkg_add libconfig libexecinfo lua ?

Ciao

— Reply to this email directly or view it on GitHub https://github.com/vysheng/tg/issues/429#issuecomment-75024347.

eliafino commented 9 years ago

Compile from source? http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html

ivomarino commented 9 years ago

to check, thanks.

brycied00d commented 9 years ago

Easy fix.

diff --git a/configure.ac b/configure.ac
index 27393e8..7fe8ee8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ EXTRA_LIBS=""
 AX_CHECK_OPENSSL(,[AC_MSG_ERROR([No openssl found])])
 AX_CHECK_ZLIB(, [AC_MSG_ERROR([No zlib found])])

-AC_CHECK_LIB([readline], [rl_save_prompt], [ EXTRA_LIBS="${EXTRA_LIBS} -lreadline" ; ], [AC_MSG_ERROR([no libreadline found])])
+AC_CHECK_LIB([readline], [rl_save_prompt], [ EXTRA_LIBS="${EXTRA_LIBS} -lreadline -ltermcap" ; ], [AC_MSG_ERROR([no libreadline found])])

 AC_MSG_CHECKING([for libconfig])
 AC_ARG_ENABLE(libconfig,[--enable-libconfig/--disable-libconfig],

That being said, you will run into other errors down the line. @qbit, @ibara and I are working to get a port committed, once we've got things working.

timkuijsten commented 9 years ago

Interesting, I would like to try this in an OpenBSD sandboxed environment.

nibu-git commented 9 years ago

Some one pass trhouth this: gcc -I. -I. -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -I/usr/local/include/lua-5.2 -I/usr/include -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -c -MP -MD -MF ./dep/main.d -MQ ./objs/main.o -o objs/main.o main.c main.c: In function 'main': main.c:739:24: error: storage size of 'serv_addr' isn't known struct sockaddr_in serv_addr; ^ main.c:739:24: error: unused variable 'serv_addr' [-Werror=unused-variable] cc1: all warnings being treated as errors Makefile:55: recipe for target 'objs/main.o' failed gmake: *\ [objs/main.o] Error 1

I had try to -Wno-unused-variable on Makefile, but it makes crash on the same point.

thanks!