Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Borderlands 2 steam (fixed)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
kajzer
l33t
l33t


Joined: 27 Nov 2014
Posts: 855

PostPosted: Sun Jun 30, 2019 11:35 pm    Post subject: Reply with quote

You can compile only 32bit libraries with new flags, that way only games (and only 32bit games) are using those libs.

Code:

CFLAGS="${CFLAGS}"
CXXFLAGS="${CFLAGS}"

CFLAGS_x86="${CFLAGS_x86} -mstackrealign"
CXXFLAGS_x86="{CXXFLAGS_x86} -mstackrealign"
Back to top
View user's profile Send private message
Wadlax
n00b
n00b


Joined: 12 Jan 2008
Posts: 9

PostPosted: Thu Jul 18, 2019 3:23 pm    Post subject: Reply with quote

BL2 and BL_TPS run again for me:

So, if you get error in dmesg like "error 4 in BorderlandsPreSequel" - try to delete your willowengine.ini
(location can be found via https://wiki.gentoo.org/wiki/Steam/Games_troubleshooting#Borderlands_2_and_Borderlands:_The_Pre-Sequel)
Back to top
View user's profile Send private message
spork_kitty
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2019
Posts: 123

PostPosted: Fri Jul 19, 2019 1:44 am    Post subject: Reply with quote

Wadlax wrote:
BL2 and BL_TPS run again for me:

So, if you get error in dmesg like "error 4 in BorderlandsPreSequel" - try to delete your willowengine.ini
(location can be found via https://wiki.gentoo.org/wiki/Steam/Games_troubleshooting#Borderlands_2_and_Borderlands:_The_Pre-Sequel)


Just a side note, for those of us like me who are particular or have otherwise customized their game. In my case, I re-enabled graphics features that are disabled by default, to give me the same graphic quality I have on Windows; sans the UHD Texture Pack ofc... I also swapped the console button icon prompts to use with my DualShock 3 when I'm feeling too lazy to kb+m instead of mentally translating Xbox -> Playstation. Stuff that took me hours to find, tweak, and test.

That stuff is usually in WillowGame.ini, but engine tweaks are in WillowEngine.ini. Instead of deleting, I suggest merely renaming the file so you can diff it against the one the game creates by default after the fact, and isolate what caused the breakage to begin with.
Back to top
View user's profile Send private message
mrbassie
l33t
l33t


Joined: 31 May 2013
Posts: 615

PostPosted: Wed Nov 27, 2019 11:28 am    Post subject: Reply with quote

PuckPoltergeist wrote:
I've had the same problem on my amdfam10 machine and after some search I found this: https://bugs.archlinux.org/task/54136

Stack alignment is the problem here too. I've identified the following packages need to be build with -mstackrealign:
Code:

sys-libs/glibc
x11-libs/libxcb
media-libs/openal
media-sound/pulseaudio


Unfortunately for glibc this means hacking the eclass. But after recompiling the packages Borderlands2 works again for me.


Ran into this
Code:
traps: portal2_linux[23942] general protection ip:f7cfa3c9 sp:ffcae5b8 error:0 in libc-2.29.so[f7c99000+166000]


rebuilding glibc with -mstackrealign fixed it.
Back to top
View user's profile Send private message
frostsnow
n00b
n00b


Joined: 07 Feb 2014
Posts: 20

PostPosted: Sun Sep 27, 2020 11:39 pm    Post subject: Reply with quote

I ran into similar problems getting "Borderlands 2" working, but advice in this thread helped fix it.

Code:
Profile: default/linux/amd64/17.1 (stable)
GCC: gcc (Gentoo 9.3.0-r1 p3) 9.3.0
glibc: glibc-2.31-r6


First, the game would instantly crash on launch without so much as a window pop-up. Steam produced the following suspect console output:

Code:
/home/frostsnow/steam/SteamApps/common/Borderlands 2/./Borderlands2: Symbol `_ZTVN10__cxxabiv120__si_class_type_infoE' has different size in shared object, consider re-linking
/home/frostsnow/steam/SteamApps/common/Borderlands 2/./Borderlands2: Symbol `_ZTVN10__cxxabiv117__class_type_infoE' has different size in shared object, consider re-linking
/home/frostsnow/steam/SteamApps/common/Borderlands 2/./Borderlands2: Symbol `_ZTVN10__cxxabiv121__vmi_class_type_infoE' has different size in shared object, consider re-linking

I then compared the Borderlands2 binary symbol definitions with the included 'libcxxrt.so' library, that installed by the 'libcxx' package, and also the default C++ package. I'm not particularly adept in this area, but it appeared that the Borderlands2 and included library had symbol sizes of 36 while 'libcxx' was 40 and the standard library was 44:

Code:
frostsnow@seneca ~/steam/SteamApps/common/Borderlands 2 $ ldd Borderlands2
        linux-gate.so.1 (0xf7f76000)
        libsteam_api.so => ./libsteam_api.so (0xf7f61000)
        libcrypto.so.1.0.0 => ./libcrypto.so.1.0.0 (0xf7db6000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xf7c39000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0xf7bcd000)
        libz.so.1 => /usr/lib/libz.so.1 (0xf7bb3000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xf7b92000)
        librt.so.1 => /lib/librt.so.1 (0xf7b87000)
        libdl.so.2 => /lib/libdl.so.2 (0xf7b81000)
        libm.so.6 => /lib/libm.so.6 (0xf7ab7000)
        libuuid.so.1 => /usr/lib/libuuid.so.1 (0xf7aad000)
        libc++.so.1 => ./libc++.so.1 (0xf7a01000)
        libcxxrt.so => ./libcxxrt.so (0xf79e2000)
        libc.so.6 => /lib/libc.so.6 (0xf7806000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/32/libgcc_s.so.1 (0xf77e9000)
        libiconv.so.2 => ./libiconv.so.2 (0xf7705000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/32/libstdc++.so.6 (0xf7486000)
        libssl.so.1.0.0 => ./libssl.so.1.0.0 (0xf7430000)
        libopenal.so.1 => /usr/lib/libopenal.so.1 (0xf72f5000)
        /lib/ld-linux.so.2 (0xf7f77000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xf72c7000)
        libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0xf724a000)
        libGLX.so.0 => /usr/lib/libGLX.so.0 (0xf720e000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xf7206000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xf71fe000)
        libbsd.so.0 => /usr/lib/libbsd.so.0 (0xf71df000)

frostsnow@seneca ~/steam/SteamApps/common/Borderlands 2 $ readelf -Ws Borderlands2 | grep ZTVN10
   730: 0a3d8960    36 OBJECT  GLOBAL DEFAULT   40 _ZTVN10__cxxabiv120__si_class_type_infoE
   773: 0a3d89b0    36 OBJECT  GLOBAL DEFAULT   40 _ZTVN10__cxxabiv117__class_type_infoE
   801: 0a3d8a40    36 OBJECT  GLOBAL DEFAULT   40 _ZTVN10__cxxabiv121__vmi_class_type_infoE

frostsnow@seneca ~/steam/SteamApps/common/Borderlands 2 $ readelf -Ws libcxxrt.so | grep ZTVN10
   101: 00019dd0    36 OBJECT  GLOBAL DEFAULT   20 _ZTVN10__cxxabiv120__si_class_type_infoE
   142: 00019980    36 OBJECT  GLOBAL DEFAULT   20 _ZTVN10__cxxabiv117__class_type_infoE
   537: 00019e10    36 OBJECT  GLOBAL DEFAULT   20 _ZTVN10__cxxabiv121__vmi_class_type_infoE

frostsnow@seneca ~/steam/SteamApps/common/Borderlands 2 $ readelf -Ws /usr/lib/libc++abi.so | grep ZTVN10
   197: 000329c4    40 OBJECT  WEAK   DEFAULT   19 _ZTVN10__cxxabiv120__si_class_type_infoE
   166: 0003299c    40 OBJECT  WEAK   DEFAULT   19 _ZTVN10__cxxabiv117__class_type_infoE
   295: 000329ec    40 OBJECT  WEAK   DEFAULT   19 _ZTVN10__cxxabiv121__vmi_class_type_infoE

frostsnow@seneca ~/steam/SteamApps/common/Borderlands 2 $ readelf -Ws /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/32/libstdc++.so.6 | grep ZTVN10
  2956: 00273aa4    44 OBJECT  WEAK   DEFAULT   21 _ZTVN10__cxxabiv120__si_class_type_infoE@@CXXABI_1.3
  2815: 002734ac    44 OBJECT  WEAK   DEFAULT   21 _ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3
   259: 00273b04    44 OBJECT  WEAK   DEFAULT   21 _ZTVN10__cxxabiv121__vmi_class_type_infoE@@CXXABI_1.3

Since it appeared that the Borderlands2 binary was incompatible with my system libraries, I disabled preloading of the system shared libraries in my Steam start-up script (preloading fixes the startup of other games...):
Code:
version="9.3.0"
#export LD_PRELOAD="/usr/lib/gcc/x86_64-pc-linux-gnu/${version}/32/libstdc++.so.6 /usr/lib/gcc/x86_64-pc-linux-gnu/${version}/libstdc++.so.6 /home/frostsnow/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6"

This allowed me to watch the Aspyr start-up movie, after which the game promptly crashed with the infamous:
Code:
[31847.895959] traps: Borderlands2[15447] general protection fault ip:f78aa189 sp:ffc27a74 error:0 in libc-2.31.so[f77ea000+1d5000]

After finding this thread I was able to skip the start-up movie by adding the follow to the Steam launch options for the game:
Code:
-nostartupmovie

This got me to the title screen where I could configure the game (including video settings, even), but when I hit "NEW GAME" the game once again crashed with the same error. Around here I tried recompiling libxcb as mentioned in https://www.gamersonlinux.com/forum/threads/steam-on-non-ubuntu-64bit.2404/ but it didn't help so I undid the changes. I then attached gdb to Borderlands2 and got the following stack trace:
Code:
Thread 1 "Borderlands2" received signal SIGSEGV, Segmentation fault.
0xf7846189 in ?? () from /lib/libc.so.6
(gdb) bt
#0  0xf7846189 in ?? () from /lib/libc.so.6
#1  0xf7845c5e in readdir () from /lib/libc.so.6
#2  0xf7846ca6 in ?? () from /lib/libc.so.6
#3  0xe02015be in snd_config_hook_load () from /usr/lib/libasound.so.2
#4  0xe0202236 in ?? () from /usr/lib/libasound.so.2
#5  0xe0202654 in ?? () from /usr/lib/libasound.so.2
#6  0xe0202938 in snd_config_update_r () from /usr/lib/libasound.so.2
#7  0xe0202ea0 in snd_config_update_ref () from /usr/lib/libasound.so.2
#8  0xe021c78f in snd_pcm_open () from /usr/lib/libasound.so.2
#9  0xf72eb06a in ?? () from /usr/lib/libopenal.so.1
#10 0xf72aebe7 in alcOpenDevice () from /usr/lib/libopenal.so.1
#11 0x094d4c4c in ?? ()
<SNIP> (all symbols appear to be missing)
#102 0x080ee0a6 in ?? ()
#103 0xf77a0e0d in __libc_start_main () from /lib/libc.so.6
#104 0x098408fd in ?? ()

I tried the following OpenAL re-compilation, but it did not help:
Code:
CFLAGS="-O1 -mstackrealign" CXXFLAGS="$CFLAGS" emerge -1 media-libs/openal

I then returned OpenAL to its original state and then tried the following glibc re-compilation and it seems to have fixed the issue:
Code:
CFLAGS="-mstackrealign" CXXFLAGS="$CFLAGS" emerge -1 glibc

So I've added that permanently in
Code:
/etc/portage/env/sys-libs/glibc
CFLAGS="-mstackrealign"
CXXFLAGS="$CFLAGS"

I believe that covers everything that I did in order to get it working.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16219

PostPosted: Mon Sep 28, 2020 1:04 am    Post subject: Reply with quote

You may wish to review your CFLAGS for glibc. I think your one-shot change replaced, rather than appended to, your regular flags. You probably want glibc compiled with optimizations, in addition to the stack hack you needed to get the game going.
Back to top
View user's profile Send private message
frostsnow
n00b
n00b


Joined: 07 Feb 2014
Posts: 20

PostPosted: Sun Oct 11, 2020 9:06 pm    Post subject: Reply with quote

Hu wrote:
You may wish to review your CFLAGS for glibc. I think your one-shot change replaced, rather than appended to, your regular flags. You probably want glibc compiled with optimizations, in addition to the stack hack you needed to get the game going.

Thanks for the heads up. I did a one-shot and confirmed that my regular flags were missing:
Code:
x86_64-pc-linux-gnu-gcc -m32 -mstackrealign -O2 -Wl,-O1 -Wl,--as-needed init-first.c -c -std=gnu11 -fgnu89-inline  -mstackrealign -O2 -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math -fstack-protector-strong -Wstrict-prototypes -Wold-style-definition -fmath-errno   -fPIC -fno-stack-protector -DSTACK_PROTECTOR_LEVEL=0 -Wa,-mtune=i686    -ftls-model=initial-exec   -U_FORTIFY_SOURCE   -I../include -I/var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/csu  -I/var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl  -I../sysdeps/unix/sysv/linux/i386/i686  -I../sysdeps/i386/i686/nptl  -I../sysdeps/unix/sysv/linux/i386  -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/x86/nptl  -I../sysdeps/i386/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/i386  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/i386/i686/fpu/multiarch  -I../sysdeps/i386/i686/fpu  -I../sysdeps/i386/i686/multiarch  -I../sysdeps/i386/i686  -I../sysdeps/i386/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu  -I../sysdeps/i386  -I../sysdeps/x86  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/float128  -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed -isystem /usr/include  -D_LIBC_REENTRANT -include /var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC -DSHARED     -DTOP_NAMESPACE=glibc -o /var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/init-first.os -MD -MP -MF /var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/init-first.os.dt -MT /var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/init-first.os

I changed the file '/etc/portage/env/sys-libs/glic' file as such:
Code:
CFLAGS="${CFLAGS} -mstackrealign"
CXXFLAGS="$CFLAGS"

This seems to have worked, but for some odd reason '-mstackrealign' now appears twice in the compilation output:
Code:
x86_64-pc-linux-gnu-gcc -m32 -pipe -march=native -mstackrealign -mstackrealign -O2 -Wl,-O1 -Wl,--as-needed init-first.c -c -std=gnu11 -fgnu89-inline  -pipe -march=native -mstackrealign -mstackrealign -O2 -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math -fstack-protector-strong -Wstrict-prototypes -Wold-style-definition -fmath-errno   -fPIC -fno-stack-protector -DSTACK_PROTECTOR_LEVEL=0 -Wa,-mtune=i686    -ftls-model=initial-exec   -U_FORTIFY_SOURCE   -I../include -I/var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/csu  -I/var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl  -I../sysdeps/unix/sysv/linux/i386/i686  -I../sysdeps/i386/i686/nptl  -I../sysdeps/unix/sysv/linux/i386  -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/x86/nptl  -I../sysdeps/i386/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/i386  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/i386/i686/fpu/multiarch  -I../sysdeps/i386/i686/fpu  -I../sysdeps/i386/i686/multiarch  -I../sysdeps/i386/i686  -I../sysdeps/i386/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu  -I../sysdeps/i386  -I../sysdeps/x86  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/float128  -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include-fixed -isystem /usr/include  -D_LIBC_REENTRANT -include /var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC -DSHARED     -DTOP_NAMESPACE=glibc -o /var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/init-first.os -MD -MP -MF /var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/init-first.os.dt -MT /var/tmp/portage/sys-libs/glibc-2.31-r6/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/init-first.os

It doesn't seem to harm anything, but it's rather odd and ugly.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum