[Solved] how to patch source file from AUR for gcc46 ?

10-11  Source: Network gathering  Views:1 

In a topic from yesterday, I was seeking help to get AUR package 'insight' installed, but so far no luck, since there seems to be a bug in the source that won't work with the gcc47 compiler.  I'm posting this new topic, since the subject has changed a bit - I'm now trying to compile gcc46 because another user had success with that version in compiling the 'insight' package, and I need to patch the gcc46 source to get it to compile.
I'm looking for help to fix the problem myself, or if anyone wants to create a new PKGBUILD to handle the problem, that would be nice too
Originally, I thought I would try to install gcc42 from AUR and use that to run makepkg on the 'insight' app, since one user had success with this version of gcc.  Both gcc42 and gcc46 give me the same errors with an 'unwind' file, and I couldn't get either to compile (errors about unwind.h or linux-unwind.h).
I found a post with a link to a patch (for gcc46), but I have no idea where to apply or how to apply this patch.  I think I'm supposed to apply it to this file, but again, I'm not sure how to apply a patch:
, but this c file has includes to other "unwind" header files.  Here is a link to the unwind-dw2.c file at my dropbox folder, if anyone needs to see this file without downloading/compiling gcc46: http://dl.dropbox.com/u/8169867/unwind-dw2.c
Sticking with gcc46 for the moment (since I found the patch for this version)...
The post with the link to the patch to gcc46 is here: https://bbs.archlinux.org/viewtopic.php … 0#p1229880
The patch at pastebin.com is here: http://pastebin.com/VkgE27Pd and looks like this:
--- a/gcc/config/i386/linux-unwind.h 2011-01-03 20:52:22.000000000 +0000
+++ b/gcc/config/i386/linux-unwind.h 2012-07-06 12:23:51.562859470 +0100
@@ -133,9 +133,9 @@
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
The package that I'm actually trying to install is 'insight', here: https://aur.archlinux.org/packages/insight/
My error when compiling (running makepkg -s on gcc46) looks like this:
/home/briphi/builds/gcc46/src/gcc-build/./gcc/xgcc -B/home/briphi/builds/gcc46/src/gcc-build/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -g -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -O2 -g -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../.././gcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/. -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../include -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/unwind-dw2.c:333:0:
/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/config/i386/linux-unwind.h: In function ‘x86_fallback_frame_state’:
/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/config/i386/linux-unwind.h:138:17: error: field ‘info’ has incomplete type
make[3]: *** [unwind-dw2.o] Error 1
make[3]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build/i686-pc-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Last edited by stringchopper (2013-02-15 08:29:39)
Lone_Wolf wrote:
@ stringchopper
The file(s) that need patching are mentioned in the patch, so you don't have to know yourself where they are.
patch files like these are usually applied from the directory where you build stuff.
On your system that is probably this folder :   /home/briphi/builds/gcc46/src/gcc-4.6.3/
for details about the command used to apply the patch, t0m5k1's link above should help.
Thanks Lone_Wolf for the help.  I'm suffering from information overload at the moment, so (@t0m5k1) even though I found the same results that you found through google, they weren't explicit enough.
Related articles