-
-
Notifications
You must be signed in to change notification settings - Fork 27
Make base compile on linux #629
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
base: base
Are you sure you want to change the base?
Conversation
Mind adding the following to commits which add build.sh & other scripts?
|
a390718
to
6d2b895
Compare
Done, I've also added credits (or cherry-picked) to a couple of other commits |
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.
What's with this freetype2 change?
Also there are a lot of weird Linux specific changes that don't make a lot of sense from my perspective. Please revise this patch to be less unique to TC2. Attempt to follow the current state of TF2 as closely as possible, rather than doing what may be optimal. This will reduce the possibility of regressions and allow us to test things better.
TF2 already uses the system freetype libraries, and the headers that were in common don't actually build, so I just elected to use the system headers. |
b8d1178
to
2f63fc9
Compare
8178315
to
e05bc50
Compare
Reposting from the #tf2-patches channel on discord:
|
bbe6323
to
538d3d8
Compare
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.
Still some problematic changes, also why was empty ccache added?
Just github being funny, it's a perms change to make it executable. |
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.
*non-windows
contains things that will be added in a later commit
ababdc8
to
3dbe712
Compare
build.sh contains references to external libs which aren't added in this commit. Co-authored-by: melvyn2 <melvyn2@brcok.tk> Co-authored-by: HurricanePootis <eatabakhsh04@protonmail.com> Co-authored-by: interrupt <int-10h@protonmail.com>
VPC will segfault unless it's built as 32bit
linux paths are case-sensitive, some code doesn't expect this
TF2 already uses the system library, and these headers are broken anyways.
Without this, gcc will complain with the following error: /src/src/public/tier1/utlblockmemory.h:139:2: error: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive] 139 | swap( m_nBlocks, mem.m_nBlocks ); | ^~~~
Use the steam runtime containers instead, they're easier to setup
removed some files, and added them to the gitignore. these files will get regenerated automatically, and if they're in the repo, it will show up on "git status".
I'm not sure if this will compile on windows, so *maybe* we should add a ifdef check for linux. But, this should be correct. /src/src/public/gcsdk/msgprotobuf.h:383:8: error: base operand of '->' has non-pointer type 'CMsgProtoBufHeader' 383 | Hdr()->set_client_session_id( nSessionIDClient ); | ^~
this is technically a problem, but it's what valve probably intended /src/src/vgui2/vgui_surfacelib/linuxfont.cpp:505:43: error: no matching function for call to 'min(int&, unsigned int&)' 505 | int Width = min( rgbaWide, bitmap.width );
src/thirdparty/libedit-3.1/configure.ac is modified from the original files, to make it work on modern autotools.
these are taken from the leaked source code
revert gendbg changes
failed to dlopen vphysics.so error=/home/user/Projects/tf2_stuff/cloned/team-comtress-2/game/bin/vphysics.so: undefined symbol: __wrap_freopen
without this, static libraries such as tier1 won't contain debugging info, making it harder to debug.
I've honestly got no idea what the root cause is, but this fixes it
copied nearly verbatim from CSGO, thanks to ficool2 for pointing out there was a better fix
In certain situations, gcc will remove instances of code that check if a pointer is null, if it thinks that the pointer can never be null. However, many of these pointers *can* be null in TF2, so this optimization can cause crashes.
Related Issue
TODO
Implementation
This PR fixes a number of issues with compiling TC2 on linux. It currently runs, and can load maps. It uses parts of #616, #486, #603.
Build Instructions
Screenshots
Checklist
community
branch. (???)Testing Checklist
This was built under the steam "scout" and "sniper" runtime.
Caveats
While the game does run, there is a bug that will cause a crash whenever a weapon is inspected.fixed!Alternatives