tatsuhiro-t / spdylay

The experimental SPDY protocol version 2, 3 and 3.1 implementation in C
http://tatsuhiro-t.github.io/spdylay/
MIT License
603 stars 102 forks source link

configure error #16

Closed PHPGangsta closed 12 years ago

PHPGangsta commented 12 years ago

Hi tatsuhiro-t,

I'm trying to compile spdylay on ubuntu 11.10, and I'm getting this error then running ./configure:

checking whether g++ accepts -g... no checking dependency style of g++... none checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes ./configure: line 15706: syntax error near unexpected token 0.20' ./configure: line 15706:PKG_PROG_PKG_CONFIG(0.20)'

Michael

tatsuhiro-t commented 12 years ago

Hi,

2012/03/28 6:06 "Michael Kliewe" < reply@reply.github.com

:

Hi tatsuhiro-t,

I'm trying to compile spdylay on ubuntu 11.10, and I'm getting this error then running ./configure:

checking whether g++ accepts -g... no checking dependency style of g++... none checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes ./configure: line 15706: syntax error near unexpected token 0.20' ./configure: line 15706:PKG_PROG_PKG_CONFIG(0.20)'

I think installing pkg-config package fixes the problem.

Best regards,

Tatsuhiro Tsujikawa

Michael


Reply to this email directly or view it on GitHub: https://github.com/tatsuhiro-t/spdylay/issues/16

PHPGangsta commented 12 years ago

Hi,

you are right, problem fixed, now I have to check how to get openssl >= 1.0.1, Ubuntu just has 1.0.0e. Thanks for your help!

Michael

tatsuhiro-t commented 12 years ago

2012/03/28 17:33 "Michael Kliewe" < reply@reply.github.com

:

Hi,

you are right, problem fixed, now I have to check how to get openssl >= 1.0.1, Ubuntu just has 1.0.0e. Thanks for your help!

I was in the same situation until recently debian sid got openssl 1.0.1. Before this happened, I downloaded openssl 1.0.1 and built and installed separately and specified PKG_CONFIG_PATH to the directory where openssl.pc of openssl 1.0.1 exists (typically $prefix/lib/pkgconfig) and ran configure. To run example programs, LD_LIBRARY_PATH is handy.

Best regards,

Tatsuhiro Tsujikawa

Michael


Reply to this email directly or view it on GitHub: https://github.com/tatsuhiro-t/spdylay/issues/16#issuecomment-4750859

endamaco commented 12 years ago

Hi! I really need to use spdylay on ubuntu 11.10 that comes with openSSL 1.0.0.. Please can you help me? I'm not able to get it working with 1.0.1 of openssl downloaded from the web

tatsuhiro-t commented 12 years ago

So what the error did you actually get? Couldn't you compile openssl 1.0.1 or Spdylay on Ubuntu 11.10?

endamaco commented 12 years ago

When typing ./configure in spdylay it says to me that I don't match the requisite of having OpenSSL >= 1.0.1.. So I downloded it and tryed to installing it but it seems that I'm not able to do it (quite noob in this unfortunately). It might be problem of PKG_CONFIG_PATH as you said previously but I don't have understand how to fix it.. Sorry to bother you

tatsuhiro-t commented 12 years ago

OK, I'll explain how to build without installing OpenSSL 1.0.1.

First download it (I think you already did it), then unpack and make:

$ tar xf openssl-1.0.1c.tar.gz
$ cd openssl-1.0.1c/
$ ./config
$ make
$ OPENSSL=`pwd`

The last command will assign the directory of openssl in OPENSSL shell variable.

Then clone spdylay and configure it with download OpenSSL version and build:

$ git clone git://github.com/tatsuhiro-t/spdylay.git
$ cd spdylay
$ autoreconf -i
$ ./configure PKG_CONFIG_PATH=$OPENSSL CPPFLAGS=-I$OPENSSL/include LDFLAGS=-L$OPENSSL
$ make

If you get compile error like this:

In file included from spdynative.cc:27:0:
spdy.h: In function ‘void spdylay::on_request_recv_callback(spdylay_session*, int32_t, void*)’:
spdy.h:162:22: error: expected type-specifier
spdy.h:162:22: error: expected ‘>’
spdy.h:162:22: error: expected ‘(’

Your C++ compiler is a little bit old and does not support some C++11 features (I did check the compiler is C++11 capable, but it is not so clever. I'll improve this). But I think all needed binaries has already been built at this point. See examples directory.

endamaco commented 12 years ago

Ok! Thank you very much for the hints. Now the configure it's ok but when doing the make I get theese errors: /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function dlfcn_globallookup': dso_dlfcn.c:(.text+0x1d): undefined reference todlopen' dso_dlfcn.c:(.text+0x33): undefined reference to dlsym' dso_dlfcn.c:(.text+0x3d): undefined reference todlclose' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function dlfcn_bind_func': dso_dlfcn.c:(.text+0x3b1): undefined reference todlsym' dso_dlfcn.c:(.text+0x490): undefined reference to dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In functiondlfcn_bind_var': dso_dlfcn.c:(.text+0x511): undefined reference to dlsym' dso_dlfcn.c:(.text+0x5f0): undefined reference todlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function dlfcn_load': dso_dlfcn.c:(.text+0x667): undefined reference todlopen' dso_dlfcn.c:(.text+0x6de): undefined reference to dlclose' dso_dlfcn.c:(.text+0x715): undefined reference todlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function dlfcn_pathbyaddr': dso_dlfcn.c:(.text+0x7b1): undefined reference todladdr' dso_dlfcn.c:(.text+0x819): undefined reference to dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In functiondlfcn_unload': dso_dlfcn.c:(.text+0x87a): undefined reference to `dlclose' collect2: ld returned 1 exit status make[2]: * [spdyd] Errore 1 make[2]: uscita dalla directory "/home/marco/spdylay/examples" make[1]: * [all-recursive] Errore 1 make[1]: uscita dalla directory "/home/marco/spdylay" make: *\ [all] Errore 2

tatsuhiro-t commented 12 years ago

Try

make LIBS=-ldl
endamaco commented 12 years ago

Thank you thank you thank you! That made it!