[WORKAROUND] build with -fprofile-generate
#11
Hum this error happen in this condition:
1/ wx3.0
2/ plugin zzogl

I thinks it is related to -fpic but didn't have time to test.
Reply

Sponsored links

#12
(08-28-2014, 07:58 PM)gregory Wrote: Hum this error happen in this condition:
1/ wx3.0
2/ plugin zzogl

I thinks it is related to -fpic but didn't have time to test.

PCSX2 is dynamically linking (not quite) too many libraries; when using -fprofile-generate it somehow goes over the edge (perhaps the number of links is multiplied by linking to lgcov? no idea how to debug this; tried everything I knew).

I worked around the excessive dynamic library linking by modifying lib32-glibc.

I doubled the DTV surplus:
Code:
--- glibc-2.19/sysdeps/generic/ldsodefs.h~    2014-02-07 18:04:38.000000000 +0900
+++ glibc-2.19/sysdeps/generic/ldsodefs.h    2014-08-28 14:32:24.603957677 +0900
@@ -392,7 +392,7 @@
#define TLS_SLOTINFO_SURPLUS (62)

/* Number of additional slots in the dtv allocated.  */
-#define DTV_SURPLUS    (14)
+#define DTV_SURPLUS    (28)

   /* Initial dtv of the main thread, not allocated with normal malloc.  */
   EXTERN void *_dl_initial_dtv;

You might want to revert lib32-glibc after completing the profiled build of pcsx2. This would only affect 32bit programs, and I haven't noticed any trouble, but it doesn't seem like the kind of hack that's going to have long-term benefits.
Reply
#13
Hum, maybe plugins duplicate the lib. I mean let's take libzzogl as an example. As you can see it is linked against wx
Code:
ldd bin/plugins/libzzogl-0.4.0.so | g wx
    libwx_baseu-2.8.so.0 => /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0 (0xf55ac000)
    libwx_gtk2u_core-2.8.so.0 => /usr/lib/i386-linux-gnu/libwx_gtk2u_core-2.8.so.0 (0xf520e000)
    libwx_gtk2u_adv-2.8.so.0 => /usr/lib/i386-linux-gnu/libwx_gtk2u_adv-2.8.so.0 (0xf5148000)
But PCSX2 is also linked against wx (don't worry for the version they must be same, just my dev workarea)
Code:
ldd bin/pcsx2 | g wx                    
    libwx_baseu-3.0.so.0 => /usr/lib/i386-linux-gnu/libwx_baseu-3.0.so.0 (0xf74b7000)
    libwx_gtk2u_core-3.0.so.0 => /usr/lib/i386-linux-gnu/libwx_gtk2u_core-3.0.so.0 (0xf6ed2000)
    libwx_gtk2u_adv-3.0.so.0 => /usr/lib/i386-linux-gnu/libwx_gtk2u_adv-3.0.so.0 (0xf6d18000)

Edit: did you try to build plugins with -fpic ?
Reply
#14
Please check this change https://github.com/PCSX2/pcsx2/pull/386

It might help to fix the TLS issue.
Reply




Users browsing this thread: 1 Guest(s)