Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 639108 - =sci-misc/boinc-7.8.1: clientgui/AsyncRPC.cpp:23:21: fatal error: xlocale.h: No such file or directory
Summary: =sci-misc/boinc-7.8.1: clientgui/AsyncRPC.cpp:23:21: fatal error: xlocale.h: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Eden
URL:
Whiteboard: ~arch only
Keywords: PATCH
Depends on:
Blocks: xlocale.h
  Show dependency tree
 
Reported: 2017-11-28 20:08 UTC by Fabio Scaccabarozzi
Modified: 2018-04-28 18:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add guard for xlocale.h to AsyncRPC.cpp. (add-missing-xlocale.h-guard.patch,655 bytes, patch)
2017-11-28 20:08 UTC, Fabio Scaccabarozzi
Details | Diff
Remove xlocale.h, it was never needed anyway (fix_xlocale.patch,1.90 KB, patch)
2017-12-19 07:47 UTC, Sven Eden
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Scaccabarozzi 2017-11-28 20:08:48 UTC
Created attachment 507022 [details, diff]
Add guard for xlocale.h to AsyncRPC.cpp.

=sys-libs/glibc-2.26 dropped xlocale.h support.
Boinc fails to compile without the attached patch.
Note that the patch might not be 100% correct. I added a guard based on HAVE_XLOCALE_H - which seems has been adopted in the rest of the codebase - and kept the rest of #if in AND. I think the patch can be simplified to have the replacement guard read "#ifdef HAVE_XLOCALE_H".
Comment 1 Ilja ”Zucca” Sara 2017-11-30 14:49:24 UTC
The patch fixes the compilation ussues, but strangely I then get a segfault when running boinc...

$ boinc
30-Nov-2017 16:47:40 [---] cc_config.xml not found - using defaults
30-Nov-2017 16:47:59 [---] Starting BOINC client version 7.8.1 for x86_64-pc-linux-gnu
30-Nov-2017 16:47:59 [---] log flags: file_xfer, sched_ops, task
30-Nov-2017 16:47:59 [---] Libraries: libcurl/7.56.1 OpenSSL/1.0.2m zlib/1.2.11 libidn2/2.0.4 libssh2/1.8.0
30-Nov-2017 16:47:59 [---] Data directory: /home/zucca
execv: No such file or directory
30-Nov-2017 16:47:59 [---] GPU detection failed. error code 512
30-Nov-2017 16:47:59 [---] No usable GPUs found
30-Nov-2017 16:47:59 getaddrinfo(wren): Name or service not known30-Nov-2017 16:47:59 [---] Host name: wren
30-Nov-2017 16:47:59 [---] Processor: 8 AuthenticAMD AMD FX(tm)-8350 Eight-Core Processor [Family 21 Model 2 Stepping 0]
30-Nov-2017 16:47:59 [---] Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
30-Nov-2017 16:47:59 [---] OS: Linux Gentoo: Gentoo Base System release 2.4.1 [4.13.15-gentoo-wren]
30-Nov-2017 16:47:59 [---] Memory: 31.39 GB physical, 13.95 GB virtual
30-Nov-2017 16:47:59 [---] Disk: 1.05 TB total, 477.57 GB free
30-Nov-2017 16:47:59 [---] Local time is UTC +2 hours
30-Nov-2017 16:47:59 [---] No general preferences found - using defaults
30-Nov-2017 16:47:59 [---] Preferences:
30-Nov-2017 16:47:59 [---]    max memory usage when active: 16070.65 MB
30-Nov-2017 16:47:59 [---]    max memory usage when idle: 28927.17 MB
30-Nov-2017 16:47:59 [---]    max disk usage: 561.96 GB
30-Nov-2017 16:47:59 [---]    don't use GPU while active
30-Nov-2017 16:47:59 [---]    suspend work if non-BOINC CPU load exceeds 25%
30-Nov-2017 16:47:59 [---]    (to change preferences, visit a project web site or select Preferences in the Manager)
30-Nov-2017 16:47:59 [---] This computer is not attached to any projects
30-Nov-2017 16:47:59 [---] Visit http://boinc.berkeley.edu for instructions
30-Nov-2017 16:47:59 Initialization completed
SIGSEGV: segmentation violation
Stack trace (11 frames):
boinc[0x47f265]
/lib64/libpthread.so.0(+0x14620)[0x7f89df824620]
/lib64/libc.so.6(opendir+0x14)[0x7f89deb9f684]
boinc[0x471c4e]
boinc[0x472e6c]
boinc[0x472d4a]
boinc[0x419dd8]
boinc[0x458d8a]
boinc[0x45919b]
/lib64/libc.so.6(__libc_start_main+0xf1)[0x7f89deaf9041]
boinc[0x407d6a]

