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

Precompiled default interlocker and train libraries do not work on (Linux) x86_64 #73

Open
BLuedtke opened this issue Aug 25, 2022 · 0 comments
Assignees

Comments

@BLuedtke
Copy link
Collaborator

BLuedtke commented Aug 25, 2022

When startup is called for a running swtbahn-cli server, the default interlocker libraries and the default train-engine libraries are loaded dynamically. The lib files are located at server/src/interlockers and server/src/engines respectively (.so and .dylib files).

These shared libraries were compiled on a particular device at some point. Not sure exactly where/how. Regardless, the current precompiled libraries can't be loaded when running the swtbahn-cli server on an x86_64 linux device (in this case, running Kubuntu 22.04 with kernel 5.15.0-46). Loading them results in header/ELX (ELF?) conflicts, which is not particularly suprising, assuming that they were compiled on a different architecture and with a different kernel.

To be able to run the swtbahn-cli server on an x86_64 linux device, one has to re-compile new default engines and interlockers, and place them in the appropriate locations. Whilst that is technically possible, there is no source file for the default train engines, at least not in this repository. For the interlockers, there are two source files which can be used.

I see multiple possible solutions:

  • Supply the source for default train engines and re-compile them on demand upon startup, should loading the default libraries fail
  • Supply additional precompiled libraries explicitly for x86_64, that are loaded if loading the standard loading fails (or, smarter: use preprocessor to directly load the appropriate libraries).

Any changes to the handling of these libraries must be tested on Mac/Apple as well; if possible also with newer ARM based Macs.

Note: This is not a high-priority issue.

@BLuedtke BLuedtke self-assigned this Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant