Summary: | patches to build with gcc-2.96 on Red Hat Linux 7.1 | ||
---|---|---|---|
Product: | poppler | Reporter: | William Bader <williambader> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED NOTABUG | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | williambader |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | patches to build with gcc-2.96 on Red Hat Linux 7.1 |
Description
William Bader
2011-02-09 20:49:04 UTC
I doubt we are interesting in adding extra cruft to our code to support something that is 10 years old. >I doubt we are interesting in adding extra cruft
OK. If you want, I can resubmit two of the changes that might be useful for other systems and do not refer to gcc parts with just the patches for TiffWriter.cc and the patches to XRef.cc (modified to use [] instead of at() in all cases instead of checking the glibc version).
The RH7 system is one of my oldest build servers. I still have some old systems to support. I compile C programs with gcc-4.4.5, but for C++, I need to use the old RH7 gcc so that I don't have to rebuild and distribute all of the libraries. RH7 generates incorrect code for poppler (and for xpdf) unless I compile with -O0.
If anyone needs to do a build on an old system, this is what I built, in the order that I built it:
m4-1.4.15
autoconf-2.68
automake-1.11.1
libtool-2.4
gettext-0.18.1.1
pkg-config-0.25
freetype-2.4.4
fontconfig-2.8 (configure with HASDOCBOOK=no, comment "DOCSRC = doc" in Makefile, link with -Wl,-rpath,/usr/local/lib/ to avoid picking up the older freetype in /usr/lib)
poppler (compile with -O0, link with -Wl,-rpath,/usr/local/lib/)
I am confused by the [] -> at() change. I very much doubt this has nothing to do with glibc since std::vector is not in the "C library" but in the "C++ library", right? >I am confused by the [] -> at() change. I very much doubt this has nothing to
do with glibc since std::vector is not in the "C library" but in the "C++
library", right?
Yes, RedHat Linux 7.1 has version 3 of the gnu g++ library, and it contains a 1996 version of STL. As far as I can tell, it does not make any version numbers available as macros. I searched all of the files in /usr/include/g++-3. If you have suggestions of what to test for, I can check the files.
I was thinking to replace at() with [] unconditionally. It should be safe because at() is used in only two loops, and the upper limit of both loops is the size() of the vector, so the bounds check provided by at() shouldn't be necessary.
Personally i don't think we should commit any of these patches since those products are too old that i would say they are unsupported. But if you really disagree please mail the poppler mailing list and see if you can find any other supporter. Meanwhile i will close the bug and we can reopen it if the majority thinks it is worth supporting such old setups. >i don't think we should commit any of these patches
That is ok. The RH 7.1 system was my oldest server, and I was using it to do builds that could run on all of the servers, but since its old gcc-2.96 generated bad code unless I compiled with -O0, and since pdftops is cpu intensive, it wouldn't make sense to run the unoptimized RH 7.1 pdftops on a newer system.
My second oldest build server has CentOS 4.8, and poppler builds on it without problems.
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.