Re: Problem using apgcc in with Ubuntu 9.04

Jan Niklas Hasse <[email protected]> Wed, 10 Jun 2009 23:01:18 +0200
Newsgroups gmane.comp.autopackage.devel
Message-ID <[email protected]>
On Wed, Jun 10, 2009 at 10:34 PM, Gustavo
Serra<[email protected]> wrote:
> Hi.
>
> First of all, sorry if this subject has already been dealt with, I
> haven't found any information. Using APBUILD_DEBUG=3D1 I realized that
> -U_FORTIFY_SOURCE is used to compile my sources. However, this flag
> seem to disable the options -Wall and -Werror (compiling with gcc
> instead of apgcc, I get the new gcc 4.3 warnings about unused return
> values):
>
> # /usr/bin/gcc -I/usr/local/include/apbuild -include
> /usr/local/include/apbuild/apsymbols.h -DAPBUILD_VERSION=3D"2.0.9"
> -fno-stack-protector -U_FORTIFY_SOURCE pdvio.c -pipe -pthread -Wall
> -Werror -O2 -fPIC -I../include -march=3Di486 -c -o .obj/release/pdvio.o
>
> If I run the line above manually and remove the -U flag, I get all the wa=
rnings.
> I can edit apgcc and remove this flag, but I am unaware of the consequenc=
es.
>
> Also, I had to edit apsymbols.h and replace @GLIBC_2.2.5 for
> @GLIBC_2.3. Otherwise I would get these errors:

AFAIK the source fortifying (don't know how to call that thing, but it
can be turned off by -U_FORTIFY_SOURCE) was introduced in glibc 2.7.
Therefore we added the flag.
You normally don't want to see the warnings anyway because apbuild
should only be used to build binaries which will be distributed.

> $ make
> apgcc -pipe -pthread -Wall -Werror =C2=A0 -O2 -fPIC =C2=A0-I../include
> -march=3Di486 -c -o .obj/release/pdvio.o pdvio.c
> {standard input}: Assembler messages:
> {standard input}:26: Error: multiple versions
> [`sys_errlist@GLIBC_2.3'|`sys_errlist@GLIBC_2.2.5'] for symbol
> `sys_errlist'
> {standard input}:27: Error: multiple versions
> [`_sys_errlist@GLIBC_2.2.5'|`_sys_errlist@GLIBC_2.3'] for symbol
> `_sys_errlist'
> {standard input}:28: Error: multiple versions
> [`sys_nerr@GLIBC_2.3'|`sys_nerr@GLIBC_2.2.5'] for symbol `sys_nerr'
> {standard input}:29: Error: multiple versions
> [`_sys_nerr@GLIBC_2.2.5'|`_sys_nerr@GLIBC_2.3'] for symbol `_sys_nerr'
>
> What is the correct manner to deal with these problems?

This one looks like a bug/problem by apgcc's apsymbols.h file. I think
it can only be fixed if we let apgcc run the buildlist script before
compiling. I will try to implement something in the next days.

---------------------------------------------------------------------
To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected]
For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]