Exiting...

...

I'm not sure if this is related to this at all, but thought to inform it here.
At least with earlier glibc boinc ran without problems.
Comment 2 Fabio Scaccabarozzi 2017-12-01 21:18:39 UTC
(In reply to Ilja ”Zucca” Sara from comment #1)
> The patch fixes the compilation ussues, but strangely I then get a segfault
> when running boinc...
[...]
> 
> I'm not sure if this is related to this at all, but thought to inform it
> here.
> At least with earlier glibc boinc ran without problems.

I just tested it on my machine (same command, empty boinc config as below) and here it works, maybe it's not related to this.
Comment 3 Sven Eden 2017-12-06 11:46:49 UTC
From https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
 > The nonstandard header xlocale.h has been removed in this release. It was
 > never intended to be included directly by programs other than glibc itself,
 > and it was a strict subset of the standard header locale.h.

Nicely enough this means, that you can exchange "xlocale.h" for "locale.h", and it works. No matter the glibc version.

So the appropriate patch would be to remove xlocale.h altogether and include locale.h instead.
 => I'll test that.
Comment 4 Sven Eden 2017-12-19 07:47:00 UTC
Created attachment 510856 [details, diff]
Remove xlocale.h, it was never needed anyway

First: Sorry for the long delay. I am working on fixing bug 640822 - which is rather urgent, and wanted to add the commit with the fix for this one to the PR for the other.
But as it will need a while longer than expected, I'll upload the patch here for the time being.

xlocale.h was never actually needed by anybody. It is just a subset of locale.h, and was never meant to be used directly.

This patch removes its usage altogether, and boinc both merges and works fine after applying this patch.
Comment 5 Larry the Git Cow gentoo-dev 2017-12-27 11:56:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36450a88d1529f5ee657e7dc328c9a98a7367706

commit 36450a88d1529f5ee657e7dc328c9a98a7367706
Author:     Sven Eden <yamakuzure@gmx.net>
AuthorDate: 2017-12-24 14:31:32 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2017-12-27 11:56:04 +0000

    sci-misc/boinc: Remove xlocale.h usage, fixes bug 639108
    
    >=sys-libs/glibc-2.26 dropped xlocale.h support.
    
    From https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
     > The nonstandard header xlocale.h has been removed in this release. It was
     > never intended to be included directly by programs other than glibc itself,
     > and it was a strict subset of the standard header locale.h.
    
    This commit removes the inclusion of xlocale.h, and substitutes it with
    locale.h where necessary.
    
    Tested-by: Sven Eden <yamakuzure@gmx.net>
    Bug: https://bugs.gentoo.org/639108
    Closes: https://bugs.gentoo.org/639108
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sci-misc/boinc/boinc-7.8.4.ebuild      |  2 ++
 sci-misc/boinc/files/fix_xlocale.patch | 42 ++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36450a88d1529f5ee657e7dc328c9a98a7367706

commit 36450a88d1529f5ee657e7dc328c9a98a7367706
Author:     Sven Eden <yamakuzure@gmx.net>
AuthorDate: 2017-12-24 14:31:32 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2017-12-27 11:56:04 +0000

    sci-misc/boinc: Remove xlocale.h usage, fixes bug 639108
    
    >=sys-libs/glibc-2.26 dropped xlocale.h support.
    
    From https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
     > The nonstandard header xlocale.h has been removed in this release. It was
     > never intended to be included directly by programs other than glibc itself,
     > and it was a strict subset of the standard header locale.h.
    
    This commit removes the inclusion of xlocale.h, and substitutes it with
    locale.h where necessary.
    
    Tested-by: Sven Eden <yamakuzure@gmx.net>
    Bug: https://bugs.gentoo.org/639108
    Closes: https://bugs.gentoo.org/639108
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sci-misc/boinc/boinc-7.8.4.ebuild      |  2 ++
 sci-misc/boinc/files/fix_xlocale.patch | 42 ++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)}