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

undefined symbol "_nss_cache_cycle_prevention_function" on FreeBSD 13 #32

Open
PaddyMac opened this issue Apr 17, 2021 · 1 comment
Open

Comments

@PaddyMac
Copy link

PaddyMac commented Apr 17, 2021

It's been a while since I've used your source port, but I figured I'd break it out again. I've successfully built and run it on FreeBSD before, but maybe something has changed in the latest FreeBSD 13-RELEASE. I'm currently trying TFE, and I can start the program with no trouble. But when I choose the option to start a new game and choose my difficulty level, I get the following error at the top of the screen:

network is off
CUnixDynamicLoader error: Undefine symbol "_nss_cache_cycle_prevention_function"
Cannot load DLL file '/usr/home/patrick/Serious-Engine/Bin/libEntities.so':
Undefined symbol "_nss_cache_cycle_prevention_function"

If I try to start a new game a second time, the program crashes with a segfault. Though now that I look a little closer, the undefined reference error might be a red herring. Yes it's an error, but it might not be causing the segfault. I ran the game through gdb, and this is what caused the segfault:

Thread 1 received signal SIGSEGV, Segmentation fault.
CFogMarker::GetFog (this=0x0, fpFog=...) at /usr/home/patrick/Serious-Engine/Sources/Entities/FogMarker.es:64
64 fpFog.fp_vFogDir(1) = m(1,2);

@brynet
Copy link

brynet commented Apr 20, 2021

I'm eventually hitting the same SIGSEGV on OpenBSD 6.9-current as well, compiled with clang 10.0.1.

It appears that clang is optimizing out some very important NULL pointer checks in the entity class files. I'm not familiar enough with C++ to figure out why this is happening, but it certainly is alarming. I was able to solve this with the -fno-delete-null-pointer-checks flag, but this should be looked at.

+ add_compile_options(-fno-delete-null-pointer-checks)

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