painless-security / trust-router

Moonshot Trust Router
0 stars 0 forks source link

Linking against libtr_tid.la fails #102

Closed jennifer-richards closed 6 years ago

jennifer-richards commented 6 years ago

Alejandro Perez reports:

I hope this bug you mention is related to, or the same as, this I'm getting when trying to build FreeRADIUS using TR libs 3.4. Otherwise we have two bugs :). This is happening in both Debian 8 and Centos 7 at least.

checking for tidc_create in -ltr_tid... no checking for tidc_create in -ltr_tid in /usr/local/lib... no checking for tidc_create in -ltr_tid in /opt/lib... no checking for tid_srvr_get_key_expiration in -ltr_tid... no checking for tid_srvr_get_key_expiration in -ltr_tid in /usr/local/lib... no checking for tid_srvr_get_key_expiration in -ltr_tid in /opt/lib... no

I've checked with v3.0.3 and it works, so it is either something I'm doing wrong with my build or the ABI/API change made it fail.

And

I've bisected a bit, and from what I can observe, branch v3.3.0 works, whereas v3.4.x does not.

jennifer-richards commented 6 years ago

The configure script tests for tidc_create in -ltr_tid more or less by trying to compile something like:

#include <trust_router/tid.h>
int main(void)
{
  TIDC_INSTANCE *tidc = tidc_create();
  return (!tidc);
}

This fails:

$ gcc -o test test.c -ltr_tid
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libtr_tid.so: undefined reference to `tr_gssc_instance_new'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libtr_tid.so: undefined reference to `tr_gssc_open_connection'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libtr_tid.so: undefined reference to `tr_gssc_exchange_msgs'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libtr_tid.so: undefined reference to `tr_gss_handle_connection'
collect2: error: ld returned 1 exit status

This is caused by failing to include the tr_gss.c code in the libtr_tid.la library. This is GSS transaction code that was factored out of the TID-specific sources to be reused with the monitoring code.

mrw42 commented 6 years ago

Jennifer, Mark thinks this is fixed already. Is he right?

jennifer-richards commented 6 years ago

This is fixed but not released - there is a build problem that I need to sort out (I was hoping to build the trust router against the libtr_tid code for its TID support, but that doesn't work right now because of dependencies between the tr_msg module and TID, TRP, and monitoring support. I will close this and open an issue for the current problem (I got pulled away before wrapping it up).