# Installing any good SGML viewer



## ananm1 (Mar 8, 2013)

I'm trying to install a de*c*ent SGML parser/viewer onto FreeBSD. Has anyone done this successfully? I tried installing OpenSP, but no luck.

Thanks,

Anan


----------



## ananm1 (Mar 8, 2013)

after ./configure:

```
[anan@pcbsd-1955] ~/OpenSP-1.5.1% ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether build environment is sane... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) no
checking for perl... /usr/bin/perl
checking build system type... i386-unknown-freebsd9.1
checking host system type... i386-unknown-freebsd9.1
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /usr/bin/sed
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... freebsd9.1 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking for pthread_create in -lpthread... yes
checking for msgfmt... /usr/local/bin/msgfmt
checking for gmsgfmt... /usr/local/bin/msgfmt
checking for xgettext... /usr/local/bin/xgettext
checking for msgmerge... /usr/local/bin/msgmerge
checking for ranlib... (cached) ranlib
checking for strerror in -lcposix... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for off_t... yes
checking for size_t... yes
checking for working alloca.h... no
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether we are using the GNU C Library 2.1 or newer... no
checking whether integer division by zero raises SIGFPE... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unsigned long long... yes
checking for inttypes.h... yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking argz.h usability... no
checking argz.h presence... no
checking for argz.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking nl_types.h usability... yes
checking nl_types.h presence... yes
checking for nl_types.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for feof_unlocked... yes
checking for fgets_unlocked... no
checking for getc_unlocked... yes
checking for getcwd... yes
checking for getegid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getuid... yes
checking for mempcpy... no
checking for munmap... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strtoul... yes
checking for tsearch... yes
checking for __argz_count... no
checking for __argz_stringify... no
checking for __argz_next... no
checking for iconv... yes
checking how to link with libiconv... /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking for bison... no
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... yes
checking how to link with libintl... /usr/local/lib/libintl.so -L/usr/local/lib /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib
checking for locale.h... (cached) yes
checking for ANSI C header files... (cached) yes
checking for limits.h... (cached) yes
checking for unistd.h... (cached) yes
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking osfcn.h usability... no
checking osfcn.h presence... no
checking for osfcn.h... no
checking new usability... yes
checking new presence... yes
checking for new... yes
checking cassert usability... yes
checking cassert presence... yes
checking for cassert... yes
checking whether byte ordering is bigendian... no
checking for size_t... (cached) yes
checking for struct stat.st_blksize... yes
checking for sig_atomic_t in signal.h... yes
checking for size_t... (cached) yes
checking size of size_t... 4
checking for unsigned int... yes
checking size of unsigned int... 4
checking for unsigned short... yes
checking size of unsigned short... 2
checking for wchar_t... yes
checking size of wchar_t... 4
checking whether the compiler recognizes bool as a built-in type... yes
checking for bool... yes
checking size of bool... 1
checking whether the compiler supports the mutable keyword... yes
checking whether the compiler recognizes typename... yes
checking whether the compiler accepts the new for scoping rules... yes
checking whether the compiler supports placement operator delete... no
checking whether the compiler supports dynamic_cast<>... yes
checking whether the compiler implements namespaces... yes
checking whether the compiler supports explicit instantiations... yes
checking for placement operator new... yes
checking whether the C++ compiler supports the std namespace... yes
checking whether GNU C++ supports automatic template instantiation... yes
checking whether GNU C++ links with libg++ if we include new.h... no
checking whether new_handler accepts size_t and returns int... no
checking for memmove... yes
checking for memcmp... yes
checking for strerror... yes
checking for strtoul... (cached) yes
checking for setlocale... (cached) yes
checking for Windows and DOS and OS/2 style pathnames... no
checking whether to include support for http... no
checking for default catalog... none
checking for default search path... none
checking whether to include support for XML Formatted Messages... no
configure: creating ./config.status
config.status: creating OpenSP-1.5.1.spec
config.status: creating Makefile
config.status: creating msggen.pl
config.status: creating lib/Makefile
config.status: creating nsgmls/Makefile
config.status: creating spent/Makefile
config.status: creating spam/Makefile
config.status: creating sgmlnorm/Makefile
config.status: creating sx/Makefile
config.status: creating spcat/Makefile
config.status: creating include/Makefile
config.status: creating include/config.h.old
config.status: creating generic/Makefile
config.status: creating doc/Makefile
config.status: creating pubtext/Makefile
config.status: creating tests/Makefile
config.status: creating unicode/Makefile
config.status: creating intl/Makefile
config.status: creating po/Makefile.in
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
```


----------



## SirDice (Mar 8, 2013)

textproc/opensp

Handbook: Chapter 5 Installing Applications: Packages and Ports


----------



## ananm1 (Mar 8, 2013)

Wow that was cool! Thanks from Los Angeles, CA!


----------



## ananm1 (Mar 8, 2013)

On `pkg_add` it says:

```
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.1-release/Latest/OpenSP.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.1-release/Latest/OpenSP.tbz' by URL
```


----------



## SirDice (Mar 8, 2013)

> Please note that precompiled third-party packages are not available for 9.1-RELEASE at the time of release. See the Availability section below for further details.


http://www.freebsd.org/releases/9.1R/announce.html

Use the 9-stable packages.


----------



## ananm1 (Mar 8, 2013)

I see... but how do you set the source to use 9 instead of 9.1?


----------



## SirDice (Mar 8, 2013)

You need to set PACKAGESITE:
`# setenv PACKAGESITE [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/Latest/[/url]`


----------



## ananm1 (Mar 8, 2013)

Great that worked! Why is FreeBSD addictive? I still don't understand it.


----------



## SirDice (Mar 8, 2013)

ananm1 said:
			
		

> Great that worked! Why is FreeBSD addictive? I still don't understand it.



Because you learn all sorts of things while playing with it. And it's so incredibly rewarding when you get it to work


----------



## ananm1 (Mar 8, 2013)

I think you are right... a lot of the addiction comes from staring at the console scrolling text


----------

