-
Notifications
You must be signed in to change notification settings - Fork 741
Tweaks for Linux extensions #5762
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
Conversation
|
I'd still recommend Git LFS. |
|
Probably wrong compiler flags, I did not look into that, just built them for testing. |
|
Just got told by a dev working on the port that extension support is not there yet? I thought it was 🤔 https://discordapp.com/channels/105462288051380224/105467328782692352/479182870984785921 |
|
Which is weird, they definitely work to some degree, I've tested them. |
|
The linux dedicated server has .so support, but not the client, apparently. |
|
This will allow us to drop the sqf implementation for ACE medical wounds. |
|
For reference on compiler flags to push the size down: |
|
Built extensions work: Didn't manage to reduce file size yet though. Statically linking @dedmen's solution should work but I had trouble adding it to our extension setup so far. |
I assume the linker doesn't optimize them and just takes them as a whole. I'll do some testing, see if I can get size reduction.
Actually.. We only need medical right? These only work on dedicated server. |
|
Yes. At the moment is only used for medical. However, if we can get rid of microsoft C/C++ extensions it would be better. |
compiled just fine for me. on GCC 9 trunk. Not even a single warning. Wow.. without static libc and libc++ medical goes down to 54K. Couldn't find anything yet. The problem is definitely the static linking, Can't find any gcc commands to optimize statically linked libraries. If we really wanted to we could compile libc and libc++ ourselves with Actually.. compiling libc is kinda hard. But! Libc is only about 40KB in linking. The rest 1,3MB are libc++. Which compiling yourself looks rather easy to do.
What do you mean by that? |
|
So you'd rather add 9 MB of yet another file than have 1 MB extension with library inside of it? |
|
Only if you'd still stay on wanting all the libraries built for linux. Maybe there is a better solution than putting it into the repo. CMake buildscript could just download it. CMake has built-in support for downloading. |
Final zip size would not change. And git history is really not a concern, run |
|
Meeting note: Compile only medical extension, ignore unbuilt ones on Linux server in SQF checker. Merge into |
This reverts commit d853b36.
Only Medical extension will be built for Linux
|
Note: Build extension in |
|
Confirmed working on Linux server with latest changes: Version in |
jonpas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need info on where extensions might be used (client/server).
| extensions[] += {"ace_advanced_ballistics"}; | ||
| class ace_advanced_ballistics { | ||
| windows = 1; | ||
| client = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct?
| extensions[] += {"ace_fcs"}; | ||
| class ace_fcs { | ||
| windows = 1; | ||
| client = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct?
| extensions[] += {"ace_break_line", "ace_parse_imagepath"}; | ||
| class ace_break_line { | ||
| windows = 1; | ||
| client = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? Could this be used on server theoretically?
| }; | ||
| class ace_parse_imagepath { | ||
| windows = 1; | ||
| client = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? Could this be used on server theoretically?
|
One change this PR makes is it disables checks on server, something we currently actually do. I guess that's not a problem as anyone can still use it if they really want to, but the mission load is still faster due to less extension loading. So what @dedmen mentions above, we don't actually fix a security issue, we just officially don't support it (and won't build them for that platform). This is ready to merge into |
* Fix Medical HandleDamageWounds memory leak (#6809) * Use strncpy and disable MSVC unsafe warnings (#7171) * Set 64-bit correctly from generator string, Disable SSE2 flag on 64-bit (non-existent) * Tweaks for Linux extensions (#5762) * Tweak CMakeLists for Linux compilation * Conform SQF extensions check for Linux server extensions support * Add *.so to tools * Split extension check into Windows and Linux * Disable Medical extension loading for now * Add client/server separation to extension loading * Add Arma config documentation on extension creation
When merged this pull request will:
windows,linux,clientandserverproperties*.sosupport to build toolsI had to disable the advanced ballistics extension, the errors I was getting were in regards to a constexpr which I assume was because the lack of sufficient C++17 support in my gcc version (5.4). If somebody else wants to give it a try, be my guest.