Full_Name: Frank Bertels Version: 2.3.24 OS: Solaris 10 URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (84.14.112.200) Hi, it seems that there exist a big issue concerning compiling in 64bit on Solaris 10 with SUN Studio 11 (and gcc, too): I tried the following (the machine has all actual patches installed, meaning, OS, header, Studio - state of 04.July 2006 - checked with 'smpatch' command and search for Studio patches on sunsolve): With SUN Studio 11: At first I installed the BerkelyDB in 64bit in /usr/local/BerkeleyDB.4.4 and openssl in /usr/local/openssl-0.9.7i without any problems. Then (in bash): # cd /tmp # gtar xvzf openldap-stable-20060606.tgz # cd openldap-2.3.24 # CC="/opt/SUNWspro/bin/cc" # test `isainfo -k` != amd64 && opt="-fast " # CFLAGS="${opt}-xarch=`isainfo -k | sed s/sparc//`" # CPPFLAGS="-I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include" # LDFLAGS="-L/usr/local/openssl/lib -R/usr/local/openssl/lib \ -L/usr/local/BerkeleyDB.4.4/lib -R/usr/local/BerkeleyDB.4.4/lib" # export CC CFLAGS CPPFLAGS LDFLAGS # ./configure --prefix=/usr/local/openldap --disable-ipv6 ..... .... # make depend ... ... # make ... Entering subdirectory librewrite rm -f version.c ../../build/mkversion -v "2.3.24" librewrite.a > version.c /opt/SUNWspro/bin/cc -fast -xarch=v9 -I../../include -I../../include -I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include -I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include -c config.c "../../include/avl.h", line 86: identifier redeclared: avl_insert current : function(pointer to pointer to struct avlnode {pointer to void avl_data, array[2] of pointer to struct avlnode {..} avl_link, array[2] of char avl_bits, signed char avl_bf}, pointer to void, pointer to function(..) returning int, pointer to function(..) returning int) returning int previous: function(pointer to struct avl_tree {pointer to struct avl_node {..} avl_root, pointer to function(..) returning int avl_compar, unsigned long avl_offset, unsigned long avl_numnodes, unsigned long avl_size}, pointer to void, unsigned long) returning void : "/usr/include/sys/avl.h", line 154 "../../include/avl.h", line 92: identifier redeclared: avl_find current : function(pointer to struct avlnode {pointer to void avl_data, array[2] of pointer to struct avlnode {..} avl_link, array[2] of char avl_bits, signed char avl_bf}, pointer to const void, pointer to function(..) returning int) returning pointer to void previous: function(pointer to struct avl_tree {pointer to struct avl_node {..} avl_root, pointer to function(..) returning int avl_compar, unsigned long avl_offset, unsigned long avl_numnodes, unsigned long avl_size}, pointer to void, pointer to unsigned long) returning pointer to void : "/usr/include/sys/avl.h", line 146 cc: acomp failed for config.c *** Error code 2 make: Fatal error: Command failed for target `config.o' Current working directory /tmp/openldap-2.3.24/libraries/librewrite *** Error code 1 The following command caused the error: for i in liblutil liblber liblunicode libldap libldap_r librewrite ; do \ echo " Entering subdirectory $i"; \ ( cd $i; make all ); \ if test $? != 0 ; then exit 1; fi ; \ echo " "; \ done make: Fatal error: Command failed for target `all-common' Current working directory /tmp/openldap-2.3.24/libraries *** Error code 1 The following command caused the error: for i in include libraries clients servers tests doc ; do \ echo " Entering subdirectory $i"; \ ( cd $i; make all ); \ if test $? != 0 ; then exit 1; fi ; \ echo " "; \ done make: Fatal error: Command failed for target `all-common' What appears to be happening is that OpenLDAP's mkdep script is asking the compiler for its dependencies, and /usr/include/sys/avl.h and avl_impl.h get listed before OpenLDAP's local ../../include/avl.h. Hence the conflicting types error. I tried with gcc, too, and got the same error. The code from this package compiles fine under Solaris 9 sparc with gcc 3.4.2. The resulting Makefiles only show a dependency on ../../include/avl.h whereas under Solaris 10 they show a dependency from ../../include/avl.h and /usr/include/sys/avl.h So this seems to be a specific problem with Solartis 10. The default CPPFLAGS only include the local OpenLDAP header, so somewhere along the way /usr/include/sys is being injected. Suggestions on what can be changed to get this package compiled would be appreciated. Regards Frank
fbertels@ixis-cib.com wrote: > Full_Name: Frank Bertels > Version: 2.3.24 > OS: Solaris 10 > URL: ftp://ftp.openldap.org/incoming/ > Submission from: (NULL) (84.14.112.200) > > > Hi, > > it seems that there exist a big issue concerning compiling in 64bit on Solaris > 10 with SUN Studio 11 (and gcc, too): > > I tried the following (the machine has all actual patches installed, meaning, > OS, header, Studio - state of 04.July 2006 - checked with 'smpatch' command and > search for Studio patches on sunsolve): > With SUN Studio 11: > At first I installed the BerkelyDB in 64bit in /usr/local/BerkeleyDB.4.4 and > openssl in /usr/local/openssl-0.9.7i without any problems. Then (in bash): > # cd /tmp > # gtar xvzf openldap-stable-20060606.tgz > # cd openldap-2.3.24 > # CC="/opt/SUNWspro/bin/cc" > # test `isainfo -k` != amd64 && opt="-fast " > # CFLAGS="${opt}-xarch=`isainfo -k | sed s/sparc//`" > # CPPFLAGS="-I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include" > # LDFLAGS="-L/usr/local/openssl/lib -R/usr/local/openssl/lib \ > -L/usr/local/BerkeleyDB.4.4/lib -R/usr/local/BerkeleyDB.4.4/lib" > # export CC CFLAGS CPPFLAGS LDFLAGS > # ./configure --prefix=/usr/local/openldap --disable-ipv6 > ..... > .... > # make depend > ... > ... > # make > ... > Entering subdirectory librewrite > rm -f version.c > ../../build/mkversion -v "2.3.24" librewrite.a > version.c > /opt/SUNWspro/bin/cc -fast -xarch=v9 -I../../include -I../../include > -I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include > -I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include -c config.c > "../../include/avl.h", line 86: identifier redeclared: avl_insert > current : function(pointer to pointer to struct avlnode {pointer to void > avl_data, array[2] of pointer to struct avlnode {..} avl_link, array[2] of char > avl_bits, signed char avl_bf}, pointer to void, pointer to function(..) > returning int, pointer to function(..) returning int) returning int > previous: function(pointer to struct avl_tree {pointer to struct > avl_node {..} avl_root, pointer to function(..) returning int avl_compar, > unsigned long avl_offset, unsigned long avl_numnodes, unsigned long avl_size}, > pointer to void, unsigned long) returning void : "/usr/include/sys/avl.h", line > 154 > "../../include/avl.h", line 92: identifier redeclared: avl_find > current : function(pointer to struct avlnode {pointer to void avl_data, > array[2] of pointer to struct avlnode {..} avl_link, array[2] of char avl_bits, > signed char avl_bf}, pointer to const void, pointer to function(..) returning > int) returning pointer to void > previous: function(pointer to struct avl_tree {pointer to struct > avl_node {..} avl_root, pointer to function(..) returning int avl_compar, > unsigned long avl_offset, unsigned long avl_numnodes, unsigned long avl_size}, > pointer to void, pointer to unsigned long) returning pointer to void : > "/usr/include/sys/avl.h", line 146 > cc: acomp failed for config.c > *** Error code 2 > make: Fatal error: Command failed for target `config.o' > Current working directory /tmp/openldap-2.3.24/libraries/librewrite > *** Error code 1 > The following command caused the error: > for i in liblutil liblber liblunicode libldap libldap_r librewrite ; do > \ > echo " Entering subdirectory $i"; \ > ( cd $i; make all ); \ > if test $? != 0 ; then exit 1; fi ; \ > echo " "; > \ > done > make: Fatal error: Command failed for target `all-common' > Current working directory /tmp/openldap-2.3.24/libraries > *** Error code 1 > The following command caused the error: > for i in include libraries clients servers tests doc ; do \ > echo " Entering subdirectory $i"; \ > ( cd $i; make all ); \ > if test $? != 0 ; then exit 1; fi ; \ > echo " "; > \ > done > make: Fatal error: Command failed for target `all-common' > > What appears to be happening is that OpenLDAP's mkdep script is asking the > compiler for its dependencies, and /usr/include/sys/avl.h and avl_impl.h > get listed before OpenLDAP's local ../../include/avl.h. Hence the > conflicting types error. > I tried with gcc, too, and got the same error. > The code from this package compiles fine under Solaris 9 sparc with gcc 3.4.2. > The resulting Makefiles only show a dependency on ../../include/avl.h whereas > under Solaris 10 they show a dependency from ../../include/avl.h and > /usr/include/sys/avl.h > So this seems to be a specific problem with Solartis 10. > The default CPPFLAGS only include the local OpenLDAP header, > so somewhere along the way /usr/include/sys is being injected. I ran into the same problem on Solaris 10, update 1, x86. The inclusion tree is as follows: "rewrite-int.h" "ac/socket.h" <sys/socket.h> <netinet/in.h> <sys/stream.h> <sys/vnode.h> <sys/avl.h> BTW: on Solaris 10 SPARC, vnode.h does not include avl.h! > Suggestions on what can be changed to get this package compiled would be > appreciated. Giving all identifiers in OpenLDAP's avl implementation a unique prefix should probably work. Norbert > > Regards > > Frank
Concur. All the exposed symbols/macros should be prefixed with lutil_/LUTIL_. At 09:01 AM 8/7/2006, norbert+lists.openldap-bugs@burgundy.dyndns.org wrote: >fbertels@ixis-cib.com wrote: >> Full_Name: Frank Bertels >> Version: 2.3.24 >> OS: Solaris 10 >> URL: ftp://ftp.openldap.org/incoming/ >> Submission from: (NULL) (84.14.112.200) >> >> >> Hi, >> >> it seems that there exist a big issue concerning compiling in 64bit on Solaris >> 10 with SUN Studio 11 (and gcc, too): >> >> I tried the following (the machine has all actual patches installed, meaning, >> OS, header, Studio - state of 04.July 2006 - checked with 'smpatch' command and >> search for Studio patches on sunsolve): >> With SUN Studio 11: >> At first I installed the BerkelyDB in 64bit in /usr/local/BerkeleyDB.4.4 and >> openssl in /usr/local/openssl-0.9.7i without any problems. Then (in bash): >> # cd /tmp >> # gtar xvzf openldap-stable-20060606.tgz >> # cd openldap-2.3.24 >> # CC="/opt/SUNWspro/bin/cc" >> # test `isainfo -k` != amd64 && opt="-fast " >> # CFLAGS="${opt}-xarch=`isainfo -k | sed s/sparc//`" >> # CPPFLAGS="-I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include" >> # LDFLAGS="-L/usr/local/openssl/lib -R/usr/local/openssl/lib \ >> -L/usr/local/BerkeleyDB.4.4/lib -R/usr/local/BerkeleyDB.4.4/lib" >> # export CC CFLAGS CPPFLAGS LDFLAGS >> # ./configure --prefix=/usr/local/openldap --disable-ipv6 >> ..... >> .... >> # make depend >> ... >> ... >> # make >> ... >> Entering subdirectory librewrite >> rm -f version.c >> ../../build/mkversion -v "2.3.24" librewrite.a > version.c >> /opt/SUNWspro/bin/cc -fast -xarch=v9 -I../../include -I../../include >> -I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include >> -I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include -c config.c >> "../../include/avl.h", line 86: identifier redeclared: avl_insert >> current : function(pointer to pointer to struct avlnode {pointer to void >> avl_data, array[2] of pointer to struct avlnode {..} avl_link, array[2] of char >> avl_bits, signed char avl_bf}, pointer to void, pointer to function(..) >> returning int, pointer to function(..) returning int) returning int >> previous: function(pointer to struct avl_tree {pointer to struct >> avl_node {..} avl_root, pointer to function(..) returning int avl_compar, >> unsigned long avl_offset, unsigned long avl_numnodes, unsigned long avl_size}, >> pointer to void, unsigned long) returning void : "/usr/include/sys/avl.h", line >> 154 >> "../../include/avl.h", line 92: identifier redeclared: avl_find >> current : function(pointer to struct avlnode {pointer to void avl_data, >> array[2] of pointer to struct avlnode {..} avl_link, array[2] of char avl_bits, >> signed char avl_bf}, pointer to const void, pointer to function(..) returning >> int) returning pointer to void >> previous: function(pointer to struct avl_tree {pointer to struct >> avl_node {..} avl_root, pointer to function(..) returning int avl_compar, >> unsigned long avl_offset, unsigned long avl_numnodes, unsigned long avl_size}, >> pointer to void, pointer to unsigned long) returning pointer to void : >> "/usr/include/sys/avl.h", line 146 >> cc: acomp failed for config.c >> *** Error code 2 >> make: Fatal error: Command failed for target `config.o' >> Current working directory /tmp/openldap-2.3.24/libraries/librewrite >> *** Error code 1 >> The following command caused the error: >> for i in liblutil liblber liblunicode libldap libldap_r librewrite ; do >> \ >> echo " Entering subdirectory $i"; \ >> ( cd $i; make all ); \ >> if test $? != 0 ; then exit 1; fi ; \ >> echo " "; >> \ >> done >> make: Fatal error: Command failed for target `all-common' >> Current working directory /tmp/openldap-2.3.24/libraries >> *** Error code 1 >> The following command caused the error: >> for i in include libraries clients servers tests doc ; do \ >> echo " Entering subdirectory $i"; \ >> ( cd $i; make all ); \ >> if test $? != 0 ; then exit 1; fi ; \ >> echo " "; >> \ >> done >> make: Fatal error: Command failed for target `all-common' >> >> What appears to be happening is that OpenLDAP's mkdep script is asking the >> compiler for its dependencies, and /usr/include/sys/avl.h and avl_impl.h >> get listed before OpenLDAP's local ../../include/avl.h. Hence the >> conflicting types error. >> I tried with gcc, too, and got the same error. >> The code from this package compiles fine under Solaris 9 sparc with gcc 3.4.2. >> The resulting Makefiles only show a dependency on ../../include/avl.h whereas >> under Solaris 10 they show a dependency from ../../include/avl.h and >> /usr/include/sys/avl.h >> So this seems to be a specific problem with Solartis 10. >> The default CPPFLAGS only include the local OpenLDAP header, >> so somewhere along the way /usr/include/sys is being injected. > >I ran into the same problem on Solaris 10, update 1, x86. > >The inclusion tree is as follows: >"rewrite-int.h" > "ac/socket.h" > <sys/socket.h> > <netinet/in.h> > <sys/stream.h> > <sys/vnode.h> > <sys/avl.h> >BTW: on Solaris 10 SPARC, vnode.h does not include avl.h! > > >> Suggestions on what can be changed to get this package compiled would be >> appreciated. > >Giving all identifiers in OpenLDAP's avl implementation a unique prefix >should probably work. > >Norbert > >> >> Regards >> >> Frank
I have also encountered this bug when trying to upgrade openldap on my systems. This bug seems to first appear on systems running Solaris 10 update 6/06, or patched with the corresponding kernel patch. For Solaris x86 systems this is patch 118855-14, and for Solaris sparc systems it appears to be 118833-17 (I don't have a sparc system running 6/06 so someone will have to verify the correct patch level, however I do have a system with that patch which also has the problem). With these releases of the OS/kernel, libavl is added along with associated support files. The problem occurs because /usr/include/sys/avl.h is added, and various system include files have been modified to include avl.h. openldap's liblutil library's avl implementation uses similar names to the Solaris version, but the implementations do not appear to be compatible. As the system avl.h is referenced in 14 separate system includes, it would be impractical to avoid including it. However, avl.h is only included if the symbol _AVL_H is not defined. This provides the opportunity to define this at compile time to avoid the conflicting definitions. Fortunately the openldap avl.h uses a different symbol (_AVL) to avoid duplicate inclusion. End user workaround: Add "-D_AVL_H" to the CFLAGS environment variable before running configure. (openldap compiles and 'make test' completes successfully with this change on my systems.) openldap developers: easy fix: add -D_AVL_H to CFLAGS within configure on affected Solaris systems (e.g. if OS is solaris and /usr/include/sys/avl.h exists). hard fix: as mentioned earlier, modify all symbols in openldap's avl implementation to be non-conflicting. Probably want to rename avl.h too just in case some brain dead cpp can't figure out which one to use. As Solaris 10 update 6/06 contains the highly anticipated ZFS support and these kernel patches are marked as recommended and security patches, it should be expected that lots of people will be running into this problem. -- James Lick -- 黎建溥 -- jlick@jameslick.com -- http://jameslick.com/
Kurt D. Zeilenga wrote: > Concur. All the exposed symbols/macros should be prefixed with lutil_/LUTIL_. In the meantime, one could add CFLAGS='-D_AVL_H' to the build environment. See http://groups.google.com/group/comp.unix.solaris/tree/browse_frm/thread/1aa8adbc92c3588a BTW: sys/vnode.h including sys/avl.h has been recognized as a bug: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6419029 Norbert > > At 09:01 AM 8/7/2006, norbert+lists.openldap-bugs@burgundy.dyndns.org wrote: > >> fbertels@ixis-cib.com wrote: >>> Full_Name: Frank Bertels >>> Version: 2.3.24 >>> OS: Solaris 10 >>> URL: ftp://ftp.openldap.org/incoming/ >>> Submission from: (NULL) (84.14.112.200) >>> >>> >>> Hi, >>> >>> it seems that there exist a big issue concerning compiling in 64bit on Solaris >>> 10 with SUN Studio 11 (and gcc, too): >>> >>> I tried the following (the machine has all actual patches installed, meaning, >>> OS, header, Studio - state of 04.July 2006 - checked with 'smpatch' command and >>> search for Studio patches on sunsolve): >>> With SUN Studio 11: >>> At first I installed the BerkelyDB in 64bit in /usr/local/BerkeleyDB.4.4 and >>> openssl in /usr/local/openssl-0.9.7i without any problems. Then (in bash): >>> # cd /tmp >>> # gtar xvzf openldap-stable-20060606.tgz >>> # cd openldap-2.3.24 >>> # CC="/opt/SUNWspro/bin/cc" >>> # test `isainfo -k` != amd64 && opt="-fast " >>> # CFLAGS="${opt}-xarch=`isainfo -k | sed s/sparc//`" >>> # CPPFLAGS="-I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include" >>> # LDFLAGS="-L/usr/local/openssl/lib -R/usr/local/openssl/lib \ >>> -L/usr/local/BerkeleyDB.4.4/lib -R/usr/local/BerkeleyDB.4.4/lib" >>> # export CC CFLAGS CPPFLAGS LDFLAGS >>> # ./configure --prefix=/usr/local/openldap --disable-ipv6 >>> ..... >>> .... >>> # make depend >>> ... >>> ... >>> # make >>> ... >>> Entering subdirectory librewrite >>> rm -f version.c >>> ../../build/mkversion -v "2.3.24" librewrite.a > version.c >>> /opt/SUNWspro/bin/cc -fast -xarch=v9 -I../../include -I../../include >>> -I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include >>> -I/usr/local/openssl/include -I/usr/local/BerkeleyDB.4.4/include -c config.c >>> "../../include/avl.h", line 86: identifier redeclared: avl_insert >>> current : function(pointer to pointer to struct avlnode {pointer to void >>> avl_data, array[2] of pointer to struct avlnode {..} avl_link, array[2] of char >>> avl_bits, signed char avl_bf}, pointer to void, pointer to function(..) >>> returning int, pointer to function(..) returning int) returning int >>> previous: function(pointer to struct avl_tree {pointer to struct >>> avl_node {..} avl_root, pointer to function(..) returning int avl_compar, >>> unsigned long avl_offset, unsigned long avl_numnodes, unsigned long avl_size}, >>> pointer to void, unsigned long) returning void : "/usr/include/sys/avl.h", line >>> 154 >>> "../../include/avl.h", line 92: identifier redeclared: avl_find >>> current : function(pointer to struct avlnode {pointer to void avl_data, >>> array[2] of pointer to struct avlnode {..} avl_link, array[2] of char avl_bits, >>> signed char avl_bf}, pointer to const void, pointer to function(..) returning >>> int) returning pointer to void >>> previous: function(pointer to struct avl_tree {pointer to struct >>> avl_node {..} avl_root, pointer to function(..) returning int avl_compar, >>> unsigned long avl_offset, unsigned long avl_numnodes, unsigned long avl_size}, >>> pointer to void, pointer to unsigned long) returning pointer to void : >>> "/usr/include/sys/avl.h", line 146 >>> cc: acomp failed for config.c >>> *** Error code 2 >>> make: Fatal error: Command failed for target `config.o' >>> Current working directory /tmp/openldap-2.3.24/libraries/librewrite >>> *** Error code 1 >>> The following command caused the error: >>> for i in liblutil liblber liblunicode libldap libldap_r librewrite ; do >>> \ >>> echo " Entering subdirectory $i"; \ >>> ( cd $i; make all ); \ >>> if test $? != 0 ; then exit 1; fi ; \ >>> echo " "; >>> \ >>> done >>> make: Fatal error: Command failed for target `all-common' >>> Current working directory /tmp/openldap-2.3.24/libraries >>> *** Error code 1 >>> The following command caused the error: >>> for i in include libraries clients servers tests doc ; do \ >>> echo " Entering subdirectory $i"; \ >>> ( cd $i; make all ); \ >>> if test $? != 0 ; then exit 1; fi ; \ >>> echo " "; >>> \ >>> done >>> make: Fatal error: Command failed for target `all-common' >>> >>> What appears to be happening is that OpenLDAP's mkdep script is asking the >>> compiler for its dependencies, and /usr/include/sys/avl.h and avl_impl.h >>> get listed before OpenLDAP's local ../../include/avl.h. Hence the >>> conflicting types error. >>> I tried with gcc, too, and got the same error. >>> The code from this package compiles fine under Solaris 9 sparc with gcc 3.4.2. >>> The resulting Makefiles only show a dependency on ../../include/avl.h whereas >>> under Solaris 10 they show a dependency from ../../include/avl.h and >>> /usr/include/sys/avl.h >>> So this seems to be a specific problem with Solartis 10. >>> The default CPPFLAGS only include the local OpenLDAP header, >>> so somewhere along the way /usr/include/sys is being injected. >> I ran into the same problem on Solaris 10, update 1, x86. >> >> The inclusion tree is as follows: >> "rewrite-int.h" >> "ac/socket.h" >> <sys/socket.h> >> <netinet/in.h> >> <sys/stream.h> >> <sys/vnode.h> >> <sys/avl.h> >> BTW: on Solaris 10 SPARC, vnode.h does not include avl.h! >> >> >>> Suggestions on what can be changed to get this package compiled would be >>> appreciated. >> Giving all identifiers in OpenLDAP's avl implementation a unique prefix >> should probably work. >> >> Norbert >> >>> Regards >>> >>> Frank >
moved from Incoming to Build
changed notes changed state Open to Closed
obsolete, Solaris bug