libtool: compile: /sw/bin/gcc-4 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I/sw/include -Wall -Wdeclaration-after-statement -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -Os -c gibber-tcp-transport.c -o gibber-tcp-transport.o >/dev/null 2>&1 /bin/sh ../../libtool --tag=CC --mode=compile /sw/bin/gcc-4 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I/sw/include -Wall -Wdeclaration-after-statement -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -Os -c -o gibber-unix-transport.lo gibber-unix-transport.c libtool: compile: /sw/bin/gcc-4 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I/sw/include -Wall -Wdeclaration-after-statement -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -Os -c gibber-unix-transport.c -fno-common -DPIC -o .libs/gibber-unix-transport.o gibber-unix-transport.c: In function 'gibber_unix_transport_send_credentials': gibber-unix-transport.c:207: error: invalid application of 'sizeof' to incomplete type 'struct ucred' gibber-unix-transport.c:225: error: invalid application of 'sizeof' to incomplete type 'struct ucred' gibber-unix-transport.c:227: error: 'SCM_CREDENTIALS' undeclared (first use in this function) gibber-unix-transport.c:227: error: (Each undeclared identifier is reported only once gibber-unix-transport.c:227: error: for each function it appears in.) gibber-unix-transport.c:230: error: dereferencing pointer to incomplete type gibber-unix-transport.c:231: error: dereferencing pointer to incomplete type gibber-unix-transport.c:232: error: dereferencing pointer to incomplete type gibber-unix-transport.c: In function 'gibber_unix_transport_read': gibber-unix-transport.c:259: error: invalid application of 'sizeof' to incomplete type 'struct ucred' gibber-unix-transport.c:272: error: 'SO_PASSCRED' undeclared (first use in this function) gibber-unix-transport.c:329: error: dereferencing pointer to incomplete type gibber-unix-transport.c:330: error: dereferencing pointer to incomplete type gibber-unix-transport.c:331: error: dereferencing pointer to incomplete type make[4]: *** [gibber-unix-transport.lo] Error 1 it's gcc4.3, but the same occurs with 4.0.1.
ok, after adding #include <sys/ucred.h> to lib/gibber/gibber-unix-transport.c, i get this: gibber-unix-transport.c: In function 'gibber_unix_transport_send_credentials': gibber-unix-transport.c:228: error: 'SCM_CREDENTIALS' undeclared (first use in this function) gibber-unix-transport.c:228: error: (Each undeclared identifier is reported only once gibber-unix-transport.c:228: error: for each function it appears in.) gibber-unix-transport.c:231: error: 'struct ucred' has no member named 'pid' gibber-unix-transport.c:232: error: 'struct ucred' has no member named 'uid' gibber-unix-transport.c:233: error: 'struct ucred' has no member named 'gid' gibber-unix-transport.c: In function 'gibber_unix_transport_read': gibber-unix-transport.c:273: error: 'SO_PASSCRED' undeclared (first use in this function) gibber-unix-transport.c:330: error: 'struct ucred' has no member named 'pid' gibber-unix-transport.c:331: error: 'struct ucred' has no member named 'uid' gibber-unix-transport.c:332: error: 'struct ucred' has no member named 'gid' make[4]: *** [gibber-unix-transport.lo] Error 1 ...seems like our struct ucred is pretty different :(
We currently assume that all Unix platforms can pass credentials around just like Linux. I'm working on making this optional.
http://git.collabora.co.uk/?p=user/smcv/telepathy-gabble-smcv.git;a=shortlog;h=refs/heads/darwin should hopefully compile and work (I tried changing the check for __linux__ to always fail, and the tests passed, with the credentials ones disabled). It would be interesting to see whether "make check" works on Darwin - if not, please paste or attach the output.
The code you added inhttp://git.collabora.co.uk/?p=user/smcv/telepathy-gabble-smcv.git;a=commitdiff;h=e7a8069afccb1ed221c84f7e8e3b5bc478fbbedc could be a function in tubetestutil.py. In tests, we could use sys.platform and assert that Credentials is supported if the OS is Linux. exec_stream_tube_test() should be modified to not try to use Credentials if the OS is not Linux.
*** Bug 23346 has been marked as a duplicate of this bug. ***
I've renamed the branch to be more accurately named (capabilities rather than darwin, since this change is necessary but not sufficient to compile on Darwin) and redone the patch against the tests.
++
Thanks. Fixed in git, will be in 0.9.0. Not backporting to 0.8, at least for now, since this change isn't sufficient to compile on Darwin/BSD/etc. anyway.
Just for the record: 0.7.21 compiles fine on NetBSD, only the 0.8 series introduced the compilation problem. So there probably _is_ a point in backporting it. I'm not sure it's worth the effort -- when's 0.9 due?
(In reply to comment #9) > Just for the record: 0.7.21 compiles fine on NetBSD That would be because it was less featureful, and the non-portable code had not yet been introduced :-) Any further compilation-failure reports for git master would be welcome (note that asyncns.[ch] comes from a different upstream - http://0pointer.de/lennart/projects/libasyncns/ - so we'd prefer to fix any portability problems there by sending patches to Lennart, rather than unilaterally changing things ourselves). I'd prefer to wait til platform-independent bugfixing on 0.8.x has slowed down a bit (or at least until git master compiles on misc platforms without patching!) before backporting portability fixes to it.
Was fixed in 0.9.0. The Windows-compatibility changes on Bug #24395 (an as-yet unmerged branch for 0.8, including a 0.8 backport of this patch) might help BSD/Darwin too, since they're mostly "don't assume everything is Linux".
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.