deltachat / deltachat-node

Email-based instant messaging for Node.js.
GNU General Public License v3.0
45 stars 11 forks source link

Fix Travis #3

Closed ralphtheninja closed 6 years ago

ralphtheninja commented 6 years ago

I have a fix-travis branch in my fork where I have experimented a bit with this. Current status is:

What I'd like to do now is to get hold of libsasl2-dev@2.1.27 and try to build it manually

$ cat `dpkg -L libsasl2-dev | grep pc`
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib/x86_64-linux-gnu
includedir=/usr/include

Name: Cyrus SASL
Description: Cyrus SASL implementation
URL: http://www.cyrussasl.org/
Version: 2.1.27
Cflags: -I${includedir}
Libs: -L${libdir} -lsasl2
Libs.private:  -ldl -lresolv  
ralphtheninja commented 6 years ago

Ok. Managed to grab source for libsasl2-dev@2.1.27. Also found out that the version of ninja-build is too low so installing this binary from github. Now I'm struggling with ninja script exiting with the following error:

[71/164] ccache cc -Isrc/src@@deltachat@sta -Isrc -I../src -I../libs/libetpan/include -I../libs/netpgp/include -I/usr/local/include -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -fPIC -pthread  -MD -MQ 'src/src@@deltachat@sta/dc_context.c.o' -MF 'src/src@@deltachat@sta/dc_context.c.o.d' -o 'src/src@@deltachat@sta/dc_context.c.o' -c ../src/dc_context.c
FAILED: src/src@@deltachat@sta/dc_context.c.o 
ccache cc -Isrc/src@@deltachat@sta -Isrc -I../src -I../libs/libetpan/include -I../libs/netpgp/include -I/usr/local/include -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -fPIC -pthread  -MD -MQ 'src/src@@deltachat@sta/dc_context.c.o' -MF 'src/src@@deltachat@sta/dc_context.c.o.d' -o 'src/src@@deltachat@sta/dc_context.c.o' -c ../src/dc_context.c
../src/dc_context.c: In function ‘dc_context_unref’:
../src/dc_context.c:182:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
  for (int i = 0; i < DC_LOG_RINGBUF_SIZE; i++) {
  ^
../src/dc_context.c:182:2: note: use option -std=c99 or -std=gnu99 to compile your code
../src/dc_context.c: In function ‘dc_get_info’:
../src/dc_context.c:629:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
   for (int i = 0; i < DC_LOG_RINGBUF_SIZE; i++) {

I suspect this is because the version of gcc on Travis is a bit old (4.8) and it's not using C99 mode by default.