Skip to content

Linux Compiling#49

Draft
DotWith wants to merge 9 commits intoNbc66:masterfrom
DotWith:linux
Draft

Linux Compiling#49
DotWith wants to merge 9 commits intoNbc66:masterfrom
DotWith:linux

Conversation

@DotWith
Copy link
Copy Markdown
Contributor

@DotWith DotWith commented Aug 21, 2023

Allows for compiling without steam-runtime. Tested on Arch Linux.

Fixes #38

Task List

  • Add MP Support
  • Add SP Support
  • Add Linux workflows
  • Improve compiling documentation
  • Fix MP TOGL
  • Fix SP TOGL
  • Fix warnings

Code stolen from Momentum Mod and ilocalize

@Nbc66
Copy link
Copy Markdown
Owner

Nbc66 commented Aug 22, 2023

Fun fact we also fully support vs2022 so if you want you can add vs2019/2022 into the readme file

@DotWith
Copy link
Copy Markdown
Contributor Author

DotWith commented Aug 28, 2023

Linux on SP branch crashes after intro. As well I can't view asserts cause the steam-runtime is needed when running the game launcher (hl2_linux).

@Nbc66
Copy link
Copy Markdown
Owner

Nbc66 commented Sep 4, 2023

Did you switch sp to upcoming?

@Nbc66
Copy link
Copy Markdown
Owner

Nbc66 commented Sep 4, 2023

Also would be good if just port sp stuff to mp anyways since its more up to date

@DotWith
Copy link
Copy Markdown
Contributor Author

DotWith commented Sep 4, 2023

Yes, I'm on upcoming. Should I keep this in draft until that port is done?

@Nbc66
Copy link
Copy Markdown
Owner

Nbc66 commented Sep 5, 2023 via email

@DotWith
Copy link
Copy Markdown
Contributor Author

DotWith commented Sep 5, 2023

Alright

@Alienmario
Copy link
Copy Markdown

Alienmario commented Oct 29, 2023

I've finally gotten to test out a linux server on Ubuntu 22.04 using Base 2013 Dedicated Server. Compiling was fine (thanks to WSL), if you ignore the warnings. Besides installing the usual dependencies, I've ran into some minor setbacks, resolved below. I ran a cherrypicked version of this repo, so could very well be my fault.
Thank you!

failed to dlopen /mnt/volume-fsn1-1/pufferpanel/servers/fe4e423d/hl2mp/bin/server_srv.so error=bin/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /mnt/volume-fsn1-1/pufferpanel/servers/fe4e423d/hl2mp/bin/server_srv.so)
  
 > strings /mnt/volume-fsn1-1/pufferpanel/servers/fe4e423d/bin/libstdc++.so.6 | grep GLIBCX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH

 > strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.30
GLIBCXX_DEBUG_MESSAGE_LENGTH

 > cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /mnt/volume-fsn1-1/pufferpanel/servers/fe4e423d/bin/libstdc++.so.6

Unable to load interface VSoundEmitter002 from soundemittersystem.so
 
 > cp soundemittersystem_srv.so soundemittersystem.so

AppFramework : Unable to load module scenefilecache.so!
 
 > cp scenefilecache_srv.so scenefilecache.so

Additional thoughts:

  • Both server_srv.so and server.so appear in the bin directory with equal filesize, is this normal?
  • I'm only able to maintain full compat with sourcemod by going from -O2 to -O1 (It would otherwise crash when output hooks are used and CBaseEntityOutput::FireOutput is called)


steps:
- name: Checkout
uses: actions/checkout@v2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v4

Comment on lines +38 to +42
- name: Upload product
uses: actions/upload-artifact@v2
with:
name: mp_sdk2013ce
path: Linux.tar.xz
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Upload product
uses: actions/upload-artifact@v2
with:
name: mp_sdk2013ce
path: Linux.tar.xz
- name: Upload product
uses: actions/upload-artifact@v4
with:
name: mp_sdk2013ce
path: Linux.tar.xz
if-no-files-found: error

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

Successfully merging this pull request may close these issues.

[BUG] Linux compiling with steam-runtime

4 participants