You are not logged in.

#1 2008-05-15 11:07:37

johntramp
Member
Registered: 2006-03-02
Posts: 21

Insight compile error.

Hi.
I am trying to install insight from the AUR, but am getting the following compile error.

gcc -c -march=i686 -mtune=generic -O2 -pipe    -I. -I.././gdb -I.././gdb/config -DLOCALEDIR="\"/opt/insight/share/locale\"" -DHAVE_CONFIG_H -I.././gdb/../include/opcode -I.././gdb/../readline/.. -I../bfd -I.././gdb/../bfd -I.././gdb/../include   -DMI_OUT=1 -DGDBTK -DTUI=1  -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror block.c
gcc -c -march=i686 -mtune=generic -O2 -pipe    -I. -I.././gdb -I.././gdb/config -DLOCALEDIR="\"/opt/insight/share/locale\"" -DHAVE_CONFIG_H -I.././gdb/../include/opcode -I.././gdb/../readline/.. -I../bfd -I.././gdb/../bfd -I.././gdb/../include   -DMI_OUT=1 -DGDBTK -DTUI=1  -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror symtab.c
cc1: warnings being treated as errors
symtab.c: In function 'find_line_symtab':
symtab.c:2252: error: 'exact' may be used uninitialized in this function
make[2]: *** [symtab.o] Error 1
make[2]: Leaving directory `/tmp/yaourt-tmp-root/aur-insight/insight/src/insight-6.7.1/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/tmp/yaourt-tmp-root/aur-insight/insight/src/insight-6.7.1'
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...
Error: Makepkg was unable to build insight package.

Is that a bug in the source? Or is there something I have done wrong?
Is there any more info I can give which will be useful?

Cheers
-John

Offline

#2 2008-05-15 11:42:17

fatlarry
Member
Registered: 2008-05-14
Posts: 31

Re: Insight compile error.

Just a hunch: I strongly believe this is a gcc compatibility issue. Older compilers were not so strict at enforcing the rules; since this is done by RedHat and quite old, I'd assume it was probably compiled with gcc 2.95, yet you try to compile it with gcc 4.2 or 4.3 which is a stickler for enforcing the C++ and C standards.  The "treat warnings as error" is probably something you want to bypass- you'll have to digg into the compiler's flags and see how to disable that, then go from there.

Or yes, go fix the source code to be standards compliant.

Offline

#3 2008-05-15 11:46:37

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: Insight compile error.

As fatlarry pointed out, what is usually just a warning about an uninitialized variable is made an error with the "-Werror" flag being passed to gcc.   As a quick fix, you can grep the source code and delete that flag when found.

Offline

#4 2008-05-15 12:11:34

johntramp
Member
Registered: 2006-03-02
Posts: 21

Re: Insight compile error.

Ok. Cheers guys, I'll give it a go.

Offline

#5 2008-05-15 13:09:52

johntramp
Member
Registered: 2006-03-02
Posts: 21

Re: Insight compile error.

Cool. Got it going by changing line symtab.c:2252 to

  int exact = 0;

Cheers.

Offline

Board footer

Powered by FluxBB