Документ взят из кэша поисковой машины. Адрес оригинального документа : http://jet.sao.ru/hq/sts/linux/doc/nedit/faq/sect_building.shtml
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 10:06:59 2012
Кодировка:

Поисковые слова: р п р п р п п р п
[NEdit] FAQ: Building

Building

  1. When I build NEdit on my SunOS system, I get undefined symbols: _memmove, _atexit, _strerror.
  2. I'd like to build NEdit, but my system seems to be missing the Xm... include files and libXm.a
  3. When I build NEdit, I get the yacc error: conflicts: 36 shift/reduce
  4. I built NEdit on my Linux system, and it's full of bugs. What a horrible editor!
  5. While compiling NEdit on Linux, I get a warning about tmpnam being dangerous.
  6. NEdit fails to build on Linux, with messages about `XpGetDocumentData'

1. When I build NEdit on my SunOS system, I get the fillowing undefined symbols:

ld: Undefined symbol
   _memmove
   _atexit
   _strerror
*** Error code 1
make: Fatal error: Command failed for target `nedit'

Older versions of the gcc C runtime library were missing these functions. You can either upgrade gcc, or get sources for these functions from ftp://ftp.nedit.org/pub/contrib/misc (which someone else with your very same problem kindly contributed).


2. I'd like to build NEdit, but my system seems to be missing the Xm... include files and libXm.a

Xm means Motif, which is an important part of NEdit's GUI interface. Motif is standard on commercial Unix workstations, but not on free Unix platforms like Linux and FreeBSD. On these systems, you can now use LessTif, the GPL clone of Motif, or purchase a copy of Motif, which is usually relatively inexpensive, but not free. You can find a list of companies selling Motif for Linux at:

http://www.cen.com/mw3/#providers

As of this writing LessTif is very close to being a fully reliable and complete replacement for Motif, so it's definitely worth trying before shelling out any money for a commercial copy. Also remember that in most cases, you don't really need Motif libraries to use NEdit. There are plenty of versions available pre-built with the Motif libraries linked in statically. If you can't find one for your system, ask around, and you may find that someone else has already built one for you. Motif licensing allows free distribution of statically linked binaries. Executables for NEdit are available from ftp://ftp.nedit.org/pub/<current-version>/executables.


3. When I build NEdit, I get the yacc error:

  conflicts: 36 shift/reduce

That's normal. NEdit's macro language has a very conflicted grammar, but the conflicts all resolve themselves correctly. The conflicts stem from allowing awk-style no-operator concatenation of strings.


4. I built NEdit on my Linux system, and it's full of bugs. What a horrible editor!

Several of the Linux distributions began including LessTif (a free version of the Motif GUI library) before it was really ready for general use (particularly for something which needs to be as reliable as a text editor). If you have a version of Lesstif prior to 0.92.26, you have to upgrade it, before it will support NEdit reliably. To get the newest version, go to http://lesstif.org. Alternatively, you can get pre-built, statically linked, executables from ftp://ftp.nedit.org/pub/<current-version>/executables.


5. While compiling NEdit on Linux, I get the following warning:

    file.o: In function `PrintString':
    file.o(.text+0x17b7): the use of `tmpnam' is dangerous, better use `mkstemp'

Is NEdit insecure?

Not if you are using the glibc. The algorithm of mkstemp(3) consists of two parts: the first part is the one used in tmpnam(3) -- this is what NEdit accomplishes by calling tmpnam(3); the second part is done directly in NEdit.


6. NEdit fails to build on Linux, with messages

   undefined reference to `XpGetDocumentData'
   undefined reference to `XpGetPageDimensions'
   ...

Edit makefiles/Makefile.Linux, and add '-lXp' to the line starting with 'LIB', right before '-lXext'. At this time we are not sure whether libXp (the X print library) is installed on all Linux systems.


[Diagnosing and reporting problems] [FAQ Contents] [Customization]