1\input texinfo   @c -*-texinfo-*-
2@c A FAQ for GNUstep Users
3
4@node Top, GNUstep General Information, (dir), (dir)
5@chapter GNUstep Frequently Asked Questions for Users
6
7Last updated @today{}.
8Please send corrections to @email{gnustep-maintainer@@gnu.org}. Also look
9at the (developer) FAQ for more developer oriented questions.
10
11@menu
12* GNUstep General Information::
13* Compiling and Installing::
14* Compatibility and Layout::
15* Troubleshooting::
16@end menu
17
18@node GNUstep General Information, Compiling and Installing, Top, Top
19@section GNUstep General Information
20
21@menu
22* What is GNUstep?::
23* What is the OpenStep standard?::
24* What platforms does GNUstep run on?::
25* Does GNUstep run on Windows?::
26* What is GNUstep's position towards KDE and the GNOME project?::
27* How can I get GNUstep?::
28* How do you run GNUstep?::
29* Is there a web site?::
30* When is GNUstep intended to be available?::
31* What is usable?::
32@end menu
33
34@node What is GNUstep?, What is the OpenStep standard?, GNUstep General Information, GNUstep General Information
35@subsection What is GNUstep?
36
37GNUstep is the Free Software Foundation's effort to implement NeXT
38Software, Inc.'s (now Apple Computer, Inc.) OpenStep Standard.  Also we
39are building developer and user applications based on this standard which
40may someday be used to form a complete desktop experience.
41
42@node What is the OpenStep standard?, What platforms does GNUstep run on?, What is GNUstep?, GNUstep General Information
43@subsection What is the OpenStep standard?
44
45OpenStep is an Application Programming Interface (API) for creating
46applications using the Objective-C language.  It was published by NeXT
47Computer, Inc. in 1994.
48
49OpenStep consists of three parts: the @samp{Foundation Kit}, a library
50of non-graphical objects; the @samp{Application Kit}, a library of
51objects useful in creating graphical applications; and the @samp{Display
52PostScript System} (DPS), an interface for drawing to the screen using
53the PostScript graphics language. DPS support is not being persued at
54this time however.
55
56You can obtain a copy of the OpenStep standard from the GNUstep web site
57@url{http://www.gnustep.org} or it's mirror sites.
58
59@node What platforms does GNUstep run on?, Does GNUstep run on Windows?, What is the OpenStep standard?, GNUstep General Information
60@subsection What platforms does GNUstep run on?
61
62See the list of supported platforms at
63@url{machines_toc.html} for
64information on what machines GNUstep builds on and what the status of
65the ports is. Probably a few days porting to any other UNIX system where
66current gcc compilers and gdb debugger work.
67
68@node Does GNUstep run on Windows?, What is GNUstep's position towards KDE and the GNOME project?, What platforms does GNUstep run on?, GNUstep General Information
69@subsection  Does GNUstep run on Windows?
70
71  The primary targets for GNUstep are free UNIX system-based platforms such
72as GNU/Linux and FreeBSD.
73
74That being said, the base library should run on Windows NT, 98, 2000, and XP
75with the Cygwin UNIX system-emulation environment from Cygnus
76(@url{http://www.cygwin.com/}), or the MinGW environment
77(@url{http://www.mingw.org}).
78
79The GUI library uses the win32 backend library to work under
80Windows.  The backend library is a thin layer that converts the
81GNUstep methods to handle drawing of GUI elements to calls to the
82Windows API.  This project is currently in beta.
83
84@node What is GNUstep's position towards KDE and the GNOME project?, How can I get GNUstep?, Does GNUstep run on Windows?, GNUstep General Information
85@subsection  What is GNUstep's position towards KDE and the GNOME project?
86
87  You can use GNUstep with GNOME and/or KDE.  GNUstep displays
88on top of X11. You can still do programming in C (since Objective-C
89is just a super-set of C), and when GCC gets around to it,
90you'll be able to mix C++ and Objective-C code in the same file.
91
92GNUstep, is much more than a window manager or desktop environment.
93It frees you to develop cross-platform applications without the
94work of developing an OS independent framework from scratch. It
95gives you lots of basic functionality, from font panels to Unicode
96strings to distributed objects.
97
98@node How can I get GNUstep?, How do you run GNUstep?, What is GNUstep's position towards KDE and the GNOME project?, GNUstep General Information
99@subsection  How can I get GNUstep?
100
101Many distributions include packaged versions of GNUstep (Debian,
102etc). To compile from sratch, download the GNUstep Startup package or
103get the HOWTO from @url{gnustep-howto_toc.html}. Get the latest releases
104from @url{ftp://ftp.gnustep.org/pub/gnustep/core}.
105
106@node How do you run GNUstep?, Is there a web site?, How can I get GNUstep?, GNUstep General Information
107@subsection  How do you run GNUstep?
108
109 You are presumably under the misapprehension that GNUstep is
110some sort of program or window manager.
111
112It isn't.
113
114GNUstep is a whole load of things --- primarily a set of libraries
115for developing software.
116
117At present, it's those libraries, plus various command-line based
118support tools and service providing daemons, plus various GUI
119development tools, a GUI desktop/workspace application, etc.
120
121At no stage will you ever 'run' GNUstep --- you will run applications
122and tools and will make use of it's services. At some point
123you may well find packages distributed as 'GNUstep' systems in the
124way that you get 'GNU/Linux' systems packaged today. Look at
125Simply GNUstep @url{http://simplygnustep.sourceforge.net/} for instance.
126
127If you want to see a sample GUI application running you need to build
128GNUstep and look at the example applications in the gnustep-examples
129package.  Build 'Finger' or 'Ink' and start it with 'openapp Finger.app'
130or 'openapp Ink.app'
131
132To look best, use WindowMaker (the currently preferred GNUstep
133window manager) as your window manager.
134
135@node Is there a web site?, When is GNUstep intended to be available?, How do you run GNUstep?, GNUstep General Information
136@subsection  Is there a web site?
137
138See @url{http://www.gnustep.org/}.
139
140@node When is GNUstep intended to be available?, What is usable?, Is there a web site?, GNUstep General Information
141@subsection  When is GNUstep intended to be available?
142
143It's usable now. Major releases are made about every six months. However, if
144you are a serious developer, it's probably best to use the latest
145snapshots.
146
147@node What is usable?,  , When is GNUstep intended to be available?, GNUstep General Information
148@subsection  What is usable?
149
150Most of GNUstep is quite usable and there are many complex applications
151that work well. However, GNUstep does not completely track the latest
152changes that Apple makes to their interface and there are still some
153parts that need some work).
154
155What does this mean for users? Many applications will run quite well.
156Applications that require very complex text handling and some unusual
157features and/or some of the latest additions to Cocoa may not work as
158well.
159
160@c ****************************************************************
161@node Compiling and Installing, Compatibility and Layout, GNUstep General Information, Top
162@section Compiling and Installing
163
164@menu
165* How do I compile GNUstep on my machine? ::
166* Are there any precompiled packages available?::
167* What are these type and size warnings?::
168* What are these import warnings?::
169@end menu
170
171@node How do I compile GNUstep on my machine? , Are there any precompiled packages available?, Compiling and Installing, Compiling and Installing
172@subsection How do I compile GNUstep on my machine?
173
174Read the file @file{GNUstep-HOWTO}, which comes with the GNUstep
175distribution (gnustep-make), and also is available separately on the
176GNUstep web site.
177
178@node Are there any precompiled packages available?, What are these type and size warnings?, How do I compile GNUstep on my machine? , Compiling and Installing
179@subsection Are there any precompiled packages available?
180
181Check @url{http://www.gnustep.org/resources/sources.html} for links to
182RPMs, Debian packages, and BSD ports. There's also Windows installers, Mac OS X
183binaries and others.
184
185@node What are these type and size warnings?, What are these import warnings?, Are there any precompiled packages available?, Compiling and Installing
186@subsection What are these type and size warnings?
187
188These warnings:
189@example
190/usr/bin/ld: warning: type and size of dynamic symbol
191`__objc_class_name_NSConstantString' are not defined
192@end example
193
194are a common occurence and are due to a mismatch between gcc and
195ld. They don't do any harm so they can be safely ignored. They have been
196fixed in GCC version 3.1.
197
198@node What are these import warnings?,  , What are these type and size warnings?, Compiling and Installing
199@subsection What are these import warnings?
200
201Do you get this obnoxious warning whenever you compile an application, tool,
202or Objective-C program:
203
204@example
205warning: using `#import' is not recommended
206[...]
207@end example
208
209Up until gcc 3.4, the #import directive was not implemented correctly.
210As a result, the GCC compiler automatically emitted a warning whenever
211#import was used.  As of gcc 3.4, this problem has been fixed, so
212presumably, this warning is no longer emitted when code is compiled. If
213you are using an early compiler, you can supress these warnings by adding
214@code{-Wno-import} to your include (cpp) flags.
215
216@c ****************************************************************
217@node Compatibility and Layout, Troubleshooting, Compiling and Installing, Top
218@section Compatibility and Layout
219
220@menu
221* Can I run NeXT OPENSTEP or Mac OS X programs on GNUstep?::
222* Is GNUstep following changes to OpenStep and Mac OS X?::
223* Do we have to have the NEXTSTEP look and feel?::
224* What's up with the directory structure?::
225* Why not use framework bundles?::
226@end menu
227
228@node Can I run NeXT OPENSTEP or Mac OS X programs on GNUstep?, Is GNUstep following changes to OpenStep and Mac OS X?, Compatibility and Layout, Compatibility and Layout
229@subsection Can I run NeXT OPENSTEP or Mac OS X programs on GNUstep?
230
231You can't run these programs on GNUstep, but if you have the source
232code for the programs, you should be able to port them to GNUstep and
233compile them. Whether or not you will be able to run them depends on how
234complete GNUstep is at the time.
235
236@node Is GNUstep following changes to OpenStep and Mac OS X?, Do we have to have the NEXTSTEP look and feel?, Can I run NeXT OPENSTEP or Mac OS X programs on GNUstep?, Compatibility and Layout
237@subsection  Is GNUstep following changes to OpenStep and Mac OS X?
238
239Yes, gnustep-base already contains the documented changes in the
240Foundation library.  GNUstep aims to be compatible with both the
241OpenStep specification and with Mac OS X. It should be easy to write
242an application that compiles cleanly under both GNUstep and Cocoa.
243
244@node Do we have to have the NEXTSTEP look and feel?, What's up with the directory structure?, Is GNUstep following changes to OpenStep and Mac OS X?, Compatibility and Layout
245@subsection  Do we have to have the NEXTSTEP look and feel?
246
247GNUstep is aiming for something like the NEXTSTEP 3.3 look and feel.
248Although we don't want to force anyone into this, a lot of the power and
249ease of use comes from this feel. The look of GNUstep is something
250different --- buttons and other widgets can look different but still act
251the same way. We hope to implement themes which will allow
252this.
253
254@node What's up with the directory structure?, Why not use framework bundles?, Do we have to have the NEXTSTEP look and feel?, Compatibility and Layout
255@subsection What's up with the directory structure?
256
257First of all, GNUstep uses a slightly different directory structure than
258NEXTSTEP or Mac OS X. Part of this is historical, part is because we can't do
259things the same way (see @pxref{Why not use framework bundles?}). Although
260currently the structure is very similar to the one used in Mac OS X.
261
262@node Why not use framework bundles?,  , What's up with the directory structure?, Compatibility and Layout
263@subsection Why not use framework bundles?
264
265Framework bundles are much more difficult to port and to use, and are very
266unnatural on a UNIX system; extremely unnatural on Windows. In a
267framework bundle, the shared dynamic library is inside a framework wrapper
268directory.  Because of this, the dynamic linker can't find it.
269
270We have frameworks, so how do we work around that? Well, we build dynamic
271links from a directory inside the dynamic linker path into the framework,
272which work, but then you can't move the framework anywhere else on
273the system, otherwise you break the link, and nothing will find the
274framework any longer!
275
276On systems without dynamic links, like Windows, we can't even do this!
277We have to copy the library from the framework into the dynamic linker
278path, but that is simply a shared library then!  Absolutely @emph{no}
279difference.  You put the dynamic library in a system directory in the
280dynamic linker path, and associate with that library a resource directory.
281
282OpenStep for Windows did that, and still called them frameworks.
283So we can do the same, and call our libraries frameworks.
284
285In a shared library, the shared dynamic library is in a directory which is
286in the path to the dynamic linker.  the dynamic linker can find it very
287easily.  this is how all shared and static libraries work on UNIX systems,
288Windows systems and possibly most system at all.
289
290Moreover, the OpenStep API requires us to provide some stuff for
291frameworks, like creating and registering automatically a framework
292object each time a framework is used (linked at runtime, or linked into
293the app), and attaching to it the list of classes inside the framework -
294which are not particularly trivial to implement --- they depend on playing
295with the linker and the object file format --- and might produce troubles
296when porting. And we never use these facilities.
297
298For Apple Mac OS X sure it's easier. They can modify
299the system linker, compiler, the system dynamical linker. They
300always know on which platform they are working (their own), etc.  They can
301modify the system to support frameworks natively.  Easy that way.
302
303But GNUstep is meant to run on many different platforms, platforms which
304we don't control (Windows, Sun Solaris, Darwin, GNU/Linux, UNIX system
305variants) and which have different linkers and do not support frameworks
306natively.  On some systems it's difficult to just load a bundle or
307compile a shared library!
308
309So building the core libraries as 'libraries' means that it's much
310easier to port them, and it's much more difficult to break them.
311
312Sure, frameworks have a bundle of resources associated with it --- but we
313can very easily associate a bundle of resource with a shared library, no
314reason why not.  We are doing it.
315
316So please note that GNUstep libraries are meant to be much similar to
317Mac OS X frameworks.  They are composed of a shared library and
318associated with a bundle of resources.  There is a difference in
319terminology, in where the resources are installed, and possibly a slight
320difference in the NSBundle API to get to the resource bundle (anyway,
321it's a one line difference between Mac OS X and GNUstep, so it looks like
322very easy to #ifdef).
323
324In other words, GNUstep libraries are meant to basically do the same as
325frameworks do on Mac OS X, but to be portable to very different platforms (such
326as Windows).
327
328
329@c ****************************************************************
330@node Troubleshooting,  , Compatibility and Layout, Top
331@section Troubleshooting
332
333@menu
334* Problems compiling (loading shared libs)::
335* Problems compiling (GNUstep Internal Error)::
336* Problems running tools and compiling::
337* Problems with gcc3::
338* Problems with Alt key::
339* Problems with fonts::
340* No characters displayed::
341* No Makefile::
342@end menu
343
344@node Problems compiling (loading shared libs), Problems compiling (GNUstep Internal Error), Troubleshooting, Troubleshooting
345@subsection Problems compiling (loading shared libs)
346
347If you get something like
348
349@example
350plmerge: error while loading shared libraries:
351libgnustep-base.so.1: cannot open shared object file: No such file or directory
352@end example
353
354or this:
355
356@example
357Making all for service example...
358make[2]: *** [example.service/Resources/Info-gnustep.plist] Error 1
359make[1]: *** [example.all.service.variables] Error 2
360make[1]: Leaving directory `/home/multix/gnustep-gui-0.8.6/Tools'
361make: *** [internal-all] Error 2
362@end example
363
364This means your GNU make is being overly protective. When you try to
365become root (e.g. to install something), certain environment variables
366like LD_LIBRARY_PATH are unset in order to reduce the possibility of
367a security breach.  If you are becoming root to install
368something, you need to exec the GNUstep.sh file as root, just as you
369do when you login. Although for simplicity, you can also try this:
370
371@example
372make LD_LIBRARY_PATH=$LD_LIBRARY_PATH
373@end example
374
375You could also be having problems with gcc. gcc 2.96 does not work
376(Mandrake 8.1, perhaps others). Use a different compiler, like gcc 3.x.
377
378@node Problems compiling (GNUstep Internal Error), Problems running tools and compiling, Problems compiling (loading shared libs), Troubleshooting
379@subsection Problems compiling (GNUstep Internal Error)
380
381If you get
382
383@example
384GNUSTEP Internal Error:
385The private GNUstep function to establish the argv and environment
386variables was not called.
387Please report the error to bug-gnustep@@gnu.org.
388@end example
389
390when compiling the gui library, there could be several things wrong. One
391is that you installed the gnustep-objc library, but the compiler
392found another Objecive-C library (like the one that came with gcc). If
393you are using gcc 3.x, DO NOT use the gnustep-objc library.
394
395There could also be a mismatch between the base and gui library versions.
396Make sure you have the latest release of each library installed.
397
398
399@node Problems running tools and compiling, Problems with gcc3, Problems compiling (GNUstep Internal Error), Troubleshooting
400@subsection Problems running tools and compiling
401
402If you have a system that has SELinux enabled (Fedora Core for example),
403you may have trouble running and/or compiling (some tools are run during
404the compilation process) GNUstep. This is due to the use of ffcall
405and/or libffi and other techniques used to access memory in a way that
406SELinux does not like. You might get errors like
407
408@example
409trampoline: cannot make memory executable
410/bin/sh: line 5:  8427 Aborted                 ././shared_obj/
411make_services --test GSspell.service/Resources/Info-gnustep.plist
412gmake[2]: *** [GSspell.service/Resources/Info-gnustep.plist] Error 1
413@end example
414or
415@example
416libgnustep-base.so.1.13: cannot restore segment prot after reloc: Permission denied
417@end example
418
419If you are using ffcall, you might need to switch to libffi. But in
420either case, it might help to do this:
421
422@example
423chcon -t texrel_shlib_t /usr/GNUstep/System/Library/Libraries/*.so
424@end example
425
426after installing the base libraries.
427
428@node Problems with gcc3, Problems with Alt key, Problems running tools and compiling, Troubleshooting
429@subsection Problems with gcc3
430
431Don't forget you need to update binutils and libc also.
432
433@node Problems with Alt key, Problems with fonts, Problems with gcc3, Troubleshooting
434@subsection Problems with Alt key
435
436It's possible the Alt key is not where you think it is or is defined
437incorrectly. Try running the GSTest application, KeyboardInput test
438(located in the examples package
439at @url{ftp://ftp.gnustep.org/pub/gnustep/core}) to test it.
440See
441@url{http://www.gnustep.org/resources/documentation/User/Gui/KeyboardSetup.html}
442for information on how to change the settings.
443
444If you are using WindowMaker, it's possible it is grabing this key and
445using it for itself. To check, open Window Maker's WPrefs and go to the
446Mouse Preferences. Then use another value for the "Mouse grab modifier"
447(bottom right). That will allow you to alt-drag things.
448
449@node Problems with fonts, No characters displayed, Problems with Alt key, Troubleshooting
450@subsection Problems with fonts
451
452Why do the characters get changed to asterisks ('*')?
453
454The problem you are getting come from the fact that the xlib backend
455 (when not using Xft) will only use one fixed X font for a given
456font name. If the font "helvetica" is used inside of GNUstep the
457one selected X font, in your case
458"-*-helvetica-medium-r-normal--12-*-*-*-p-*-iso8859-1" is used. So
459only characters (or glyphs) that are available in that font can be
460displayed. The selection of which font name to use happens inside the
461font_cacher and is more or less at random (the order fonts are
462listed by the X system).
463
464You can influence the fonts that are available by setting:
465
466@example
467defaults write NSGlobalDomain GSFontMask "*iso8859-13"
468font_cacher
469@end example
470
471(or using a different character set, like iso8859-2). This is really a
472bug in GNUstep, but it hasn't been fixed yet.
473
474The other option is the use the art backend, which handles fonts much
475better. When compiling gnustep-back, start with
476
477@example
478./configure --enable-graphics=art
479@end example
480
481@node No characters displayed, No Makefile, Problems with fonts, Troubleshooting
482@subsection No characters displayed.
483
484When using the xlib backend, no characters are displayed in any GNUstep
485applications.
486
487The xlib backend has font anti-aliasing turned on by default. It's possible
488that GNUstep can't find any fonts on your system that can be properly anti-
489aliased. Try
490
491@example
492defaults write NSGlobalDomain GSFontAntiAlias NO
493@end example
494
495to turn off font anti-aliasing.
496
497@node No Makefile,  , No characters displayed, Troubleshooting
498@subsection No Makefile
499
500I tried to compile something and I get:
501
502@example
503GNUmakefile:27: /Makefiles/common.make: No such file or directory
504GNUmakefile:39: /Makefiles/aggregate.make: No such file or directory
505gmake: *** No rule to make target `/Makefiles/aggregate.make'.  Stop.
506@end example
507
508Make sure you have installed the gnustep-make package and also type:
509
510@example
511source /usr/local/share/GNUstep/Makefiles/GNUstep.sh
512@end example
513
514You can put this line in your @file{.profile} or @file{.bash_profile} file
515so that it is done automatically when you log in.
516
517@bye
518\bye
519