From john.dallman at siemens.com Tue Feb 20 14:11:20 2018 From: john.dallman at siemens.com (Dallman, John) Date: Tue, 20 Feb 2018 14:11:20 +0000 Subject: [lsb-discuss] Bug in LSB 5.0 SDK, I think Message-ID: /opt/lsb/lib64-5.0/libgcc_s.so.1 does not provide __gcc_personality_v0, which is causing all my attempts to link the product I work on with LSBCC to fail. The product is written in a domain-specific language which generates C code, using it as a kind of high-level assembly language. This symbol is present in the system libgcc_s.so on this CentOS 7.2 system: $ readelf -sW /usr/lib64/libgcc_s-4.8.5-20150702.so.1 | grep gcc_personality 163: 0000000000011e20 620 FUNC GLOBAL DEFAULT 12 __gcc_personality_v0@@GCC_3.3.1 Note that this is __gcc_personality_v0, for C code, not __g++_personality_v0 which is for C++ code. References to __gcc_personality_v0 are only emitted in .o files when one compiles C code with the -fexceptions option, to allow C++ exceptions to be thrown through C stack frames. That's presumably how this sneaked through testing. I have lsb-sdk-5.0.0-3.x86_64.tar.gz, which seems to be the latest available. Any chance of a fix? Is there a way for me to fix it myself? Thanks, -- John Dallman ----------------- Siemens Industry Software Limited is a limited company registered in England and Wales. Registered number: 3476850. Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD. From mats at wichmann.us Tue Feb 20 14:39:32 2018 From: mats at wichmann.us (Mats Wichmann) Date: Tue, 20 Feb 2018 07:39:32 -0700 Subject: [lsb-discuss] Bug in LSB 5.0 SDK, I think In-Reply-To: References: Message-ID: On 02/20/2018 07:11 AM, Dallman, John wrote: > /opt/lsb/lib64-5.0/libgcc_s.so.1 does not provide __gcc_personality_v0, which is causing all my attempts to link the product I work on with LSBCC to fail. The product is written in a domain-specific language which generates C code, using it as a kind of high-level assembly language. > > This symbol is present in the system libgcc_s.so on this CentOS 7.2 system: > > $ readelf -sW /usr/lib64/libgcc_s-4.8.5-20150702.so.1 | grep gcc_personality > 163: 0000000000011e20 620 FUNC GLOBAL DEFAULT 12 __gcc_personality_v0@@GCC_3.3.1 > > Note that this is __gcc_personality_v0, for C code, not __g++_personality_v0 which is for C++ code. > > References to __gcc_personality_v0 are only emitted in .o files when one compiles C code with the -fexceptions option, to allow C++ exceptions to be thrown through C stack frames. That's presumably how this sneaked through testing. > > I have lsb-sdk-5.0.0-3.x86_64.tar.gz, which seems to be the latest available. Any chance of a fix? Is there a way for me to fix it myself? > > Thanks, It's indeed missing. (by the way - did you actually mean g++_personality_v0? we have gxx_personality_v0 in our database) This isn't anything I'm familiar with - we need to get a bugzilla filed and sort it out. In the meantime, if you want to build your own libgcc_s.so it should be a pretty simple patch to add this symbol - obviously on an unsupported basis, etc (not that we're able to do much in the way of "support" anyway). The change to build_env source would look like this for just the one architecture, you'd have to repeat if if you need others: === modified file 'stub_libs/5.0/x86-64/libgcc_s.Version' --- stub_libs/5.0/x86-64/libgcc_s.Version revid:mats at linuxfoundation.org-20170424152416-mexuq1nhgpi0fz6x +++ stub_libs/5.0/x86-64/libgcc_s.Version 2018-02-20 14:37:04 +0000 @@ -20,6 +20,9 @@ _Unwind_GetCFA; _Unwind_Resume_or_Rethrow; }; +GCC_3.3.1 { + __gcc_personality_v0; +}; GCC_4.2.0 { _Unwind_GetIPInfo; }; === modified file 'stub_libs/5.0/x86-64/libgcc_s.c' --- stub_libs/5.0/x86-64/libgcc_s.c revid:mats at linuxfoundation.org-20170424152416-mexuq1nhgpi0fz6x +++ stub_libs/5.0/x86-64/libgcc_s.c 2018-02-20 14:36:31 +0000 @@ -16,3 +16,4 @@ void _Unwind_Resume_or_Rethrow() {} ; void _Unwind_SetGR() {} ; void _Unwind_SetIP() {} ; +void __gcc_personality_v0() {} ; From john.dallman at siemens.com Tue Feb 20 14:52:03 2018 From: john.dallman at siemens.com (Dallman, John) Date: Tue, 20 Feb 2018 14:52:03 +0000 Subject: [lsb-discuss] Bug in LSB 5.0 SDK, I think In-Reply-To: References: Message-ID: > (by the way - did you actually mean g++_personality_v0? we have > gxx_personality_v0 in our database) You're right: it is __gxx_personality_v0@@CXXABI_1.3, in libstdc++.so.6 > This isn't anything I'm familiar with - we need to get a bugzilla filed > and sort it out. OK, I'll try to do that. > In the meantime, if you want to build your own libgcc_s.so it should be > a pretty simple patch to add this symbol ... I'll see if I can find someone who speaks that language. I've never actually worked with patch and rebuilding open-source projects. -- John Dallman ----------------- Siemens Industry Software Limited is a limited company registered in England and Wales. Registered number: 3476850. Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD. From mats at wichmann.us Tue Feb 20 15:30:10 2018 From: mats at wichmann.us (Mats Wichmann) Date: Tue, 20 Feb 2018 08:30:10 -0700 Subject: [lsb-discuss] Bug in LSB 5.0 SDK, I think In-Reply-To: References: Message-ID: On 02/20/2018 07:52 AM, Dallman, John wrote: >> In the meantime, if you want to build your own libgcc_s.so it should be >> a pretty simple patch to add this symbol ... > > I'll see if I can find someone who speaks that language. I've never actually > worked with patch and rebuilding open-source projects. I can send you the library if you like, just takes a moment to build here. Are there particular architecture/lsbversion pairs that are important to your doing an experiment? From john.dallman at siemens.com Tue Feb 20 16:05:20 2018 From: john.dallman at siemens.com (Dallman, John) Date: Tue, 20 Feb 2018 16:05:20 +0000 Subject: [lsb-discuss] Bug in LSB 5.0 SDK, I think In-Reply-To: References: Message-ID: > I can send you the library if you like, just takes a moment to build > here. Are there particular architecture/lsbversion pairs that are > important to your doing an experiment? That would be extremely kind. I'm using x86-64 with LSB 5.0. You may have trouble getting binaries through our mail filter: if I don?t respond to a mail with an attachment, send me a plain mail, and I'll try to get the Siemens file-transfer setup activated. Thanks, -- John Dallman ----------------- Siemens Industry Software Limited is a limited company registered in England and Wales. Registered number: 3476850. Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD.