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

disable stack-protector on powerpc #7

Open
maire opened this issue Feb 10, 2014 · 3 comments
Open

disable stack-protector on powerpc #7

maire opened this issue Feb 10, 2014 · 3 comments

Comments

@maire
Copy link

maire commented Feb 10, 2014

I receive this error upon compiling:

 LINK  bitc
bld/addrbook.o: In function `addrbook_get_path':
/home/<redacted>/bitc/src/addrbook.c:155: undefined reference to `__stack_chk_guard'
/home/<redacted>/bitc/src/addrbook.c:155: undefined reference to `__stack_chk_guard'
/home/<redacted>/bitc/src/addrbook.c:163: undefined reference to `__stack_chk_guard'
bld/base58.o: In function `base58_encode':
/home/<redacted>/bitc/src/base58.c:238: undefined reference to `__stack_chk_guard'
/home/<redacted>/bitc/src/base58.c:238: undefined reference to `__stack_chk_guard'
bld/base58.o:/home/<redacted>/bitc/src/base58.c:296: more undefined references to `__stack_chk_guard' follow
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bitc] Error 1

Clang:

Debian clang version 3.3-16 (branches/release_33) (based on LLVM 3.3)
Target: powerpc-unknown-linux-gnu
Thread model: posix

Disabling fstack-protector allows it to compile but I have no idea what the implications are of doing that or how to go about fixing it properly.

@mx4
Copy link
Contributor

mx4 commented Feb 10, 2014

I'm tempted to blame the toolchain for this one. It's possible that stack-protector is not available on clang/powerpc, google suggests that you're not the only one experiencing the same link issue.

It is certainly harmless to disable stack-protector, it'll just be a little less safe to run the resulting binary. You could also try using gcc to compile the binary, cf Makefile, and see if that works.

Couple of things:

  • I don't have a powerpc platform to fix this up: do you want to prepare a patch to address this?
  • does it run fine once you manage to get a binary?

@maire
Copy link
Author

maire commented Feb 10, 2014

No, it doesn't - or, at least, it seems to start for a few seconds before crashing - that was an issue for another ticket though, lest the problem be related to my disabling of stack-protector.

ASSERT failed at src/peer.c:peer_check_liveness:1306
PANIC: Expression 'peer->magic == 0xbadf00d0badf00d' not TRUE.
Panic loop.
Aborted (core dumped)

If you provide an email I can send you a copy of the core dump.

@mx4
Copy link
Contributor

mx4 commented Feb 10, 2014

Oh well, is that a big endian box by any chance? We most likely have some issue on these.

I don't have any powerpc toolchain handy to inspect that core so I'll probably need access to one such box to fix this properly. Maybe we can find some kind of arrangement? My email is in the LICENSE file fwiw.

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