Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

compiling gui with clang/libobjc2 failure

17 views
Skip to first unread message

Sebastian Reitenbach

unread,
Feb 1, 2013, 2:36:34 AM2/1/13
to discuss...@gnu.org
Hi,

on OpenBSD, I fail to compile gui from svn using libobjc2 and clang:

clang GSCUPSPrintInfo.m -c \
-MMD -MP -I/usr/local/include/gnustep -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-nonfragile-abi -D_NONFRAGILE_ABI -pthread -fPIC -DDEBUG -fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -O2 -pipe -g -fgnu-runtime -Wall -fconstant-string-class=NSConstantString -I/usr/local/include/libpng -I/usr/local/include/libpng -I../../Headers/Additions -I../../Headers -I../../Source/. -I. -I/usr/local/include -I/gnustep-gui-0.23.0_writes_to_HOME/GNUstep/Library/Headers -I/usr/local/include \
-o obj/GSCUPS.obj/GSCUPSPrintInfo.m.o
In file included from GSCUPSPrintInfo.m:35:
/usr/local/include/cups/cups.h:34:14: fatal error: 'dispatch/dispatch.h' file not found
# include <dispatch/dispatch.h>
^
1 error generated.

here is where it comes from cups.h:
# ifdef __BLOCKS__
# include <dispatch/dispatch.h>
# endif /* __BLOCKS__ */

commenting out this block in the cups.h file, it just compiles fine.
so I'm unsure, if this is a problem of cups, or GNUstep?

Sebastian

David Chisnall

unread,
Feb 1, 2013, 3:34:03 AM2/1/13
to Sebastian Reitenbach, discuss...@gnu.org
On 1 Feb 2013, at 07:36, Sebastian Reitenbach wrote:

> # ifdef __BLOCKS__
> # include <dispatch/dispatch.h>
> # endif /* __BLOCKS__ */

This is definitely a cups problem. They are assuming that blocks support (a compiler feature) implies the presence of libdispatch (a library). I don't know if libdispatch has been ported to OpenBSD.

I think the -base configure checks for the presence of libdispatch because we use it for parallel array operations, so the best thing to do is use that macro to conditionally #undef __BLOCKS__ before including cups.h

David

-- Sent from my STANTEC-ZEBRA


Lundberg, Johannes

unread,
Feb 1, 2013, 3:42:54 AM2/1/13
to David Chisnall, discuss...@gnu.org
I have struggled a with this problem. Base's configure script either complains about not being able to compile objc or the error you mentioned. Make and libobjc2 installs fine but never base (sometimes not, sometimes installs works fine). It appears that you can NOT have libdispatch installed while compiling and installing libobcj2. The solution I found was to uninstall libdispatch, install gnustep+libobjc2 and then reinstall libdispatch. Then it worked like a charm... I guess there are another solution if you modify the header of some file in libobjc2.



_______________________________________________
Discuss-gnustep mailing list
Discuss...@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep



--
Johannes Lundberg
BRILLIANTSERVICE CO., LTD.

Luboš Doležel

unread,
Feb 1, 2013, 4:49:11 AM2/1/13
to discuss...@gnu.org
On Fri, 1 Feb 2013 08:34:03 +0000, David Chisnall wrote:
> On 1 Feb 2013, at 07:36, Sebastian Reitenbach wrote:
>
>> # ifdef __BLOCKS__
>> # include <dispatch/dispatch.h>
>> # endif /* __BLOCKS__ */
>
> This is definitely a cups problem. They are assuming that blocks
> support (a compiler feature) implies the presence of libdispatch (a
> library). I don't know if libdispatch has been ported to OpenBSD.
>
> I think the -base configure checks for the presence of libdispatch
> because we use it for parallel array operations, so the best thing to
> do is use that macro to conditionally #undef __BLOCKS__ before
> including cups.h
>
> David
>

Yep, I hit the same problem on Linux. I simply edit the CUPS header
file and remove the include... Apple, which runs the CUPS development
now, apparently assumes that blocks support is OS X-only.

Reminds me of a similar issue with unistd.h from glibc that uses
"__block" for an argument name. And they reject changing the
(irrelevant) name to something else.

--
Luboš Doležel


Sebastian Reitenbach

unread,
Feb 1, 2013, 9:52:24 AM2/1/13
to discuss...@gnu.org
Thanks to all who answered. I'll probably file a bug report
against cups then. For the time being, commenting it out
solves the immediate problem to me.

cheers,
Sebastian

>
> --
> Luboš Doležel
0 new messages