tatsuhiro-t/spdylay

Does not compile with gcc49 on FreeBSD 9

oparoz opened this issue · 2 comments

Any idea on how to solve this?

libtool: link: g++49 -O2 -pipe -fPIE -march=native -march=native -fstack-protector-strong --param ssp-buffer-size=4 -fno-strict-aliasing -std=c++11 -pthread -Wl,-rpath -Wl,/usr/local/lib -fstack-protector -o .libs/spdycat util.o timegm.o spdylay_ssl.o spdycat.o HtmlParser.o http-parser/http_parser.o  -L/usr/local/lib -lssl -lcrypto -lxml2 -liconv -lm -levent_openssl -levent ../lib/.libs/libspdylay.so -L/usr/lib -lz -pthread -Wl,-rpath -Wl,/usr/local/lib
spdylay_ssl.o: In function `spdylay::connect_to(std::string const&, unsigned short)':
spdylay_ssl.cc:(.text+0x365): undefined reference to `std::ctype<char>::_M_widen_init() const'
spdylay_ssl.o: In function `spdylay::make_listen_socket(std::string const&, unsigned short, int)':
spdylay_ssl.cc:(.text+0x5c5): undefined reference to `std::ctype<char>::_M_widen_init() const'
spdylay_ssl.o: In function `spdylay::ssl_handshake(ssl_st*, int)':
spdylay_ssl.cc:(.text+0xaf5): undefined reference to `std::ctype<char>::_M_widen_init() const'
spdylay_ssl.cc:(.text+0xb92): undefined reference to `std::ctype<char>::_M_widen_init() const'
spdylay_ssl.o: In function `spdylay::nonblock_connect_to(std::string const&, unsigned short, int)':
spdylay_ssl.cc:(.text+0x114e): undefined reference to `std::ctype<char>::_M_widen_init() const'
spdylay_ssl.o:spdylay_ssl.cc:(.text+0x1376): more undefined references to `std::ctype<char>::_M_widen_init() const' follow
collect2: error: ld returned 1 exit status
*** [spdycat] Error code 1

Stop in /usr/ports/www/spdylay/work/spdylay-1.3.2/src.
*** [all-recursive] Error code 1

Stop in /usr/ports/www/spdylay/work/spdylay-1.3.2.
*** [all] Error code 1

Stop in /usr/ports/www/spdylay/work/spdylay-1.3.2.
*** [do-build] Error code 1

Stop in /usr/ports/www/spdylay..

It turns out it's a problem with the FreeBSD build system.
So for people having trouble, just add this to your Makefile:

USE_GCC=    4.9

Sorry for the noise :)