Mailing List Archive

Problems building 0.95.2 under FreeBSD 6.3
Hi,

After upgrade clamav on FreeBSD ports collection i recieved this email
from a user, talking about this problem building on 6.3.

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3597: $? = 0
configure:3604: cc -v >&5
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.6 [FreeBSD] 20060305
configure:3608: $? = 0
configure:3615: cc -V >&5
cc: `-V' option must have argument
configure:3619: $? = 1
configure:3642: checking for C compiler default output file name
configure:3664: cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include
-L/usr/local/lib -pthread conftest.c >&5
/usr/lib/libpthread.so: undefined reference to `__fcntl_compat'
configure:3668: $? = 1
configure:3706: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "clamav"
| #define PACKAGE_TARNAME "clamav"
| #define PACKAGE_VERSION "0.95.2"
| #define PACKAGE_STRING "clamav 0.95.2"
| #define PACKAGE_BUGREPORT "http://bugs.clamav.net/"
| #define PACKAGE PACKAGE_NAME
| #define VERSION "0.95.2"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3712: error: in `/usr/ports/security/clamav/work/clamav-0.95.2':
configure:3714: error: C compiler cannot create executables
See `config.log' for more details.

Any ideas? 0.95.1 worked fine

--
Renato Botelho
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: Problems building 0.95.2 under FreeBSD 6.3 [ In reply to ]
On 2009-06-17 01:58, Renato Botelho wrote:
> Hi,
>
> After upgrade clamav on FreeBSD ports collection i recieved this email
> from a user, talking about this problem building on 6.3.
>
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> configure:3597: $? = 0
> configure:3604: cc -v >&5
> Using built-in specs.
> Configured with: FreeBSD/i386 system compiler
> Thread model: posix
> gcc version 3.4.6 [FreeBSD] 20060305
> configure:3608: $? = 0
> configure:3615: cc -V >&5
> cc: `-V' option must have argument
> configure:3619: $? = 1
> configure:3642: checking for C compiler default output file name
> configure:3664: cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include
> -L/usr/local/lib -pthread conftest.c >&5
> /usr/lib/libpthread.so: undefined reference to `__fcntl_compat'
>


Can you try compiling this program with various flags:
int main() { return 0; }

cc -O2 -fno-strict-aliasing -pipe -L/usr/local/lib -pthread test.c
cc -O2 -pipe -L/usr/local/lib -pthread test.c
cc -O2 -pipe -L/usr/local/lib test.c
cc -pipe -L/usr/local/lib -pthread test.c

And tell us which one worked.

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: Problems building 0.95.2 under FreeBSD 6.3 [ In reply to ]
2009/6/17 Török Edwin <edwintorok@gmail.com>:
> On 2009-06-17 01:58, Renato Botelho wrote:
>> Hi,
>>
>> After upgrade clamav on FreeBSD ports collection i recieved this email
>> from a user, talking about this problem building on 6.3.
>>
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>> configure:3597: $? = 0
>> configure:3604: cc -v >&5
>> Using built-in specs.
>> Configured with: FreeBSD/i386 system compiler
>> Thread model: posix
>> gcc version 3.4.6 [FreeBSD] 20060305
>> configure:3608: $? = 0
>> configure:3615: cc -V >&5
>> cc: `-V' option must have argument
>> configure:3619: $? = 1
>> configure:3642: checking for C compiler default output file name
>> configure:3664: cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include
>> -L/usr/local/lib  -pthread conftest.c  >&5
>> /usr/lib/libpthread.so: undefined reference to `__fcntl_compat'
>>
>
>
> Can you try compiling this program with various flags:
> int main() { return 0; }
>
> cc -O2 -fno-strict-aliasing -pipe -L/usr/local/lib -pthread test.c
> cc -O2  -pipe -L/usr/local/lib -pthread test.c
> cc -O2  -pipe -L/usr/local/lib test.c
> cc -pipe -L/usr/local/lib -pthread test.c
>
> And tell us which one worked.

I don't have a 6.3 machine, but I tested it on 6.1, 6.2 and 6.4 and
all built fine.

I'll make more tests and try to reproduce it locally.

--
Renato Botelho
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: Problems building 0.95.2 under FreeBSD 6.3 [ In reply to ]
2009/6/17 Török Edwin <edwintorok@gmail.com>:
> On 2009-06-17 01:58, Renato Botelho wrote:
>> Hi,
>>
>> After upgrade clamav on FreeBSD ports collection i recieved this email
>> from a user, talking about this problem building on 6.3.
>>
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>> configure:3597: $? = 0
>> configure:3604: cc -v >&5
>> Using built-in specs.
>> Configured with: FreeBSD/i386 system compiler
>> Thread model: posix
>> gcc version 3.4.6 [FreeBSD] 20060305
>> configure:3608: $? = 0
>> configure:3615: cc -V >&5
>> cc: `-V' option must have argument
>> configure:3619: $? = 1
>> configure:3642: checking for C compiler default output file name
>> configure:3664: cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include
>> -L/usr/local/lib  -pthread conftest.c  >&5
>> /usr/lib/libpthread.so: undefined reference to `__fcntl_compat'
>>
>
>
> Can you try compiling this program with various flags:
> int main() { return 0; }
>
> cc -O2 -fno-strict-aliasing -pipe -L/usr/local/lib -pthread test.c
> cc -O2  -pipe -L/usr/local/lib -pthread test.c
> cc -O2  -pipe -L/usr/local/lib test.c
> cc -pipe -L/usr/local/lib -pthread test.c

Here is the results on 6.3, i asked the guy to test it with -lpthread and -lpth,
i'll send you the results.

cc -O2 -fno-strict-aliasing -pipe -L/usr/local/lib -pthread test.c
/usr/lib/libpthread.so: undefined reference to `__fcntl_compat'

