Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ettercap tests failure with Bsymbolic-functions #547

Closed
LocutusOfBorg opened this issue May 4, 2014 · 3 comments
Closed

Ettercap tests failure with Bsymbolic-functions #547

LocutusOfBorg opened this issue May 4, 2014 · 3 comments

Comments

@LocutusOfBorg
Copy link
Contributor

step to reproduce:

export CFLAGS="-Wl,-Bsymbolic-functions"
cmake .. -DENABLE_TESTS=ON
VERBOSE=1 make
make test

Failure!

this is a big problem, because debian automatically adds this flag (with no problem), while the same code on ubuntu just fails to build from source because of the test failure.
Please see:
https://buildd.debian.org/status/package.php?p=ettercap
https://buildd.debian.org/status/fetch.php?pkg=ettercap&arch=i386&ver=1%3A0.8.0-13&stamp=1399025000 (success)
https://launchpad.net/ubuntu/+source/ettercap/1:0.8.0-13
https://launchpadlibrarian.net/174435528/buildlog_ubuntu-utopic-i386.ettercap_1%3A0.8.0-13_FAILEDTOBUILD.txt.gz (same build, same arch, failure)

thoughts?
@barak do you have any clue?

@barak
Copy link
Contributor

barak commented May 4, 2014

No idea. Also fails to build on Ubuntu amd64.
I guess the options are:

  • track down dependencies and their versions to look for clues
  • build manually in given environment so the error can be examined in detail
  • wait for the Ubuntu people to figure it out

@LocutusOfBorg
Copy link
Contributor Author

build manually in given environment so the error can be examined in detail

I have an ubuntu here, and tracking down resulted in this "-Wl,-Bsymbolic-functions" flag.

Building libettercap.so with this flag makes the "make test" fail.
also manually running ./test_ec_decode fails

@LocutusOfBorg LocutusOfBorg changed the title Ettercap tests failure with Ettercap tests failure with Bsymbolic-functions May 5, 2014
LocutusOfBorg added a commit to LocutusOfBorg/ettercap that referenced this issue May 5, 2014
LocutusOfBorg added a commit to LocutusOfBorg/ettercap that referenced this issue May 5, 2014
@LocutusOfBorg
Copy link
Contributor Author

(freely quoting irc since the conversation is public logged)
Reporting an irc conversation:
-So, building without symbolic-functions works?
-Does ettercap do something strange like define empty functions providing the decoders and expect them to be overridden with the symbols from the main executable?
-Huh. Where do those decoders get added?
-I'd guess that passing --dynamic-list-data would get you a “working” test there.
-'cause you appear to be relying on the fact that something is going to call add_decoder(decode_data) and resolve decode_data to your function pointer declared in the test, rather than in the library?
-Debian doesn't pass -Bsymbolic-functions to ld by default?
-I don't think Debian do automatically add -Bsymbolic-functions; it's not in the buildlog you linked, and it's not in LDFLAGS from dpkg-buildflags in Sid.
-You can either remove -Bsymbolic-functions from LDFLAGS, or you could add --dynamic-list-something-or-other to LDFLAGS.
-Frankly, I'd modify your test to test something more useful instead :)
-Check that add_decoder() works, check that get_decoder(...all those standard decoders...) returns non-null.
-Basically, remove the decode_* declarations at the top of the test file, and replace the checks with == NULL.
-(If I understand what's happening correctly, obviously ☺)

LocutusOfBorg added a commit that referenced this issue May 7, 2014
Fix issue #547 test failure with -Wl, -Bsymbolic-functions flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants