You are not logged in.

#1 2013-02-10 14:16:32

stringchopper
Member
Registered: 2009-02-19
Posts: 38

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

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 smile

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:

/home/briphi/builds/gcc46/src/gcc-4.6.3/gcc/unwind-dw2.c

, 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().
    Aborting...

Last edited by stringchopper (2013-02-15 08:29:39)


Regards,
Brian

Offline

#2 2013-02-10 15:30:59

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 324

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


ROG Strix (GD30CI) - Intel Core i5-7400 CPU - 32Gb 2400Mhz - GTX1070 8GB - AwesomeWM (occasionally XFCE, i3)

If everything in life was easy, we would learn nothing!
Linux User: 401820  Steam-HearThis.at-Last FM-Reddit

Offline

#3 2013-02-11 14:16:50

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

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

@ 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.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2013-02-13 20:44:26

stringchopper
Member
Registered: 2009-02-19
Posts: 38

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

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.


Regards,
Brian

Offline

Board footer

Powered by FluxBB