Author Topic: Build Error:fileunix.c:226: error: 'SARMAG' undeclared  (Read 3820 times)

Tommi

  • Guest
Build Error:fileunix.c:226: error: 'SARMAG' undeclared
« on: June 23, 2008, 09:55:58 am »
Hi,
i can't build codeblocks from source on my centos5.1 pc.
while doing make i got this error:
gcc -DHAVE_CONFIG_H -I. -I../../../../../src/include -Ulinux -Uunix -Wall -g -DDEPSLIB_UNIX -fno-strict-aliasing -O2 -ffast-math -g -O2 -MT fileunix.lo -MD -MP -MF .deps/fileunix.Tpo -c fileunix.c  -fPIC -DPIC -o .libs/fileunix.o
fileunix.c: In function 'file_archscan':
fileunix.c:217: error: storage size of 'ar_hdr' isn't known
fileunix.c:226: error: 'SARMAG' undeclared (first use in this function)
fileunix.c:226: error: (Each undeclared identifier is reported only once
fileunix.c:226: error: for each function it appears in.)
fileunix.c:227: error: 'ARMAG' undeclared (first use in this function)
fileunix.c:238: error: invalid application of 'sizeof' to incomplete type 'struct ar_hdr'
fileunix.c:238: error: invalid application of 'sizeof' to incomplete type 'struct ar_hdr'
fileunix.c:239: error: 'ARFMAG' undeclared (first use in this function)
fileunix.c:281: error: invalid application of 'sizeof' to incomplete type 'struct ar_hdr'
fileunix.c:328: error: invalid application of 'sizeof' to incomplete type 'struct ar_hdr'
fileunix.c:217: warning: unused variable 'ar_hdr'
make[5]: *** [fileunix.lo] Error 1
make[5]: Leaving directory `/usr/src/progs/codeblocks-8.02/src/plugins/compilergcc/depslib/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/src/progs/codeblocks-8.02/src/plugins/compilergcc/depslib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/progs/codeblocks-8.02/src/plugins/compilergcc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/progs/codeblocks-8.02/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/progs/codeblocks-8.02/src'
make: *** [all-recursive] Error 1

uname -a
Linux a3000 2.6.18-53.1.14.el5 #1 SMP Wed Mar 5 11:36:49 EST 2008 i686 athlon i386 GNU/Linux

gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)


Never heard about the complaining headers before.
Any suggestions to proceed?

Thanks!

Tommi

Tommi

  • Guest
Re: Build Error:fileunix.c:226: error: 'SARMAG' undeclared ->solved
« Reply #1 on: June 26, 2008, 10:04:48 pm »
Problem solved.

i had another ar.h (provided by BMC Remedy API) in my include path, coming first in front of the system provided one.
Maybe its not a bad idea, within configure not only to check for the name of the include rather than for the right content(checkung for an uniq symbol).

Tommi