LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 08-13-2013, 09:35 PM   #1
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
glibc-2.18 and acroread


As I've mentioned in other posts, I track the SVN branches of both LFS and BLFS. Being on the bleeding edge, things sometimes go awry but the challenge comes from repairing the damage and learning from it.

With the release of glibc-2.18 recently and now making the Changelog of LFS-SVN, I opted to build it, run make check (just the expected errors) and then go ahead and install it.

Absolute everything is working fine with the sole exception of acroread, which segfaults immediately. Rolling back to the predecessor, 2.17, resolves this error. By the way, even though the command line reader fails with that error the broswer plugin works fine with glibc-2.18.

I run a multilib system and, of course, acroread is among the tiny handful of 32-bit apps on what is largely a 64-bit platform. I know I built the 32-bit variant correctly since other 32-bit apps, such as wine work faultlessly.

Has anyone else experienced errors after migrating to glibc-2.18 with acroread or anything else?

Last edited by re_nelson; 08-13-2013 at 09:38 PM.
 
Old 08-14-2013, 12:49 PM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Can't say I have as I run a pure 64-bit OS and don't use Acroread myself, but have you submitted an inquiry to Adobe regarding the bug?

Have you tried checking to see if a logfile is create for Acroread and if there's a possible chance it is looking for a specific file from glibc-2.17 that may have a version control number that 2.18 might not have? I've ran into this before as a compatibility issue with some closed-source software only to discover I had to create a sym-link to a file before it would read it and work. After creating it, the software worked as normal.

I've defaulted due to my 64-bit architecture with xPDF for now.
 
Old 08-14-2013, 01:00 PM   #3
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Can't say I have as I run a pure 64-bit OS and don't use Acroread myself, but have you submitted an inquiry to Adobe regarding the bug?
With glibc-2.18 being so new, I've opted to take a wait and see stance for now which is the reason for posting the initial message. I wanted to get at least one other confirmation to make sure it's not just peculiar to my system. And with Adobe largely dismissing Linux as a second class platform, odds are that a bug report for a new glibc library wouldn't be of much interest.

And, along the lines that you mentioned, acroread is far less important to me than it used to be. KDE's okular has really matured nicely and is now my go-to application for PDF as well as DVI and other file formats.
 
Old 08-14-2013, 08:40 PM   #4
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I've come across few instances where a simple version-up of glibc did posed major issues with compatibility. Usually, it's a missing sym-link, or often it could be a rouge compile flag, missing compatibility patch, or some other not-yet-determined issue at hand, but usually those are found quickly enough.

Yes, Adobe does foolishly pass-off UNIX and UNIX-like systems, with the exception of Apple OS-X which they oh-so-willingly brown-nose.

For now, unless absolutely needed, I'd recommend rolling back to 2.17 if you have to have the compatibility, otherwise, find alternatives that work just as well, if not better, and choose them.
 
Old 08-14-2013, 09:28 PM   #5
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
For now, unless absolutely needed, I'd recommend rolling back to 2.17 if you have to have the compatibility, otherwise, find alternatives that work just as well, if not better, and choose them.
I've explored this a bit more and have a few very preliminary conclusions. On a somewhat dated LFS system that I have on VirtualBox, acroread works fine with the new glibc-2.18. That system is a pure 32-bit platform which is one difference between it and my everyday work multilib environment. And, perhaps significantly, given the age of that LFS system (circa spring 2012), the compiler is gcc-4.6.3 whereas my primary system uses gcc-4.8.1. Also of possible relevance is that the former system uses kernel 3.9.5.

I'm going to explore this further by building glibc-2.18 with gcc-4.8.1 on that pure 32-bit, slightly older system to see what happens. Then, I'll upgrade the kernel as well.

Whatever happens, it's a great learning experience and I'll post my findings here. After over a decade of "scratching", I've not yet encountered a situation that hasn't been resolved...with some time and effort.

Thanks for the response and, off topic for this thread, your interest in OpenRC, has also triggered a similar interest with me. Now that I've successfully converted all of the boot scripts to dash, the next challenge will be to explore OpenRC.
 
Old 08-15-2013, 03:55 AM   #6
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by re_nelson View Post
Whatever happens, it's a great learning experience and I'll post my findings here.
This is turning out to be really "interesting". Here are my findings:

1). On a multilib LFS-SVN VirtualBox system (emulating an i2-core) with 10 GB of RAM allocated with 12 GB of swap, the new glibc-2.18 works perfectly with all 64-bit applications tried and with all 32-bit applications, including acroread. The VirtualBox system pretty much shadows what I do on the real platform, an i7-3770K with 32 GB of real RAM and 12 GB of swap.

2). But on the real systems, including a pure 32-bit LFS-7.2 system and my primary LFS-SVN multilib system, glibc-2.18 always fails with acroread producing this fault caught by the kernel:

Code:
traps: acroread[26064] general protection ip:b5b660e3 sp:bf9a0094 error:0 in libc-2.18.so[b5a37000+1a8000]
Running strace reveals that the SIGSEGV happens right after a call to brk().

Rolling back to the immediate predecessor version (glibc-2.17) produces no errors on either the pure 32-bit platform or the multilib system.

