Menu

StartingFromScratch

rkiesling

Starting from Scratch

The README file that's included in the Ctalk distribution is sufficient for installation on development machines. While the
instructions are sufficient for programmers, if you're only interested in checking out the language, then you might find the additional information given below to be useful.

What You'll Need

Ctalk's requirements are fairly light by today's standards, but they are specific. It is, after all, a developer's tool. To build Ctalk programs and run them adequately, you'll need the following.

  • A 64-bit system built within the last ten years or so.
  • 2GB of memory.
  • 30GB of disk space.
  • Linux or MacOS (or Mac OSX) as the operating system.
  • Either 64-bit GCC or Clang (often packaged as LLVM), the compilers' suite of build utilities, and the standard include files and libraries.

So What's a Good Operating System?

Any recent MacOS or Linux distribution should be okay. We routinely test Ctalk with the following OS's:

  • Arch Linux, especially via the Calam installer. The installer is simple to use, and includes, out of the box, all of the graphical development packages that Ctalk needs, and the OS is very stable. In addition, the Arch Wiki has instructions for installing a system from scratch, and a FAQ list, as well as links to many other Arch installers, which you may find useful, if you're like many of us who don't have the time to install the Arch system piece by piece.

  • Debian GNU/Linux, the Buster release. Debian is one of the most strictly free software-based Linux systems available, and also one of the oldest. If you're beginning with UNIX or Linux development, it's a very good place to start. In our opinion, the text-mode
    aptitude package manager is hard to beat. You can download Debian here.

  • Ubuntu Xenial, although it's time to upgrade the 32-bit system that Xenial is installed on. It's important for checking compatibility with the Ubuntu Desktop and Compiz window manager.

  • MacOS, the High Sierra, Snow Leopard, and Tiger (yes, Tiger) releases. In general, the more recent the release, the better. We use the older releases for backward compatibility testing. Note that you'll need to install Apple's X11 support package, which is available from the same place that you received Xcode. Ctalk (so far, at least) doesn't make use of MacOS' native GUI.

Building a Text-Only Ctalk

If you'd like to build Ctalk without graphics support, then you're nearly done. You can install the GCC compiler packages (Linux, generally included in the release) or Xcode (Mac, with not too many mouse clicks). Unpack (or pull or clone from the repo) the source code, and in the top-level directory, type the following:

$ ./configure --without-x

This omits all of the X windows support from being included in the Ctalk libraries. You can build and use all of the text-mode programs in the demos subdirectories, however, and most of the documentation still applies to text-mode programs also.

The README file also contains notes for various machine/OS build combinations, and describes each of configure's options.

Graphics Development Packages

These packages generally contain the C include files of the various data types that the GUI uses.

You can tell if the packages that Ctalk needs are present. When configure is finished, it displays a table similar to the following.

-----------------------------------------------------------

Static Libraries                      yes
Dynamic Libraries                     yes
UNIX Domain Sockets                   yes
GNU Readline Library                  yes
X11 Window System                     yes
X Render Extension                    yes
Xft Outline Fonts                     yes
Freetype2 Font Library                yes
OpenGL 3D Graphics                    yes
GLUT OpenGL Utilities                 yes
GLX OpenGL X Extension                yes
GLEW OpenGL Extension Library         yes

Method Pool Max Objects               8192

Default options for ctcc\(1\) and ctdb\(1\):

CTALKFLAGS                
CFLAGS                    -g -pthread -Wno-pointer-to-int-cast  -Wno-stringop-truncation  -Wno-address-of-packed-member  -Wno-format-overflow

                          -Wno-restrict 
                          -Wno-stringop-overflow 
                          -Wno-stringop-truncation 
                          -Wno-address-of-packed-member 

X CFLAGS                  -I /usr/include
LDFLAGS                    -g
X LDFLAGS                 -L/usr/lib -L/usr/X11R6/lib -lX11 -lXext -lGL -lGLU -lGLEW -lXft -lfreetype -lfontconfig -lXrender -lm -lGL -lGLU -lglut  -lGL -lGLU -lglut  -lGL -lGLU
                          -lXft -lfreetype -lfontconfig

-----------------------------------------------------------

Where To Find the Graphics (and Other) Data

The package names listed below are those used by the Debian GNU/Linux distribution. Your distribution may very well use similar, but not identical, names. We've also included the location of the source code releases if you're working with MacOS, or for some reason you don't want to install the distro's version.

However, many of these packages are very large, and generally require a lot of experience to implement and install. In addition, some of the requirements may be different, depending on the desktop software. So for many of these, please use the distro's packages if at all possible.

However, this list may not be exhaustive, because these packages may themselves depend on other packages. A package manager like Aptitude or Pacman should install these automatically, in addition to the packages you selected. When building the libraries from the source code distributions, you'll need to install their dependencies yourself.

Debian Package Name Source Distribution
libreadline-dev ftp://ftp.gnu.org/gnu/readline/
libx11-dev https://www.x.org/wiki/Releases/Download/
libxcb-glx0-dev ''
libxrender-dev ''
x11proto-dev ''
libwayland-dev https://wayland.freedesktop.org/releases.html
libfontconfig1-dev https://www.freedesktop.org/software/fontconfig/release/
libxft-dev https://github.com/freedesktop/libXft
cairo-dock-dev https://sourceforge.net/projects/cairo-dock.berlios/
libfreetype6-dev https://www.freetype.org/download.html
mesa-common-dev https://docs.mesa3d.org/download.html
libegl1-mesa-dev ''
libglu1-mesa-dev ''
libepoxy-dev https://github.com/anholt/libepoxy
libqt5opengl5-dev https://www.qt.io/download-open-source
qtbase5-dev ''

Additionally, some distributions completely omit the GLUT 3D graphics libraries. It's available at: https://sourceforge.net/projects/freeglut/.
<


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.