You are not logged in.

#1 2013-03-05 15:05:27

seahawk1986
Member
Registered: 2012-12-16
Posts: 6

[Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

Hello,
I need debugging symbols for /usr/lib/libgcc_s.so.1 and some other shared libraries built from the gcc source to see what happens in a backtrace created with gdb for a C++ program. So I followed https://wiki.archlinux.org/index.php/De … #Using_ABS.
Compiling gcc fails because of a unsolved problem related to texinfo 5.x (https://bugs.archlinux.org/task/34000?p … om=-1+week)

Also the PKGBUILD indicates that using "-pipe" is not reccommended:

# using -pipe causes spurious test-suite failures
  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
  CFLAGS=${CFLAGS/-pipe/}
  CXXFLAGS=${CXXFLAGS/-pipe/}

What is the best practise to get debug symbols for this shared lib?

Last edited by seahawk1986 (2013-03-06 15:11:13)

Offline

#2 2013-03-05 15:32:56

brebs
Member
Registered: 2007-04-03
Posts: 3,412

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

FWIW, I compiled gcc-4.7.2-20130216 (from snapshots dir) with texinfo 5 - but this was not in Arch.

Offline

#3 2013-03-05 18:24:16

seahawk1986
Member
Registered: 2012-12-16
Posts: 6

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

I tried to compile this version and the latest snapshot 4.7-20130302 but I still get the same error.

Offline

#4 2013-03-05 19:18:22

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 998

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

I have put a texinfo-legacy lib into AUR.

Offline

#5 2013-03-05 20:03:53

brebs
Member
Registered: 2007-04-03
Posts: 3,412

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

koji has texinfo patches to try, e.g. the parser patch.

I'm still on texlive 2010, maybe that's the reason mine worked (with texinfo 5 unpatched).

Offline

#6 2013-03-05 21:24:45

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,394
Website

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

It is a single line sed to fix this...

Offline

#7 2013-03-05 21:25:09

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,394
Website

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

brebs wrote:

I'm still on texlive 2010, maybe that's the reason mine worked (with texinfo 5 unpatched).

texlive has nothing to do with it...   you compiled a snapshot with the texinfo fix.

Offline

#8 2013-03-05 21:28:01

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,394
Website

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

seahawk1986 wrote:

Hello,
I need debugging symbols for /usr/lib/libgcc_s.so.1 and some other shared libraries built from the gcc source to see what happens in a backtrace created with gdb for a C++ program.

<snip>...

What is the best practise to get debug symbols for this shared lib?

It is very likely that you do not need that at all, but if you really do you could have achieved this quickly by commenting out

  # make documentation
  cd $CHOST/libstdc++-v3
  make doc-man-doxygen

Offline

#9 2013-03-06 00:13:51

seahawk1986
Member
Registered: 2012-12-16
Posts: 6

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

Allan wrote:

Hello,
It is very likely that you do not need that at all, but if you really do you could have achieved this quickly by commenting out

  # make documentation
  cd $CHOST/libstdc++-v3
  make doc-man-doxygen

This was one of the first things I tried but it did not work for me (there are other texinfo calls than just for libstdc++v3).
After installing texinfo-legacy from AUR I added a sed command to the PKGBUILD replacing all occurences of texinfo by texinfo-4.13a - it seems it was compiled without errors, but I saw some errors in the testsuite (which is still running):

Running /home/user/src/gcc/core/gcc/src/gcc-4.7-20130302/gcc/testsuite/g++.dg/dg.exp ...
ERROR: g++.dg/abi/mangle33.C -std=c++98: error executing dg-final: couldn't compile regular expression pattern: out of memory
ERROR: g++.dg/abi/mangle33.C -std=c++11: error executing dg-final: couldn't compile regular expression pattern: out of memory

Offline

#10 2013-03-06 02:04:58

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,394
Website

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

Yes...   errors occur.  If you don't know what they mean, you should not be compiling a replacement for your system compiler.

Offline

#11 2013-03-06 11:16:25

seahawk1986
Member
Registered: 2012-12-16
Posts: 6

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

I am not happy about it, too (if I had the urge to recompile everything myself I probably would use lfs or gentoo...) - but I had a piece of software that runs fine on other distributions and showed an unexpected behaviour on Arch Linux (when decoding UTF-8 characters using cxxtools)

Fortunately I was able to find the origin of this crash by comparing the source code of cxxtools 2.1.1 to a working (patched) source package, so I won't need to bother you with this topic anymore.

--- cxxtools-2.1.1/src/utf8codec.cpp    2012-05-03 18:06:16.000000000 +0200
+++ b/cxxtools-2.1.1/src/utf8codec.cpp  2013-03-06 11:35:53.994565118 +0100
@@ -307,7 +307,7 @@
         Char* to_next = to;

         const char* from_next = from;
-        r = codec.in(state, from, from + size, from_next, to, to + sizeof(to), to_next);
+        r = codec.in(state, from, from + size, from_next, to,  &to[sizeof(to) / sizeof(Char)], to_next);

         if (r == error)
             throw ConversionError("character conversion failed");

Thanks for the help.

Offline

#12 2013-03-06 20:56:37

brebs
Member
Registered: 2007-04-03
Posts: 3,412

Re: [Solved] How to recompile gcc 4.7.2-4 with texinfo texinfo 5.0-1?

It looks like LFS has a workaround:

sed -i 's/BUILD_INFO=info/BUILD_INFO=/' gcc/configure

Offline

Board footer

Powered by FluxBB