3). And here's where it gets even more puzzling. When I build glibc-2.18 on the real system and then transport it over to the VirtualBox guest, everything works fine. This indicates that the compile is good on the host. But, conversely, when glibc-2.18 as compiled on the guest where it works without fault and then transported back to the host, the general protection fault cited above occurs.

Based on my experiments, the indications are that 32-bit glibc-2.18 (built with no CFLAGS) is somehow incompatible with my hardware:

ASUS P8Z77-V LX
Ivy Bridge i7-3770K LGA 1155
4 modules (32 GB) of 8192MB 1333MHz Synchronous DDR3 DIMM, AMI CMX8GX3M1A1333C9

I plan to explore this further and any more "try this, try that" suggestions are welcome. Oh, by the way, the only two errors I get with "make check" on glibc-2.18 are:

Code:
make[2]: [/usr/src/sources-lfs3/glibc-build/posix/annexc.out]
make[2]: [/usr/src/sources-lfs3/glibc-build/conform/run-conformtest.out]
 
Old 08-16-2013, 12:40 PM   #7
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by re_nelson View Post
Based on my experiments, the indications are that 32-bit glibc-2.18 (built with no CFLAGS) is somehow incompatible with my hardware:

ASUS P8Z77-V LX
Ivy Bridge i7-3770K LGA 1155
4 modules (32 GB) of 8192MB 1333MHz Synchronous DDR3 DIMM, AMI CMX8GX3M1A1333C9
First of all, the problem with 32-bit applications and glibc-2.18 is not just limited to acroread. A numerically intensive antenna modeling tool, 4nec also segfaults. That motivated me to pursue the matter of that current GNU system library and my hardware with more zeal.

Taking a cue from the glibc.SlackBuild which uses an i486 triplet for building, I did likewise, passing the following to configure:

Code:
--host=i486-pc-linux
And that resolved the problem of segfaults on 32-bit apps. Later I change the triplet to i586-pc-linux and it was still good. The error occurs with the i686-pc-linux triplet (the default if unspecified).

Watching the build process, the host triplet governs which system dependent source is used for glibc. Its subdirectory tree is structured as "i386/{i486,i586,i686}" for such system dependencies, most of which is written in assembly. Backing off from the i686 arch to a more conservative i586 or i486 hauls in less aggressive code at compile time. I've not narrowed down which file(s) might be the culprit opting to stick with i586 since it "works for me!" [TM]

Note that I can pass aggressive CFLAGS to the build:
Code:
-O3 -march=native
with no ill-effect. Methinks that the i7-3770K isn't compatible with one or more of the instruction in the "i386/i686" assembly code but "i386/i586" works without fault.

I'll let the glibc maintainers know of my findings. They may want me to perform some tests on that platform to narrow down the precise cause.
 
Old 08-18-2013, 07:32 AM   #8
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Slackware defaults to i486 for a lot of compatibility reasons. Stick to i486 and you should be fine.

Quote:
-O3 -march=native
I would argue against using the -O3 flag and instead use -O2 flag for stability and compatibility reasons.

Last edited by ReaperX7; 08-18-2013 at 07:33 AM.
 
Old 08-18-2013, 12:12 PM   #9
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Slackware defaults to i486 for a lot of compatibility reasons. Stick to i486 and you should be fine.
I would argue against using the -O3 flag and instead use -O2 flag for stability and compatibility reasons.
Here's how the story unfolds further and ultimately has a happy ending. Contrary to conventional wisdom, using "-O3" for optimization actually fixes the problem. No, it's not just gratuitous "ricing" but by doing so, one of the problematical functions is then inlined. Along with a dose of trial and error followed by some additional reading, this thread from Arch confirmed my findings:

https://bugs.archlinux.org/task/36556?project=1

And here's the trivial patch which adds the inline keyword to the function:

Code:
diff --git a/sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86_64/multiarch/strstr.c
index cd63b68..03d8b9a 100644
--- a/sysdeps/x86_64/multiarch/strstr.c
+++ b/sysdeps/x86_64/multiarch/strstr.c
@@ -86,7 +86,7 @@
 /* Simple replacement of movdqu to address 4KB boundary cross issue.
    If EOS occurs within less than 16B before 4KB boundary, we don't
    cross to next page.  */
-static __m128i
+static inline __m128i
 __m128i_strloadu (const unsigned char * p, __m128i zero)
 {
   if (__builtin_expect ((int) ((size_t) p & 0xfff) > 0xff0, 0))
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem installing glibc-2.3.2-4.80.i686, glibc-common-2.3.2-4.80.8.i386.rpm martianpackets Red Hat 8 05-01-2009 03:22 PM
glibc-compiling loves to make errors? ok, let me post mine here: glibc 2.9 me-$-on Linux From Scratch 7 04-11-2009 06:22 PM
Where is acroread, mozilla-acroread, and acroread-plugins? Red Knuckles Ubuntu 2 02-09-2007 04:23 PM
sudo apt-get install acroread returns "Couldn't find package acroread" swiadek Ubuntu 3 02-13-2006 10:52 AM
Replacing glibc using linuxthreads for glibc using nptl (native positx thread library CestusGW Linux From Scratch 4 01-20-2005 07:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration