Xcircuit-dev Xcircuit Installation For Mac

Circuit-drawing program. XCircuit is a program for drawing publishable-quality electrical circuit schematic diagrams and related figures, and produce circuit netlists through schematic capture. XCircuit regards circuits as inherently hierarchical, and writes both hierarchical PostScript output and hierarchical SPICE. XCircuit Alternatives. XCircuit is described as 'UNIX/X11 program for drawing publishable-quality electrical circuit schematic diagrams and related figures, and produce circuit netlists through schematic capture'. There are nine alternatives to XCircuit for Windows, Linux, Mac and Android. The best alternative is Autodesk EAGLE.

General

XCircuit starting version 2.3.2 uses GNU automake to configure the system.The automake script, in addition to the usual search for OS compatibility,looks for the following things:
  • Presence of python. XCircuit uses an embedded Python interpreter, so it is necessary to have a library and include files, not just a python executable. You may need to get the Python source and compile. Note that XCircuit will work fine without the Python interpreter: most of the functionality is duplicated in an ad-hoc command 'language', mostly for setting options, changing key bindings, etc. Scripts using this ad-hoc language, however, will not be able to interact with internal objects. Python scripts can do much more, including extending the xcircuit command set and running animations.
  • Presence of xpm. XPM is usually installed on modern UNIX flavors, especially Linux. XCircuit will work fine without XPM enhancements, but will lose the toolbar and icon.
GNU automake is preferred. Use the original Imake only if the GNUmake is not working properly.

In addition, compilation from source is always preferred toinstallation of a precompiled executable (such as an RPM file).Compilation from source allows GNU autoconf to tailor xcircuit tothe abilities of your system, as described above.

Installation preparation

  1. Download xcircuit from the xcircuit download page. XCircuit source comes in either tar.gz or tar.bz2 formats.
  2. Uncompress with, as appropriate,
  3. Untar the archive file with
  4. The result of the above steps is a directory named xcircuit-version containing the source.
  5. Follow the GNU automake instructions, below. If automake fails, revert to the original imake style.

GNU Compile and Install (preferred)

GNU automake is intended to greatly simplify the process of program installationby querying the OS for detailed information on its capabilities. In most cases,the following should work without a hitch:For default configuration, the xcircuit install process must be runas root user, so the process can access the /usr/local/Xcircuitdirectory tree for installation. GNU install puts the Xcircuit-devxcircuitMacexecutable into /usr/local/bin/ and files it needs on startup in/usr/local/share/xcircuit-version/.

GNU Configure Options

All compile-time features are set during the ./configure process. Runfor a list of configure options. For most users, the relevantoptions are the following:
--prefix=PREFIX
Location to install xcircuit. Defaults to /usr/local/. The executable goes to /usr/local/bin/, man pages to /usr/local/man/man1/, and everything else to /usr/local/share/xcircuit-VERSION/. Defaults can be separated by explicitly declaring --exec-prefix=DIR, --mandir=DIR, and --libdir=DIR.
--disable-lgf
Save space by not compiling the compatibility with 'analog' and 'diglog' .lgf-format files.
--disable-schema
Don't compile the schematic capture system. This is a major feature of xcircuit, so disabling it is not recommended. However, you may do so if you anticipate having no need for circuit netlists.
--with-python=DIR
If the configure step cannot find a Python interpreter, it can be explicitly referenced. Requires the Python library (libpythonVERSION.a or libpythonVERSION.so) and the python include file Python.h. The Python option uses the Python language as an interpreter for xcircuit.
--with-xpm=DIR
If the configure step cannot find the XPM package, it can be explicitly referenced. The XPM package enables the toolbar and an icon when xcircuit is iconified.
--with-gs=DIR
If the configure step cannot find ghostscript, it can be explicitly referenced. The Ghostscript option allows any PostScript file to be rendered on the xcircuit background and saved with the xcircuit file.
--disable-double-buffer
This option is almost wholly deprecated due to the speed of modern processors. However, if you have problems with slow rendering, you might find it useful.
--disable-focus-fix
Don't attempt to work around broken window managers. Normally this option should not be tampered with, but odd behavior regarding capture of key events in the xcircuit window may require it.
Note for HP users: The original HP 'm4' processor cannot handlethe man page translation. If available, use GNU m4 by changing the configuremethod above to the following:
M4=path-to-GNU-m4./configure[options]

Imake Compile and Install (if GNU make fails)

