Bug #394
Conformance test, hooks problem
Description
Hello!
I am trying to run conformance tests on StrongSwan 5.1.0(on FreeBSD 9.0). When I define hooks section, I always get similar error.
For example, when I define:
hooks { ignore_message{ inbound=yes request=yes id=0 } }
I get error: dlsym() for hook 'ignore_message' failed: Undefined symbol "ignore_message_hook_create".
Also, with hook unsort_message I get error: dlsym() for hook 'unsort_message' failed: Undefined symbol "unsort_message_hook_create" and so on...
Without hooks sections, everything works as expected.
Do you know where the problem is?
Regards,
Jane Shaw
Associated revisions
History
#1 Updated by Tobias Brunner over 7 years ago
- Tracker changed from Issue to Bug
- Description updated (diff)
- Status changed from New to Resolved
- Assignee set to Tobias Brunner
- Target version set to 5.1.1
- Resolution set to Fixed
I first thought this is some FreeBSD specific linker issue, but I was actually able to reproduce this issue on Linux.
It was caused because the -rdynamic
flag was configured incorrectly since 19cb07b8. It's fixed with the associated commit.
#2 Updated by Jane Shaw over 7 years ago
Hello,
I fixed it in the source code, but I get the same message again...
#3 Updated by Tobias Brunner over 7 years ago
When changing any Makefile.am
files the actual Makefiles have to be rebuilt by running autogen.sh
and ./configure
again (if you built from the Git repository this should happen automatically). Try running those scripts then run make
and make install
again.
#4 Updated by Jane Shaw over 7 years ago
I changed Makefile.am as you suggested. I have no autogen.sh in strongswan src, so I can't run the script.
I downloaded it from git repository, but when I run it, I get errors that I miss a lot of tools (like perl, automake,...). I installed them, but it didn't work. Do you have any idea what went wrong?
#5 Updated by Tobias Brunner over 7 years ago
I see. If you build from a tarball you should change Makefile.in instead of Makefile.am, then run configure
again, this way you don't have to rerun autogen.sh
/autoreconf
. When building from the Git repository (or when running autogen.sh
in the source dir extracted from a tarball) most of the tools listed in source:HACKING are required.
I installed them, but it didn't work. Do you have any idea what went wrong?
That is not very specific, so, no, I have no idea what went wrong. Do you have an error message? config.log? In general it might be a good idea to start from scratch in these situations (e.g. unpack the tarball again, or run make maintainer-clean
and then autogen.sh
, or build from the Git repository).
#6 Updated by Jane Shaw over 7 years ago
I changed Makefile.in (the whole time I was changing Makefile.am). Now it works! Thank you very much!
#7 Updated by Tobias Brunner over 7 years ago
- Status changed from Resolved to Closed
conftest: Fix hook constructor resolution via dlsym()
AM_CPPFLAGS only takes preprocessor flags like -I or -D, so it did not
forward -rdynamic to the linker (--export-dynamic), which meant that the
symbols defined in the executable itself were not resolvable via dlsym().
Fixes #394.