Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123616 - kiax 0.8.4 (gcc4 problem)
Summary: kiax 0.8.4 (gcc4 problem)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Knoblich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 117482
  Show dependency tree
 
Reported: 2006-02-21 07:14 UTC by Patrizio Bassi
Modified: 2006-04-03 10:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kiax-0.8.4-gcc4.patch (kiax-0.8.4-gcc4.patch,558 bytes, patch)
2006-02-21 08:04 UTC, Marcelo Goes (RETIRED)
Details | Diff
gcc4 patch (kiax-0.8.4-gcc4.patch,466 bytes, patch)
2006-04-02 17:11 UTC, Mark Loeser (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrizio Bassi 2006-02-21 07:14:16 UTC
cc -I. -Igsm/inc -Iportaudio/pa_common -Iportaudio/pablio -Iportmixer/px_common -Ilibspeex/include -g -O2  -DLIBVER='"CVS-2006/02/21-16:11"' -DSPEEX_PREPROCESS=1 -DNEWJB -DCODEC_ILBC -Ilibiax2/src -DLIBIAX  -DSPEEX_EC=1 -DLINUX   -c -o iaxclient_lib.o iaxclient_lib.c
iaxclient_lib.c:52: error: static declaration of ‘iaxc_lock’ follows non-static declaration
iaxclient_lib.h:203: error: previous declaration of ‘iaxc_lock’ was here
iaxclient_lib.c:85: error: static declaration of ‘iaxc_event_callback’ follows non-static declaration
iaxclient_lib.h:202: error: previous declaration of ‘iaxc_event_callback’ was here
iaxclient_lib.c: In function ‘iaxc_post_event’:
iaxclient_lib.c:187: warning: incompatible implicit declaration of built-in function ‘memcpy’
iaxclient_lib.c: In function ‘iaxc_do_state_callback’:
iaxclient_lib.c:250: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c: In function ‘iaxc_initialize’:
iaxclient_lib.c:402: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c: In function ‘iaxc_set_callerid’:
iaxclient_lib.c:456: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c: In function ‘handle_text_event’:
iaxclient_lib.c:676: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c:676: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness
iaxclient_lib.c: In function ‘handle_url_event’:
iaxclient_lib.c:688: warning: incompatible implicit declaration of built-in function ‘strcpy’
iaxclient_lib.c:698: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c:698: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness
iaxclient_lib.c: In function ‘iaxc_register’:
iaxclient_lib.c:865: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c: In function ‘iaxc_call’:
iaxclient_lib.c:884: warning: incompatible implicit declaration of built-in function ‘strstr’
iaxclient_lib.c:918: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c:921: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c:925: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c: In function ‘iaxc_service_network’:
iaxclient_lib.c:1134: warning: incompatible implicit declaration of built-in function ‘strncpy’
iaxclient_lib.c: In function ‘iaxc_version’:
iaxclient_lib.c:1257: warning: incompatible implicit declaration of built-in function ‘strncpy’
make: *** [iaxclient_lib.o] Error 1


patch is really easy:
change extern to static in iaxclient_lib.h (lines 202-203)

static  iaxc_event_callback_t iaxc_event_callback;
static  MUTEX iaxc_lock;
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2006-02-21 08:04:40 UTC
Created attachment 80366 [details, diff]
kiax-0.8.4-gcc4.patch

Patrizio's idea works for me.
Patrizio: don't forget to send it to upstream :-).
Comment 2 Patrizio Bassi 2006-02-21 09:36:35 UTC
i hate upstream! :)

please mark this as fixed when applying to portage 
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-03-08 07:22:46 UTC
I doubt that's a fix... that will create different copies of it in different units, one detached from the other.
Comment 4 Patrizio Bassi 2006-03-08 08:13:55 UTC
are u sure it's not the opposite?
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-03-08 09:41:52 UTC
Sure.
With extern in the header file, and a declaration without static in a unit file, the compiler will emit the variable as local to that unit file and as an extern for all the other unit files, and will resolve it to the local one while linking the objects together.
With static, it generates a local static (that cannot be linked against from other units) variable every time it finds the first declaration of the static variable.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2006-04-02 17:11:34 UTC
Created attachment 83776 [details, diff]
gcc4 patch

The variables aren't used anywhere else in the code that I see, so we don't even need to declare them in that header, and just let the two static definitions stay.  Also, it looks like this is what upstream did for their next version.  (you may want to just bump the ebuild to 0.8.5, but this will make it work for 0.8.4, so it is less work :)
Comment 7 Patrizio Bassi 2006-04-03 00:11:21 UTC
ok, works for me. close when applied to portage.
Comment 8 Stefan Schweizer (RETIRED) gentoo-dev 2006-04-03 10:22:55 UTC
thanks, fixed