[Dovecot] version 2.2.6 breaks compiling on Solaris 10 sparc

Jake Goerzen jgoerzen at opencsw.org
Fri Oct 4 22:44:40 EEST 2013


On 09/30/13 13:52, Oscar del Rio wrote:
>
> On 09/30/13 12:30 PM, Jake Goerzen wrote:
>> On 09/27/13 23:35, Timo Sirainen wrote:
>>> On 28.9.2013, at 1.29, Jake Goerzen <jgoerzen at opencsw.org> wrote:
>>>
>>>>   I maintain the dovecot package at opencsw.org.  The latest 
>>>> release of dovecot verison 2.2.6 has some changes to lib-http which 
>>>> is breaking compiling on Solaris 10 sparc (though x86 builds 
>>>> successfully).  Here is part of the compiler output while building:
>>>>
>>>>
>>>>    libtool: compile:  /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I../..
>>>>    -I../../src/lib -I../../src/lib-test -I../../src/lib-dns
>>>>    -I../../src/lib-ssl-iostream -I/opt/csw/include/mysql
>>>>    -I/opt/csw/include/postgresql -I/opt/csw/include -xO3 -m32
>>>>    -xarch=sparc -I/opt/csw/include -c http-header-parser.c -KPIC -DPIC
>>>>    -o .libs/http-header-parser.o
>>>>    "http-header-parser.c", line 264: warning: statement not reached
>>>>    "http-header-parser.c", line 281: warning: argument #3 is
>>>>    incompatible with prototype:
>>>>             prototype: pointer to unsigned int :
>>>>    "../../src/lib/istream.h", line 152        argument : pointer to
>>>>    unsigned long long
>>> http://hg.dovecot.org/dovecot-2.2/rev/83e74b3a0d10 fixes this.
>>>
>>>
>>
>>
>> I applied this patch and that fixes the compile error.  However, I 
>> still get undefined symbols while linking:
>>
>> /bin/bash ../../libtool  --tag=CC   --mode=link
>>    /opt/SUNWspro/bin/cc  -xO3 -m32 -xarch=sparc -I/opt/csw/include    
>>    -no-undefined -m32 -xarch=sparc -L/opt/csw/lib -o test-http-url
>>    test-http-url.o http-url.lo ../lib-test/libtest.la ../lib/liblib.la
>>    -export-dynamic -lrt -lnsl -lsocket  -lsendfile
>>    libtool: link: /opt/SUNWspro/bin/cc -xO3 -m32 -xarch=sparc
>>    -I/opt/csw/include -m32 -xarch=sparc -o test-http-url
>>    test-http-url.o .libs/http-url.o  -L/opt/csw/lib
>>    ../lib-test/.libs/libtest.a ../lib/.libs/liblib.a -lrt -lnsl
>>    -lsocket -lsendfile
>>    Undefined                       first referenced
>>      symbol                             in file
>>    http_header_field_find              .libs/http-url.o
>>    http_header_field_get               .libs/http-url.o
>>    http_header_get_fields              .libs/http-url.o
>>    ld: fatal: symbol referencing errors. No output written to 
>> test-http-url
>>
>>
>> Could there be an earlier change to some header file that is causing 
>> undefined symbols?
>>
>
> Just to test it, I tried on an old Solaris 10 sparc (gcc 3.4.3) and 
> what I get is:
>
> gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src/lib -I../../src/lib-test 
> -I../../src/lib-dns -I../../src/lib-ssl-iostream -I/usr/local/include  
> -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations 
> -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast 
> -fno-builtin-strftime -I/usr/sfw/include    -MT test-http-server.o -MD 
> -MP -MF .deps/test-http-server.Tpo -c -o test-http-server.o 
> test-http-server.c
> test-http-server.c: In function `main':
> test-http-server.c:128: error: size of array `type name' is negative
> gmake[3]: *** [test-http-server.o] Error 1
> gmake[3]: Leaving directory `/tmp/dovecot/dovecot-2.2.6/src/lib-http'
>

In case anyone is curious, I was able to successfully built dovecot 
version 2.2.6 using GCC 4.8.0 on Solaris 10 sparc & x86.


More information about the dovecot mailing list