[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: __attribute__ errors building back-perl (ITS#3302)

This sounds like a bug in perl to me.  It should produce
headers which are neutral of the compiler choice. -Kurt

At 08:52 PM 8/25/2004, mills@cc.umanitoba.ca wrote:
>Full_Name: Gary Mills
>Version: 2.2.13
>OS: Solaris 8
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (
>When configuring thusly:
>env CC=cc \
>        CPPFLAGS="-I/usr/local/include -I/usr/local/src/db/db-2.4.14/Unix" \
>        LDFLAGS=" -L/usr/local/lib -R/usr/local/lib
>-L/usr/local/src/db/db-2.4.14/Unix" \
>        ./configure \
>        --disable-proctitle \
>        --enable-crypt \
>        --disable-bdb \
>        --enable-ldbm \
>        --enable-perl
>The compile of back-perl fails with errors like this:
>  cd back-perl; make  all
>rm -f version.c
>../../../build/mkversion -v "2.2.13" back_perl > version.c
>/bin/sh /local/src/solaris/ldap/openldap-2.2.13/libtool  --mode=compile  cc -g
>I../../../include -I../../../include -I.. -I./..
>n4-solaris/CORE  -I/usr/local/include -I/usr/local/src/db/db-2.4.14/Unix   -c
>mkdir .libs
>cc -g -I../../../include -I../../../include -I.. -I./..
>.6.0/sun4-solaris/CORE -I/usr/local/include -I/usr/local/src/db/db-2.4.14/Unix
>c init.c  -KPIC -DPIC -o init.o
>"/usr/local/lib/perl5/5.6.0/sun4-solaris/CORE/iperlsys.h", line 412: syntax
>r before or at: __attribute__
>This is because our perl installation was compiled with gcc.  Some of the
>files contain __attribute__, which is a gcc extension.
>For an older version of openldap, my fix was to add these lines to to
>#if !defined(__attribute__) || !defined(__GNUC__)
>#define __attribute__(A)
>For this version, I also had to modify perl_back.h to place portable.h before
>I suppose that the definition above could just be added to perl_back.h now.