Imake Options

  1. All compile-time features are set from within Imakefile. Be sure to reference Imakefile first if you have difficulties compiling.
  2. Decide where you want xcircuit and its library files to reside, and set XCIRCUIT_LIB_DIR, XCIRCUIT_MAN_DIR, and XCIRCUIT_BIN_DIR accordingly. The default path is '/usr/local/lib/xcircuit-2.2/'.
  3. It should not be necessary to change CC, CCOPTIONS, or CDEBUGFLAGS for Linux systems, unless you encounter problems during compiling.
  4. DEC Alpha systems: Add '-taso' to CCOPTIONS to get the compiler to make necessary changes to deal with 64-bit addressing. It may also be necessary to add the '-D' flag.
  5. The XCircuit Imakefile defaults to defining 'HAVE_PYTHON'. However, this assumes several things: That Python 2.1 is installed on the system, that it is installed in /usr/local/, and that the Python include files have been installed. This is all true for a standard installation from Python source, but not necessarily for a pre-installed Python. If you don't want to use the Python interpreter, you can undefine HAVE_PYTHON in the Imakefile. If you have Python, but it's a different version or installed in a different place, make appropriate changes to the definitions in the Imakefile. PYTHON_LIB_DIR is the directory where the library file 'libpython2.1.a' (or equivalent, depending on the version) has been installed. PYTHON_INCLUDE_DIR is the directory containing all of Python's .h files, but must at least contain 'Python.h'.

    The Python library preferably should be built as a shared (.so) library. See the section 'Shared Python Library' below.

  6. Anyone using xcircuit for drawing purposes only (no schematic capture wanted) may undefine SCHEMA in the Imakefile. If you're not sure, leave it alone.
  7. By default, the Imakefile assumes that your system has xpm (pixmaps); if you don't, or you get error messages about no include file 'xpm.h' found, then delete the line '#define HAVE_XPM' from the Imakefile and recompile. The only thing you will be missing is the color icon.
The makefile should automatically install the application defaultsfile 'XCircuit.ad' in /usr/lib/X11/app-defaults/XCircuit.

The makefile should also automatically install the man page in(depending on the Imake configuration) /usr/local/man/man1/xcircuit.1x.

If the program is extremely slow in rendering the screen or if thesystem tends to swap during program execution, you may need toundefine DO_BUFFER in the Imakefile. Clean, no-flicker renderingis made possible by drawing on a Pixmap and then doing a quick copyfrom the Pixmap to the screen. Depending on the default screendepth (usually 8 or 16 bits) and the window size, the Pixmap can takea MB of memory or more. Systems with too little memory or systemswithout a video card with Bit-BLT (block transfers) can erase allthe gains of graphics buffering. Xcircuit will operate fine withoutbuffering, but the screen will flicker every time there is a refresh;consequently, without buffering the system is designed not to refreshas often, and there will be more 'pixel trash' on the screen. It isexpected that under these conditions the user will simply use thespace bar to refresh the screen as needed.

Xcircuit-dev Xcircuit Installation For Mac Free

Embedded Python Interpreter

The one option most likely to be missing from default Linux/UNIXdistributions is the library and include files for the Pythoninterpreter.

XCircuit compile, if using Python, requires Python source,not the executable. If you need/want to install or update Python onyour system, be sure to download the source, not, for instance, anRPM package with executable only.

Obtaining Python

Xcircuit-dev Xcircuit Installation For Mac Software

Python source can be obtained from the Python.org official website. The actual download is on the ftp sitePython 2.1 FTP directory. Current download (July 2001) isPython-2.1.tgz.

Shared Python Library

The XCircuit build will be *much* smaller if you have a sharedpython library. However, the build instructions as of Python-2.1c2don't include instructions for building a shared library under linux.Here's how you do it:
  1. In the Makefile: set
  2. Also in the Makefile: Add a case for libpython$(VERSION).so which looks exactly like the case statement for unixware:
  3. Make until error ('can't find libpython2.1.so')
  4. Copy or move libpython2.1.so to /usr/local/lib or /usr/lib
  5. Run (as root!) (or use the directory where you just put the shared library) and confirm that it found libpython2.1.so.
  6. Finish (should run to normal completion).
On my system, this is the difference between a 4MB xcircuit executableand a 1.5MB executable. That's a big difference! Of course, Pythonpurists would say I should be embedding xcircuit in python, not theother way around, then what need do I have for a shared library,anyway?

Back to the xcircuit home page. . .

email: tim@bach.ece.jhu.edu