Build Breakage
The latest gisi changes break the build:
pep.c: In function ‘g_isi_pep_create’:
pep.c:80: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function) pep.c:80: error: (Each undeclared identifier is reported only once pep.c:80: error: for each function it appears in.)
pep.c:80: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function) make[2]: *** [pep.lo] Error 1
make[1]: *** [all-recursive] Error 1
SOCK_NONBLOCK and SOCK_CLOEXEC are only available on kernel >= 2.6.28 & glibc
Quoted 1 line
= 2.9. I know this is hardly bleeding edge, but oFono should continue
working with older systems. Perhaps a --disable-isi configure option is _really_ in order?
Regards,
-Denis
Quoted 12 lines · Denis Kenzior
The latest gisi changes break the build:
pep.c: In function ‘g_isi_pep_create’:
pep.c:80: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function)
pep.c:80: error: (Each undeclared identifier is reported only once pep.c:80: error: for each function it appears in.) pep.c:80: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function)
make[2]: *** [pep.lo] Error 1
make[1]: *** [all-recursive] Error 1
Quoted 2 lines
SOCK_NONBLOCKandSOCK_CLOEXECare only available on kernel >= 2.6.28 & glibc
kernel <= 2.6.27 do not support ISI...
Signature · 1 line
Rémi Denis-Courmont
Quoted 12 lines · Denis Kenzior
The latest gisi changes break the build:
pep.c: In function ‘g_isi_pep_create’:
pep.c:80: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function)
pep.c:80: error: (Each undeclared identifier is reported only once pep.c:80: error: for each function it appears in.) pep.c:80: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function)
make[2]: *** [pep.lo] Error 1
make[1]: *** [all-recursive] Error 1
Quoted 2 lines
SOCK_NONBLOCKandSOCK_CLOEXECare only available on kernel >= 2.6.28 & glibc >= 2.9.
Attached patch should fix it.
Signature · 1 line
Rémi Denis-Courmont
From 3ab2402ebc41204a53947aead4739ff92c1d46ff Mon Sep 17 00:00:00 2001
From: =?utf-8?q?R=C3=A9mi=20Denis-Courmont?= <[email protected]>
Date: Thu, 20 Aug 2009 10:52:57 +0300
Subject: [PATCH] gisi: PEP: use more portable non-blocking and close-on-exec
--- gisi/pep.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
gisi/pep.c +4 -1
@@ -77,10 +77,13 @@ GIsiPEP *g_isi_pep_create(GIsiModem *modem)unsigned ifi =g_isi_modem_index (modem);char buf[IF_NAMESIZE ]; - fd =socket (PF_PHONET ,SOCK_SEQPACKET |SOCK_NONBLOCK |SOCK_CLOEXEC ,0 ); + fd =socket (PF_PHONET ,SOCK_SEQPACKET ,0 );if (fd ==-1 )return NULL ; +fcntl (fd,F_SETFD ,FD_CLOEXEC ); +fcntl (fd,F_SETFL ,O_NONBLOCK |fcntl (fd,F_GETFL )); +if (if_indextoname (ifi, buf) ==NULL ||setsockopt (fd,SOL_SOCKET ,SO_BINDTODEVICE , buf,IF_NAMESIZE )) goto error;
Signature · 1 line
1.6.0.4
2009/8/20 Denis Kenzior <[email protected]>:
Quoted 4 lines
SOCK_NONBLOCKandSOCK_CLOEXECare only available on kernel >= 2.6.28 & glibcQuoted 1 line
= 2.9. I know this is hardly bleeding edge, but oFono should continue
working with older systems. Perhaps a --disable-isi configure option is _really_ in order?
I think I've seen enough of these issues. I agree this is not nice, so I'll push a patch for a --disable-isi configure switch, along with Rémi's patch that fixes the actual build issue.
But it seems the build is broken in git, but for a different reason:
atmodem/atmodem.c:40:35: error: ofono/message-waiting.h: No such file or directoryatmodem/atmodem.c:42:23: error: ofono/sim.h: No such file or directory atmodem/atmodem.c:43:23: error: ofono/sms.h: No such file or directory atmodem/atmodem.c:46:29: error: ofono/voicecall.h: No such file or directory atmodem/atmodem.c: In function ‘create_cb’:atmodem/atmodem.c:381: warning: assignment makes pointer from integer without a cast
Perhaps a --disable-at switch? I kid, I kid... ;-)
Cheers,
Aki
Hi Aki,
Quoted 7 lines
But it seems the build is broken in git, but for a different reason:
atmodem/atmodem.c:40:35: error:ofono/message-waiting.h: No such file or directoryatmodem/atmodem.c:42:23: error:ofono/sim.h: No such file or directoryatmodem/atmodem.c:43:23: error:ofono/sms.h: No such file or directoryatmodem/atmodem.c:46:29: error:ofono/voicecall.h: No such file or
I already complained about this to Marcel. Any time a header is added a make clean is required. There were lots of new headers added.
Quoted 3 lines
directory
atmodem/atmodem.c: In function ‘create_cb’:atmodem/atmodem.c:381: warning: assignment makes pointer from integer without a cast
This probably happens because the message-waiting header isn't found :)
Quoted 3 lines
Perhaps a --disable-at switch? I kid, I kid... ;-)
I've actually already said this should be the case :) If one is building for a Nokia device, atmodem plugin is wasted space.
Regards,
-Denis