sustrik / dsock

An obsolete project
Other
82 stars 23 forks source link

tcp.h #37

Closed vlm closed 7 years ago

vlm commented 7 years ago

@sustrik, dsock requires libdill's tcp.h, which is not getting installed. So, dsock doesn't compile. What's your take?

btls.c:37:10: fatal error: 'tcp.h' file not found
#include "tcp.h"
         ^
1 error generated.

How were you planning to resolve this internal dependency issue? For now I am including libdill's tcp.h into the Makefile.am's include_HEADERS, but this is dirty.

sustrik commented 7 years ago

I wanted to export the symbol from libdill, but haven't got there yet. Will do tomorrow morning.

sustrik commented 7 years ago

It seems to be working now. Can you recheck?

vlm commented 7 years ago
Undefined symbols for architecture x86_64:
  "_tcp_fd", referenced from:
      _btls_attach_client_kp in libdsock_la-btls.o
      _btls_conn_create in libdsock_la-btls.o
      _btls_attach_server in libdsock_la-btls.o
      _btls_listener_create in libdsock_la-btls.o
      _btls_attach_accept in libdsock_la-btls.o
  "_tcp_listener_type", referenced from:
      _btls_attach_server in libdsock_la-btls.o
      _btls_listener_create in libdsock_la-btls.o
  "_tcp_type", referenced from:
      _btls_attach_client_kp in libdsock_la-btls.o
      _btls_conn_create in libdsock_la-btls.o
      _btls_attach_accept in libdsock_la-btls.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
sustrik commented 7 years ago

Are you using libdill from head?

vlm commented 7 years ago

Yes.

vlm commented 7 years ago

Actually, my bad. Works now.

Here's a script that allows to check interoperation of both libs:

#!/usr/bin/env bash

set -e

echo Building libdill
test -d libdill || git clone --depth 1 https://github.com/sustrik/libdill.git
test -f libdill/config.log || (cd libdill && ./autogen.sh && ./configure --prefix=`pwd`)
(cd libdill && make -j4 && make install)

echo Building dsock
test -d dsock || git clone --depth 1 https://github.com/sustrik/dsock.git
test -f dsock/config.log || (cd dsock && ./autogen.sh && ./configure --prefix=`pwd` --disable-tls CFLAGS="-I`pwd`/../libdill/include" LDFLAGS="-L/usr/local/lib -L/usr/local/opt/libressl/lib -L`pwd`/../libdill/lib")
(cd dsock && make -j4)