cc -O2 -pipe -L/usr/local/lib -pthread test.c
/usr/lib/libpthread.so: undefined reference to `__fcntl_compat'

cc -O2 -pipe -L/usr/local/lib test.c
WORKS!!!

cc -pipe -L/usr/local/lib -pthread test.c
/usr/lib/libpthread.so: undefined reference to `__fcntl_compat'

--
Renato Botelho
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: Problems building 0.95.2 under FreeBSD 6.3 [ In reply to ]
On 2009-06-18 14:12, Renato Botelho wrote:
> 2009/6/17 Török Edwin <edwintorok@gmail.com>:
>
>> On 2009-06-17 01:58, Renato Botelho wrote:
>>
>>> Hi,
>>>
>>> After upgrade clamav on FreeBSD ports collection i recieved this email
>>> from a user, talking about this problem building on 6.3.
>>>
>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>> configure:3597: $? = 0
>>> configure:3604: cc -v >&5
>>> Using built-in specs.
>>> Configured with: FreeBSD/i386 system compiler
>>> Thread model: posix
>>> gcc version 3.4.6 [FreeBSD] 20060305
>>> configure:3608: $? = 0
>>> configure:3615: cc -V >&5
>>> cc: `-V' option must have argument
>>> configure:3619: $? = 1
>>> configure:3642: checking for C compiler default output file name
>>> configure:3664: cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include
>>> -L/usr/local/lib -pthread conftest.c >&5
>>> /usr/lib/libpthread.so: undefined reference to `__fcntl_compat'
>>>
>>>
>> Can you try compiling this program with various flags:
>> int main() { return 0; }
>>
>> cc -O2 -fno-strict-aliasing -pipe -L/usr/local/lib -pthread test.c
>> cc -O2 -pipe -L/usr/local/lib -pthread test.c
>> cc -O2 -pipe -L/usr/local/lib test.c
>> cc -pipe -L/usr/local/lib -pthread test.c
>>
>
> Here is the results on 6.3, i asked the guy to test it with -lpthread and -lpth,
> i'll send you the results.
>
> cc -O2 -fno-strict-aliasing -pipe -L/usr/local/lib -pthread test.c
> /usr/lib/libpthread.so: undefined reference to `__fcntl_compat'
>
> cc -O2 -pipe -L/usr/local/lib -pthread test.c
> /usr/lib/libpthread.so: undefined reference to `__fcntl_compat'
>
> cc -O2 -pipe -L/usr/local/lib test.c
> WORKS!!!
>
> cc -pipe -L/usr/local/lib -pthread test.c
> /usr/lib/libpthread.so: undefined reference to `__fcntl_compat'
>
>

The only change to configure in 0.95.2 was the addition of
-fno-strict-aliasing, the removal of -lmalloc on Solaris, and the
addition of _THREAD_SAFE on AIX.

Did 0.95.1 compile on this platform? If -pthread causes linking to fail,
I don't see how 0.95.1 compiled.
What library contains the missing symbol? It looks like something that
belongs in libc, or libc_r.

Best regards,
--Edwin



_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net